Merge pull request #39 from TheBlueMatt/main
[ldk-java] / ts / bindings.ts
1
2 import * as fs from 'fs';
3 const source = fs.readFileSync('./ldk.wasm');
4
5 const memory = new WebAssembly.Memory({initial: 256});
6 const wasmModule = new WebAssembly.Module(source);
7
8 const imports: any = {};
9 imports.env = {};
10
11 imports.env.memoryBase = 0;
12 imports.env.memory = memory;
13 imports.env.tableBase = 0;
14 imports.env.table = new WebAssembly.Table({initial: 4, element: 'anyfunc'});
15
16 imports.env["abort"] = function () {
17     console.error("ABORT");
18 };
19
20 let wasm = null;
21 let isWasmInitialized: boolean = false;
22
23
24 // WASM CODEC
25
26 const nextMultipleOfFour = (value: number) => {
27     return Math.ceil(value / 4) * 4;
28 }
29
30 const encodeUint8Array = (inputArray) => {
31         const cArrayPointer = wasm.TS_malloc(inputArray.length + 4);
32         const arrayLengthView = new Uint32Array(memory.buffer, cArrayPointer, 1);
33     arrayLengthView[0] = inputArray.length;
34         const arrayMemoryView = new Uint8Array(memory.buffer, cArrayPointer + 4, inputArray.length);
35         arrayMemoryView.set(inputArray);
36         return cArrayPointer;
37 }
38
39 const encodeUint32Array = (inputArray) => {
40         const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 4);
41         const arrayMemoryView = new Uint32Array(memory.buffer, cArrayPointer, inputArray.length);
42         arrayMemoryView.set(inputArray, 1);
43     arrayMemoryView[0] = inputArray.length;
44         return cArrayPointer;
45 }
46
47 const getArrayLength = (arrayPointer) => {
48         const arraySizeViewer = new Uint32Array(
49                 memory.buffer, // value
50                 arrayPointer, // offset
51                 1 // one int
52         );
53         return arraySizeViewer[0];
54 }
55 const decodeUint8Array = (arrayPointer, free = true) => {
56         const arraySize = getArrayLength(arrayPointer);
57         const actualArrayViewer = new Uint8Array(
58                 memory.buffer, // value
59                 arrayPointer + 4, // offset (ignoring length bytes)
60                 arraySize // uint8 count
61         );
62         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
63         // will free the underlying memory when it becomes unreachable instead of copying here.
64         const actualArray = actualArrayViewer.slice(0, arraySize);
65         if (free) {
66                 wasm.TS_free(arrayPointer);
67         }
68         return actualArray;
69 }
70 const decodeUint32Array = (arrayPointer, free = true) => {
71         const arraySize = getArrayLength(arrayPointer);
72         const actualArrayViewer = new Uint32Array(
73                 memory.buffer, // value
74                 arrayPointer + 4, // offset (ignoring length bytes)
75                 arraySize // uint32 count
76         );
77         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
78         // will free the underlying memory when it becomes unreachable instead of copying here.
79         const actualArray = actualArrayViewer.slice(0, arraySize);
80         if (free) {
81                 wasm.TS_free(arrayPointer);
82         }
83         return actualArray;
84 }
85
86 const encodeString = (string) => {
87     // make malloc count divisible by 4
88     const memoryNeed = nextMultipleOfFour(string.length + 1);
89     const stringPointer = wasm.TS_malloc(memoryNeed);
90     const stringMemoryView = new Uint8Array(
91         memory.buffer, // value
92         stringPointer, // offset
93         string.length + 1 // length
94     );
95     for (let i = 0; i < string.length; i++) {
96         stringMemoryView[i] = string.charCodeAt(i);
97     }
98     stringMemoryView[string.length] = 0;
99     return stringPointer;
100 }
101
102 const decodeString = (stringPointer, free = true) => {
103     const memoryView = new Uint8Array(memory.buffer, stringPointer);
104     let cursor = 0;
105     let result = '';
106
107     while (memoryView[cursor] !== 0) {
108         result += String.fromCharCode(memoryView[cursor]);
109         cursor++;
110     }
111
112     if (free) {
113         wasm.wasm_free(stringPointer);
114     }
115
116     return result;
117 };
118
119 export class VecOrSliceDef {
120     public dataptr: number;
121     public datalen: number;
122     public stride: number;
123     public constructor(dataptr: number, datalen: number, stride: number) {
124         this.dataptr = dataptr;
125         this.datalen = datalen;
126         this.stride = stride;
127     }
128 }
129
130 /*
131 TODO: load WASM file
132 static {
133     System.loadLibrary("lightningjni");
134     init(java.lang.Enum.class, VecOrSliceDef.class);
135     init_class_cache();
136 }
137
138 static native void init(java.lang.Class c, java.lang.Class slicedef);
139 static native void init_class_cache();
140
141 public static native boolean deref_bool(long ptr);
142 public static native long deref_long(long ptr);
143 public static native void free_heap_ptr(long ptr);
144 public static native byte[] read_bytes(long ptr, long len);
145 public static native byte[] get_u8_slice_bytes(long slice_ptr);
146 public static native long bytes_to_u8_vec(byte[] bytes);
147 public static native long new_txpointer_copy_data(byte[] txdata);
148 public static native void txpointer_free(long ptr);
149 public static native byte[] txpointer_get_buffer(long ptr);
150 public static native long vec_slice_len(long vec);
151 public static native long new_empty_slice_vec();
152 */
153
154         public static native long LDKCVec_u8Z_new(number[] elems);
155         // struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing)
156         export function TxOut_get_script_pubkey(thing: number): Uint8Array {
157                 if(!isWasmInitialized) {
158                         throw new Error("initializeWasm() must be awaited first!");
159                 }
160                 const nativeResponseValue = wasm.TxOut_get_script_pubkey(thing);
161                 return decodeArray(nativeResponseValue);
162         }
163         // uint64_t TxOut_get_value (struct LDKTxOut* thing)
164         export function TxOut_get_value(thing: number): number {
165                 if(!isWasmInitialized) {
166                         throw new Error("initializeWasm() must be awaited first!");
167                 }
168                 const nativeResponseValue = wasm.TxOut_get_value(thing);
169                 return nativeResponseValue;
170         }
171         public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
172         public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
173         public static native Secp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
174         public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
175         public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
176         public static native Secp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
177         public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
178         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
179         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
180         public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
181         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
182         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
183         public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
184         public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
185         public static native Secp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
186         public static class LDKCOption_u32Z {
187                 private LDKCOption_u32Z() {}
188                 export class Some extends LDKCOption_u32Z {
189                         public number some;
190                         Some(number some) { this.some = some; }
191                 }
192                 export class None extends LDKCOption_u32Z {
193                         None() { }
194                 }
195                 static native void init();
196         }
197         static { LDKCOption_u32Z.init(); }
198         public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
199         public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
200         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
201         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
202         public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
203         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
204         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
205         public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
206         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
207         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
208         public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
209         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
210         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
211         public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
212         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
213         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
214         public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
215         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
216         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
217         public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
218         public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
219         public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
220         public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
221         public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
222         public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
223         public static native boolean LDKCResult_ShutdownScriptDecodeErrorZ_result_ok(long arg);
224         public static native number LDKCResult_ShutdownScriptDecodeErrorZ_get_ok(long arg);
225         public static native number LDKCResult_ShutdownScriptDecodeErrorZ_get_err(long arg);
226         public static native boolean LDKCResult_ShutdownScriptInvalidShutdownScriptZ_result_ok(long arg);
227         public static native number LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(long arg);
228         public static native number LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_err(long arg);
229         public static native boolean LDKCResult_NoneErrorZ_result_ok(long arg);
230         public static native void LDKCResult_NoneErrorZ_get_ok(long arg);
231         public static native IOError LDKCResult_NoneErrorZ_get_err(long arg);
232         public static native boolean LDKCResult_RouteHopDecodeErrorZ_result_ok(long arg);
233         public static native number LDKCResult_RouteHopDecodeErrorZ_get_ok(long arg);
234         public static native number LDKCResult_RouteHopDecodeErrorZ_get_err(long arg);
235         public static native long LDKCVec_RouteHopZ_new(number[] elems);
236         public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
237         public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
238         public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
239         public static class LDKCOption_u64Z {
240                 private LDKCOption_u64Z() {}
241                 export class Some extends LDKCOption_u64Z {
242                         public number some;
243                         Some(number some) { this.some = some; }
244                 }
245                 export class None extends LDKCOption_u64Z {
246                         None() { }
247                 }
248                 static native void init();
249         }
250         static { LDKCOption_u64Z.init(); }
251         public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
252         public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
253         public static native long LDKCVec_RouteHintZ_new(number[] elems);
254         public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
255         public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
256         public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
257         public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
258         public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
259         public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
260         public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
261         public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
262         public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
263         public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
264         public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
265         public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
266         public static native ChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
267         public static class LDKMonitorEvent {
268                 private LDKMonitorEvent() {}
269                 export class HTLCEvent extends LDKMonitorEvent {
270                         public number htlc_event;
271                         HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
272                 }
273                 export class CommitmentTxBroadcasted extends LDKMonitorEvent {
274                         public number commitment_tx_broadcasted;
275                         CommitmentTxBroadcasted(number commitment_tx_broadcasted) { this.commitment_tx_broadcasted = commitment_tx_broadcasted; }
276                 }
277                 static native void init();
278         }
279         static { LDKMonitorEvent.init(); }
280         public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
281         public static native long LDKCVec_MonitorEventZ_new(number[] elems);
282         public static class LDKCOption_C2Tuple_usizeTransactionZZ {
283                 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
284                 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
285                         public number some;
286                         Some(number some) { this.some = some; }
287                 }
288                 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
289                         None() { }
290                 }
291                 static native void init();
292         }
293         static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
294         public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
295         public static class LDKSpendableOutputDescriptor {
296                 private LDKSpendableOutputDescriptor() {}
297                 export class StaticOutput extends LDKSpendableOutputDescriptor {
298                         public number outpoint;
299                         public number output;
300                         StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
301                 }
302                 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
303                         public number delayed_payment_output;
304                         DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
305                 }
306                 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
307                         public number static_payment_output;
308                         StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
309                 }
310                 static native void init();
311         }
312         static { LDKSpendableOutputDescriptor.init(); }
313         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
314         public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
315         public static class LDKErrorAction {
316                 private LDKErrorAction() {}
317                 export class DisconnectPeer extends LDKErrorAction {
318                         public number msg;
319                         DisconnectPeer(number msg) { this.msg = msg; }
320                 }
321                 export class IgnoreError extends LDKErrorAction {
322                         IgnoreError() { }
323                 }
324                 export class IgnoreAndLog extends LDKErrorAction {
325                         public Level ignore_and_log;
326                         IgnoreAndLog(Level ignore_and_log) { this.ignore_and_log = ignore_and_log; }
327                 }
328                 export class SendErrorMessage extends LDKErrorAction {
329                         public number msg;
330                         SendErrorMessage(number msg) { this.msg = msg; }
331                 }
332                 static native void init();
333         }
334         static { LDKErrorAction.init(); }
335         public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
336         public static class LDKHTLCFailChannelUpdate {
337                 private LDKHTLCFailChannelUpdate() {}
338                 export class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
339                         public number msg;
340                         ChannelUpdateMessage(number msg) { this.msg = msg; }
341                 }
342                 export class ChannelClosed extends LDKHTLCFailChannelUpdate {
343                         public number short_channel_id;
344                         public boolean is_permanent;
345                         ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
346                 }
347                 export class NodeFailure extends LDKHTLCFailChannelUpdate {
348                         public Uint8Array node_id;
349                         public boolean is_permanent;
350                         NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
351                 }
352                 static native void init();
353         }
354         static { LDKHTLCFailChannelUpdate.init(); }
355         public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
356         public static class LDKMessageSendEvent {
357                 private LDKMessageSendEvent() {}
358                 export class SendAcceptChannel extends LDKMessageSendEvent {
359                         public Uint8Array node_id;
360                         public number msg;
361                         SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
362                 }
363                 export class SendOpenChannel extends LDKMessageSendEvent {
364                         public Uint8Array node_id;
365                         public number msg;
366                         SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
367                 }
368                 export class SendFundingCreated extends LDKMessageSendEvent {
369                         public Uint8Array node_id;
370                         public number msg;
371                         SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
372                 }
373                 export class SendFundingSigned extends LDKMessageSendEvent {
374                         public Uint8Array node_id;
375                         public number msg;
376                         SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
377                 }
378                 export class SendFundingLocked extends LDKMessageSendEvent {
379                         public Uint8Array node_id;
380                         public number msg;
381                         SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
382                 }
383                 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
384                         public Uint8Array node_id;
385                         public number msg;
386                         SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
387                 }
388                 export class UpdateHTLCs extends LDKMessageSendEvent {
389                         public Uint8Array node_id;
390                         public number updates;
391                         UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
392                 }
393                 export class SendRevokeAndACK extends LDKMessageSendEvent {
394                         public Uint8Array node_id;
395                         public number msg;
396                         SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
397                 }
398                 export class SendClosingSigned extends LDKMessageSendEvent {
399                         public Uint8Array node_id;
400                         public number msg;
401                         SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
402                 }
403                 export class SendShutdown extends LDKMessageSendEvent {
404                         public Uint8Array node_id;
405                         public number msg;
406                         SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
407                 }
408                 export class SendChannelReestablish extends LDKMessageSendEvent {
409                         public Uint8Array node_id;
410                         public number msg;
411                         SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
412                 }
413                 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
414                         public number msg;
415                         public number update_msg;
416                         BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
417                 }
418                 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
419                         public number msg;
420                         BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
421                 }
422                 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
423                         public number msg;
424                         BroadcastChannelUpdate(number msg) { this.msg = msg; }
425                 }
426                 export class SendChannelUpdate extends LDKMessageSendEvent {
427                         public Uint8Array node_id;
428                         public number msg;
429                         SendChannelUpdate(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
430                 }
431                 export class HandleError extends LDKMessageSendEvent {
432                         public Uint8Array node_id;
433                         public number action;
434                         HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
435                 }
436                 export class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
437                         public number update;
438                         PaymentFailureNetworkUpdate(number update) { this.update = update; }
439                 }
440                 export class SendChannelRangeQuery extends LDKMessageSendEvent {
441                         public Uint8Array node_id;
442                         public number msg;
443                         SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
444                 }
445                 export class SendShortIdsQuery extends LDKMessageSendEvent {
446                         public Uint8Array node_id;
447                         public number msg;
448                         SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
449                 }
450                 export class SendReplyChannelRange extends LDKMessageSendEvent {
451                         public Uint8Array node_id;
452                         public number msg;
453                         SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
454                 }
455                 static native void init();
456         }
457         static { LDKMessageSendEvent.init(); }
458         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
459         public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
460         public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
461         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
462         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
463         public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
464         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
465         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
466         public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
467         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
468         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
469         public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
470         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
471         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
472         public static native boolean LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
473         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
474         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
475         public static native boolean LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
476         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
477         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
478         public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
479         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
480         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
481         public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
482         public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
483         public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
484         public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
485         public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
486         public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
487         public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
488         public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
489         public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
490
491
492
493 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
494
495                 export interface LDKBaseSign {
496                         get_per_commitment_point (idx: number): Uint8Array;
497                         release_commitment_secret (idx: number): Uint8Array;
498                         channel_keys_id (): Uint8Array;
499                         sign_counterparty_commitment (commitment_tx: number): number;
500                         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
501                         sign_justice_revoked_output (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number;
502                         sign_justice_revoked_htlc (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
503                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
504                         sign_closing_transaction (closing_tx: Uint8Array): number;
505                         sign_channel_announcement (msg: number): number;
506                         ready_channel (channel_parameters: number): void;
507                 }
508
509                 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
510             throw new Error('unimplemented'); // TODO: bind to WASM
511         }
512
513 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
514
515
516         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
517         export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
518                 if(!isWasmInitialized) {
519                         throw new Error("initializeWasm() must be awaited first!");
520                 }
521                 const nativeResponseValue = wasm.BaseSign_get_per_commitment_point(this_arg, idx);
522                 return decodeArray(nativeResponseValue);
523         }
524         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
525         export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
526                 if(!isWasmInitialized) {
527                         throw new Error("initializeWasm() must be awaited first!");
528                 }
529                 const nativeResponseValue = wasm.BaseSign_release_commitment_secret(this_arg, idx);
530                 return decodeArray(nativeResponseValue);
531         }
532         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
533         export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
534                 if(!isWasmInitialized) {
535                         throw new Error("initializeWasm() must be awaited first!");
536                 }
537                 const nativeResponseValue = wasm.BaseSign_channel_keys_id(this_arg);
538                 return decodeArray(nativeResponseValue);
539         }
540         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
541         export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
542                 if(!isWasmInitialized) {
543                         throw new Error("initializeWasm() must be awaited first!");
544                 }
545                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
546                 return nativeResponseValue;
547         }
548         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
549         export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
550                 if(!isWasmInitialized) {
551                         throw new Error("initializeWasm() must be awaited first!");
552                 }
553                 const nativeResponseValue = wasm.BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
554                 return nativeResponseValue;
555         }
556         // 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]
557         export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number {
558                 if(!isWasmInitialized) {
559                         throw new Error("initializeWasm() must be awaited first!");
560                 }
561                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_output(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key));
562                 return nativeResponseValue;
563         }
564         // 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
565         export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
566                 if(!isWasmInitialized) {
567                         throw new Error("initializeWasm() must be awaited first!");
568                 }
569                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_htlc(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
570                 return nativeResponseValue;
571         }
572         // 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
573         export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
574                 if(!isWasmInitialized) {
575                         throw new Error("initializeWasm() must be awaited first!");
576                 }
577                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
578                 return nativeResponseValue;
579         }
580         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
581         export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
582                 if(!isWasmInitialized) {
583                         throw new Error("initializeWasm() must be awaited first!");
584                 }
585                 const nativeResponseValue = wasm.BaseSign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
586                 return nativeResponseValue;
587         }
588         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
589         export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
590                 if(!isWasmInitialized) {
591                         throw new Error("initializeWasm() must be awaited first!");
592                 }
593                 const nativeResponseValue = wasm.BaseSign_sign_channel_announcement(this_arg, msg);
594                 return nativeResponseValue;
595         }
596         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
597         export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
598                 if(!isWasmInitialized) {
599                         throw new Error("initializeWasm() must be awaited first!");
600                 }
601                 const nativeResponseValue = wasm.BaseSign_ready_channel(this_arg, channel_parameters);
602                 // debug statements here
603         }
604         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
605         export function BaseSign_get_pubkeys(this_arg: number): number {
606                 if(!isWasmInitialized) {
607                         throw new Error("initializeWasm() must be awaited first!");
608                 }
609                 const nativeResponseValue = wasm.BaseSign_get_pubkeys(this_arg);
610                 return nativeResponseValue;
611         }
612
613
614
615 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
616
617                 export interface LDKSign {
618                         write (): Uint8Array;
619                 }
620
621                 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
622             throw new Error('unimplemented'); // TODO: bind to WASM
623         }
624
625 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
626
627
628         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
629         export function Sign_write(this_arg: number): Uint8Array {
630                 if(!isWasmInitialized) {
631                         throw new Error("initializeWasm() must be awaited first!");
632                 }
633                 const nativeResponseValue = wasm.Sign_write(this_arg);
634                 return decodeArray(nativeResponseValue);
635         }
636         public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
637         public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
638         public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
639         public static native boolean LDKCResult_RecoverableSignatureNoneZ_result_ok(long arg);
640         public static native Uint8Array LDKCResult_RecoverableSignatureNoneZ_get_ok(long arg);
641         public static native void LDKCResult_RecoverableSignatureNoneZ_get_err(long arg);
642         public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
643         public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
644         public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
645         public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
646         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
647         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
648         public static native long LDKCVec_TxOutZ_new(number[] elems);
649         public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
650         public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
651         public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
652         public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
653         public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
654         public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
655         public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(number[] elems);
656         public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
657         public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
658         public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
659         public static class LDKCOption_u16Z {
660                 private LDKCOption_u16Z() {}
661                 export class Some extends LDKCOption_u16Z {
662                         public number some;
663                         Some(number some) { this.some = some; }
664                 }
665                 export class None extends LDKCOption_u16Z {
666                         None() { }
667                 }
668                 static native void init();
669         }
670         static { LDKCOption_u16Z.init(); }
671         public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
672         public static class LDKAPIError {
673                 private LDKAPIError() {}
674                 export class APIMisuseError extends LDKAPIError {
675                         public String err;
676                         APIMisuseError(String err) { this.err = err; }
677                 }
678                 export class FeeRateTooHigh extends LDKAPIError {
679                         public String err;
680                         public number feerate;
681                         FeeRateTooHigh(String err, number feerate) { this.err = err; this.feerate = feerate; }
682                 }
683                 export class RouteError extends LDKAPIError {
684                         public String err;
685                         RouteError(String err) { this.err = err; }
686                 }
687                 export class ChannelUnavailable extends LDKAPIError {
688                         public String err;
689                         ChannelUnavailable(String err) { this.err = err; }
690                 }
691                 export class MonitorUpdateFailed extends LDKAPIError {
692                         MonitorUpdateFailed() { }
693                 }
694                 export class IncompatibleShutdownScript extends LDKAPIError {
695                         public number script;
696                         IncompatibleShutdownScript(number script) { this.script = script; }
697                 }
698                 static native void init();
699         }
700         static { LDKAPIError.init(); }
701         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
702         public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
703         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
704         public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
705         public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
706         public static native long LDKCVec_APIErrorZ_new(number[] elems);
707         public static class LDKPaymentSendFailure {
708                 private LDKPaymentSendFailure() {}
709                 export class ParameterError extends LDKPaymentSendFailure {
710                         public number parameter_error;
711                         ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
712                 }
713                 export class PathParameterError extends LDKPaymentSendFailure {
714                         public number[] path_parameter_error;
715                         PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
716                 }
717                 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
718                         public number[] all_failed_retry_safe;
719                         AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
720                 }
721                 export class PartialFailure extends LDKPaymentSendFailure {
722                         public number[] partial_failure;
723                         PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
724                 }
725                 static native void init();
726         }
727         static { LDKPaymentSendFailure.init(); }
728         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
729         public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
730         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
731         public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
732         public static native boolean LDKCResult_PaymentHashPaymentSendFailureZ_result_ok(long arg);
733         public static native Uint8Array LDKCResult_PaymentHashPaymentSendFailureZ_get_ok(long arg);
734         public static native number LDKCResult_PaymentHashPaymentSendFailureZ_get_err(long arg);
735         public static class LDKNetAddress {
736                 private LDKNetAddress() {}
737                 export class IPv4 extends LDKNetAddress {
738                         public Uint8Array addr;
739                         public number port;
740                         IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
741                 }
742                 export class IPv6 extends LDKNetAddress {
743                         public Uint8Array addr;
744                         public number port;
745                         IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
746                 }
747                 export class OnionV2 extends LDKNetAddress {
748                         public Uint8Array addr;
749                         public number port;
750                         OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
751                 }
752                 export class OnionV3 extends LDKNetAddress {
753                         public Uint8Array ed25519_pubkey;
754                         public number checksum;
755                         public number version;
756                         public number port;
757                         OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
758                 }
759                 static native void init();
760         }
761         static { LDKNetAddress.init(); }
762         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
763         public static native long LDKCVec_NetAddressZ_new(number[] elems);
764         public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(Uint8Array a, Uint8Array b);
765         public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(long ptr);
766         public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(long ptr);
767         public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
768         public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
769         public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
770         public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
771
772
773
774 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
775
776                 export interface LDKWatch {
777                         watch_channel (funding_txo: number, monitor: number): number;
778                         update_channel (funding_txo: number, update: number): number;
779                         release_pending_monitor_events (): number[];
780                 }
781
782                 export function LDKWatch_new(impl: LDKWatch): number {
783             throw new Error('unimplemented'); // TODO: bind to WASM
784         }
785
786 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
787
788
789         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
790         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
791                 if(!isWasmInitialized) {
792                         throw new Error("initializeWasm() must be awaited first!");
793                 }
794                 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
795                 return nativeResponseValue;
796         }
797         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
798         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
799                 if(!isWasmInitialized) {
800                         throw new Error("initializeWasm() must be awaited first!");
801                 }
802                 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
803                 return nativeResponseValue;
804         }
805         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
806         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
807                 if(!isWasmInitialized) {
808                         throw new Error("initializeWasm() must be awaited first!");
809                 }
810                 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
811                 return nativeResponseValue;
812         }
813
814
815
816 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
817
818                 export interface LDKBroadcasterInterface {
819                         broadcast_transaction (tx: Uint8Array): void;
820                 }
821
822                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
823             throw new Error('unimplemented'); // TODO: bind to WASM
824         }
825
826 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
827
828
829         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
830         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
831                 if(!isWasmInitialized) {
832                         throw new Error("initializeWasm() must be awaited first!");
833                 }
834                 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
835                 // debug statements here
836         }
837
838
839
840 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
841
842                 export interface LDKKeysInterface {
843                         get_node_secret (): Uint8Array;
844                         get_destination_script (): Uint8Array;
845                         get_shutdown_scriptpubkey (): number;
846                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
847                         get_secure_random_bytes (): Uint8Array;
848                         read_chan_signer (reader: Uint8Array): number;
849                         sign_invoice (invoice_preimage: Uint8Array): number;
850                 }
851
852                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
853             throw new Error('unimplemented'); // TODO: bind to WASM
854         }
855
856 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
857
858
859         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
860         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
861                 if(!isWasmInitialized) {
862                         throw new Error("initializeWasm() must be awaited first!");
863                 }
864                 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
865                 return decodeArray(nativeResponseValue);
866         }
867         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
868         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
869                 if(!isWasmInitialized) {
870                         throw new Error("initializeWasm() must be awaited first!");
871                 }
872                 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
873                 return decodeArray(nativeResponseValue);
874         }
875         // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
876         export function KeysInterface_get_shutdown_scriptpubkey(this_arg: number): number {
877                 if(!isWasmInitialized) {
878                         throw new Error("initializeWasm() must be awaited first!");
879                 }
880                 const nativeResponseValue = wasm.KeysInterface_get_shutdown_scriptpubkey(this_arg);
881                 return nativeResponseValue;
882         }
883         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
884         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
885                 if(!isWasmInitialized) {
886                         throw new Error("initializeWasm() must be awaited first!");
887                 }
888                 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
889                 return nativeResponseValue;
890         }
891         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
892         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
893                 if(!isWasmInitialized) {
894                         throw new Error("initializeWasm() must be awaited first!");
895                 }
896                 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
897                 return decodeArray(nativeResponseValue);
898         }
899         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
900         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
901                 if(!isWasmInitialized) {
902                         throw new Error("initializeWasm() must be awaited first!");
903                 }
904                 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
905                 return nativeResponseValue;
906         }
907         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
908         export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
909                 if(!isWasmInitialized) {
910                         throw new Error("initializeWasm() must be awaited first!");
911                 }
912                 const nativeResponseValue = wasm.KeysInterface_sign_invoice(this_arg, encodeArray(invoice_preimage));
913                 return nativeResponseValue;
914         }
915
916
917
918 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
919
920                 export interface LDKFeeEstimator {
921                         get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
922                 }
923
924                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
925             throw new Error('unimplemented'); // TODO: bind to WASM
926         }
927
928 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
929
930
931         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
932         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
933                 if(!isWasmInitialized) {
934                         throw new Error("initializeWasm() must be awaited first!");
935                 }
936                 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
937                 return nativeResponseValue;
938         }
939
940
941
942 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
943
944                 export interface LDKLogger {
945                         log (record: String): void;
946                 }
947
948                 export function LDKLogger_new(impl: LDKLogger): number {
949             throw new Error('unimplemented'); // TODO: bind to WASM
950         }
951
952 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
953
954
955         public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
956         public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
957         public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
958         public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
959         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
960         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
961         public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
962         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
963         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
964         public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
965         public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
966         public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
967         public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
968         public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
969         public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
970         public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
971         public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
972         public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
973         public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
974         public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
975         public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
976         public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(number a, Uint8Array b, number c);
977         public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long ptr);
978         public static native Uint8Array LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long ptr);
979         public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long ptr);
980         public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
981         public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
982         public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
983         public static native long LDKCVec_PrivateRouteZ_new(number[] elems);
984         public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
985         public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
986         public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
987         public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
988         public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
989         public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
990         public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
991         public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
992         public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
993         public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
994         public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
995         public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
996         public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
997         public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
998         public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
999         public static native boolean LDKCResult_PrivateRouteCreationErrorZ_result_ok(long arg);
1000         public static native number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
1001         public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
1002         public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
1003         public static native String LDKCResult_StringErrorZ_get_ok(long arg);
1004         public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
1005         public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
1006         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
1007         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
1008         public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
1009         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
1010         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
1011         public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
1012         public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
1013         public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
1014         public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
1015         public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
1016         public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
1017         public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
1018         public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
1019         public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
1020         public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
1021         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
1022         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
1023         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
1024         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
1025         public static class LDKPaymentPurpose {
1026                 private LDKPaymentPurpose() {}
1027                 export class InvoicePayment extends LDKPaymentPurpose {
1028                         public Uint8Array payment_preimage;
1029                         public Uint8Array payment_secret;
1030                         public number user_payment_id;
1031                         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; }
1032                 }
1033                 export class SpontaneousPayment extends LDKPaymentPurpose {
1034                         public Uint8Array spontaneous_payment;
1035                         SpontaneousPayment(Uint8Array spontaneous_payment) { this.spontaneous_payment = spontaneous_payment; }
1036                 }
1037                 static native void init();
1038         }
1039         static { LDKPaymentPurpose.init(); }
1040         public static native LDKPaymentPurpose LDKPaymentPurpose_ref_from_ptr(long ptr);
1041         public static class LDKEvent {
1042                 private LDKEvent() {}
1043                 export class FundingGenerationReady extends LDKEvent {
1044                         public Uint8Array temporary_channel_id;
1045                         public number channel_value_satoshis;
1046                         public Uint8Array output_script;
1047                         public number user_channel_id;
1048                         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; }
1049                 }
1050                 export class PaymentReceived extends LDKEvent {
1051                         public Uint8Array payment_hash;
1052                         public number amt;
1053                         public number purpose;
1054                         PaymentReceived(Uint8Array payment_hash, number amt, number purpose) { this.payment_hash = payment_hash; this.amt = amt; this.purpose = purpose; }
1055                 }
1056                 export class PaymentSent extends LDKEvent {
1057                         public Uint8Array payment_preimage;
1058                         PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
1059                 }
1060                 export class PaymentFailed extends LDKEvent {
1061                         public Uint8Array payment_hash;
1062                         public boolean rejected_by_dest;
1063                         PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
1064                 }
1065                 export class PendingHTLCsForwardable extends LDKEvent {
1066                         public number time_forwardable;
1067                         PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
1068                 }
1069                 export class SpendableOutputs extends LDKEvent {
1070                         public number[] outputs;
1071                         SpendableOutputs(number[] outputs) { this.outputs = outputs; }
1072                 }
1073                 export class PaymentForwarded extends LDKEvent {
1074                         public number fee_earned_msat;
1075                         public boolean claim_from_onchain_tx;
1076                         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; }
1077                 }
1078                 static native void init();
1079         }
1080         static { LDKEvent.init(); }
1081         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
1082         public static native long LDKCVec_EventZ_new(number[] elems);
1083         public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
1084         public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
1085         public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
1086         public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
1087         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
1088         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
1089         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
1090         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
1091         public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
1092         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
1093         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
1094         public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
1095         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
1096         public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
1097         public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
1098         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
1099         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
1100         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
1101         public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
1102         public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
1103         public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
1104         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
1105         public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
1106         public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
1107         public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
1108         public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
1109         public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
1110         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
1111         public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
1112         public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
1113         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
1114         public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
1115         public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
1116         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
1117         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
1118         public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
1119         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
1120         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
1121         public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
1122         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
1123         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
1124         public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
1125         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
1126         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
1127         public static native long LDKCVec_u64Z_new(number[] elems);
1128         public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
1129         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
1130         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
1131         public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
1132         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
1133         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
1134         public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
1135         public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
1136         public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
1137         public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
1138         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
1139         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
1140         public static native boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
1141         public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
1142         public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
1143         public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
1144         public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
1145         public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
1146         public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
1147         public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
1148         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
1149         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
1150         public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
1151         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
1152         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
1153         public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
1154         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
1155         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
1156         public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
1157         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
1158         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
1159         public static native boolean LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_result_ok(long arg);
1160         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(long arg);
1161         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(long arg);
1162         public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
1163         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
1164         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
1165         public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
1166         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
1167         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
1168         public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
1169         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1170         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1171         public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
1172         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1173         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1174         public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
1175         public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1176         public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
1177         public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
1178         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1179         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1180         public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
1181         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1182         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1183         public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
1184         public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1185         public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1186         public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
1187         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1188         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1189         public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
1190         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1191         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1192         public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
1193         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1194         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1195         public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
1196         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1197         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1198         public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
1199         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1200         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1201         public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
1202         public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1203         public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
1204         public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
1205         public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1206         public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
1207         public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1208         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1209         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1210         public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1211         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1212         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1213         public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
1214         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1215         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1216         public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
1217         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1218         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1219         public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
1220         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1221         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1222         public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1223         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1224         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1225         public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1226         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1227         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1228         public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1229         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1230         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1231         public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1232         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1233         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1234         public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1235         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1236         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1237         public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1238         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1239         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1240         public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1241         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1242         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1243         public static class LDKSignOrCreationError {
1244                 private LDKSignOrCreationError() {}
1245                 export class SignError extends LDKSignOrCreationError {
1246                         SignError() { }
1247                 }
1248                 export class CreationError extends LDKSignOrCreationError {
1249                         public CreationError creation_error;
1250                         CreationError(CreationError creation_error) { this.creation_error = creation_error; }
1251                 }
1252                 static native void init();
1253         }
1254         static { LDKSignOrCreationError.init(); }
1255         public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1256         public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
1257         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
1258         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
1259
1260
1261
1262 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1263
1264                 export interface LDKMessageSendEventsProvider {
1265                         get_and_clear_pending_msg_events (): number[];
1266                 }
1267
1268                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1269             throw new Error('unimplemented'); // TODO: bind to WASM
1270         }
1271
1272 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1273
1274
1275         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1276         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1277                 if(!isWasmInitialized) {
1278                         throw new Error("initializeWasm() must be awaited first!");
1279                 }
1280                 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1281                 return nativeResponseValue;
1282         }
1283
1284
1285
1286 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1287
1288                 export interface LDKEventHandler {
1289                         handle_event (event: number): void;
1290                 }
1291
1292                 export function LDKEventHandler_new(impl: LDKEventHandler): number {
1293             throw new Error('unimplemented'); // TODO: bind to WASM
1294         }
1295
1296 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1297
1298
1299         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, struct LDKEvent event
1300         export function EventHandler_handle_event(this_arg: number, event: number): void {
1301                 if(!isWasmInitialized) {
1302                         throw new Error("initializeWasm() must be awaited first!");
1303                 }
1304                 const nativeResponseValue = wasm.EventHandler_handle_event(this_arg, event);
1305                 // debug statements here
1306         }
1307
1308
1309
1310 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1311
1312                 export interface LDKEventsProvider {
1313                         process_pending_events (handler: number): void;
1314                 }
1315
1316                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1317             throw new Error('unimplemented'); // TODO: bind to WASM
1318         }
1319
1320 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1321
1322
1323         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1324         export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
1325                 if(!isWasmInitialized) {
1326                         throw new Error("initializeWasm() must be awaited first!");
1327                 }
1328                 const nativeResponseValue = wasm.EventsProvider_process_pending_events(this_arg, handler);
1329                 // debug statements here
1330         }
1331
1332
1333
1334 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1335
1336                 export interface LDKAccess {
1337                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1338                 }
1339
1340                 export function LDKAccess_new(impl: LDKAccess): number {
1341             throw new Error('unimplemented'); // TODO: bind to WASM
1342         }
1343
1344 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1345
1346
1347         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1348         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1349                 if(!isWasmInitialized) {
1350                         throw new Error("initializeWasm() must be awaited first!");
1351                 }
1352                 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1353                 return nativeResponseValue;
1354         }
1355
1356
1357
1358 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1359
1360                 export interface LDKListen {
1361                         block_connected (block: Uint8Array, height: number): void;
1362                         block_disconnected (header: Uint8Array, height: number): void;
1363                 }
1364
1365                 export function LDKListen_new(impl: LDKListen): number {
1366             throw new Error('unimplemented'); // TODO: bind to WASM
1367         }
1368
1369 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1370
1371
1372         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1373         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1374                 if(!isWasmInitialized) {
1375                         throw new Error("initializeWasm() must be awaited first!");
1376                 }
1377                 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1378                 // debug statements here
1379         }
1380         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1381         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1382                 if(!isWasmInitialized) {
1383                         throw new Error("initializeWasm() must be awaited first!");
1384                 }
1385                 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1386                 // debug statements here
1387         }
1388
1389
1390
1391 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1392
1393                 export interface LDKConfirm {
1394                         transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
1395                         transaction_unconfirmed (txid: Uint8Array): void;
1396                         best_block_updated (header: Uint8Array, height: number): void;
1397                         get_relevant_txids (): Uint8Array[];
1398                 }
1399
1400                 export function LDKConfirm_new(impl: LDKConfirm): number {
1401             throw new Error('unimplemented'); // TODO: bind to WASM
1402         }
1403
1404 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1405
1406
1407         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1408         export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
1409                 if(!isWasmInitialized) {
1410                         throw new Error("initializeWasm() must be awaited first!");
1411                 }
1412                 const nativeResponseValue = wasm.Confirm_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
1413                 // debug statements here
1414         }
1415         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1416         export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
1417                 if(!isWasmInitialized) {
1418                         throw new Error("initializeWasm() must be awaited first!");
1419                 }
1420                 const nativeResponseValue = wasm.Confirm_transaction_unconfirmed(this_arg, encodeArray(txid));
1421                 // debug statements here
1422         }
1423         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1424         export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
1425                 if(!isWasmInitialized) {
1426                         throw new Error("initializeWasm() must be awaited first!");
1427                 }
1428                 const nativeResponseValue = wasm.Confirm_best_block_updated(this_arg, encodeArray(header), height);
1429                 // debug statements here
1430         }
1431         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1432         export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
1433                 if(!isWasmInitialized) {
1434                         throw new Error("initializeWasm() must be awaited first!");
1435                 }
1436                 const nativeResponseValue = wasm.Confirm_get_relevant_txids(this_arg);
1437                 return nativeResponseValue;
1438         }
1439
1440
1441
1442 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1443
1444                 export interface LDKFilter {
1445                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1446                         register_output (output: number): number;
1447                 }
1448
1449                 export function LDKFilter_new(impl: LDKFilter): number {
1450             throw new Error('unimplemented'); // TODO: bind to WASM
1451         }
1452
1453 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1454
1455
1456         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1457         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1458                 if(!isWasmInitialized) {
1459                         throw new Error("initializeWasm() must be awaited first!");
1460                 }
1461                 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1462                 // debug statements here
1463         }
1464         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1465         export function Filter_register_output(this_arg: number, output: number): number {
1466                 if(!isWasmInitialized) {
1467                         throw new Error("initializeWasm() must be awaited first!");
1468                 }
1469                 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1470                 return nativeResponseValue;
1471         }
1472
1473
1474
1475 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1476
1477                 export interface LDKPersist {
1478                         persist_new_channel (id: number, data: number): number;
1479                         update_persisted_channel (id: number, update: number, data: number): number;
1480                 }
1481
1482                 export function LDKPersist_new(impl: LDKPersist): number {
1483             throw new Error('unimplemented'); // TODO: bind to WASM
1484         }
1485
1486 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1487
1488
1489         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1490         export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1491                 if(!isWasmInitialized) {
1492                         throw new Error("initializeWasm() must be awaited first!");
1493                 }
1494                 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1495                 return nativeResponseValue;
1496         }
1497         // 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
1498         export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1499                 if(!isWasmInitialized) {
1500                         throw new Error("initializeWasm() must be awaited first!");
1501                 }
1502                 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1503                 return nativeResponseValue;
1504         }
1505
1506
1507
1508 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1509
1510                 export interface LDKChannelMessageHandler {
1511                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1512                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1513                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1514                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1515                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1516                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1517                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1518                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1519                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1520                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1521                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1522                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1523                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1524                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1525                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1526                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1527                         peer_connected (their_node_id: Uint8Array, msg: number): void;
1528                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1529                         handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1530                         handle_error (their_node_id: Uint8Array, msg: number): void;
1531                 }
1532
1533                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1534             throw new Error('unimplemented'); // TODO: bind to WASM
1535         }
1536
1537 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1538
1539
1540         // 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
1541         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1542                 if(!isWasmInitialized) {
1543                         throw new Error("initializeWasm() must be awaited first!");
1544                 }
1545                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1546                 // debug statements here
1547         }
1548         // 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
1549         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1550                 if(!isWasmInitialized) {
1551                         throw new Error("initializeWasm() must be awaited first!");
1552                 }
1553                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1554                 // debug statements here
1555         }
1556         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1557         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1558                 if(!isWasmInitialized) {
1559                         throw new Error("initializeWasm() must be awaited first!");
1560                 }
1561                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1562                 // debug statements here
1563         }
1564         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1565         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1566                 if(!isWasmInitialized) {
1567                         throw new Error("initializeWasm() must be awaited first!");
1568                 }
1569                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1570                 // debug statements here
1571         }
1572         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1573         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1574                 if(!isWasmInitialized) {
1575                         throw new Error("initializeWasm() must be awaited first!");
1576                 }
1577                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1578                 // debug statements here
1579         }
1580         // 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
1581         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1582                 if(!isWasmInitialized) {
1583                         throw new Error("initializeWasm() must be awaited first!");
1584                 }
1585                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1586                 // debug statements here
1587         }
1588         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1589         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1590                 if(!isWasmInitialized) {
1591                         throw new Error("initializeWasm() must be awaited first!");
1592                 }
1593                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1594                 // debug statements here
1595         }
1596         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1597         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1598                 if(!isWasmInitialized) {
1599                         throw new Error("initializeWasm() must be awaited first!");
1600                 }
1601                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1602                 // debug statements here
1603         }
1604         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1605         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1606                 if(!isWasmInitialized) {
1607                         throw new Error("initializeWasm() must be awaited first!");
1608                 }
1609                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1610                 // debug statements here
1611         }
1612         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1613         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1614                 if(!isWasmInitialized) {
1615                         throw new Error("initializeWasm() must be awaited first!");
1616                 }
1617                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1618                 // debug statements here
1619         }
1620         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1621         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1622                 if(!isWasmInitialized) {
1623                         throw new Error("initializeWasm() must be awaited first!");
1624                 }
1625                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1626                 // debug statements here
1627         }
1628         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1629         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1630                 if(!isWasmInitialized) {
1631                         throw new Error("initializeWasm() must be awaited first!");
1632                 }
1633                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1634                 // debug statements here
1635         }
1636         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1637         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1638                 if(!isWasmInitialized) {
1639                         throw new Error("initializeWasm() must be awaited first!");
1640                 }
1641                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1642                 // debug statements here
1643         }
1644         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1645         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1646                 if(!isWasmInitialized) {
1647                         throw new Error("initializeWasm() must be awaited first!");
1648                 }
1649                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1650                 // debug statements here
1651         }
1652         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1653         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1654                 if(!isWasmInitialized) {
1655                         throw new Error("initializeWasm() must be awaited first!");
1656                 }
1657                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1658                 // debug statements here
1659         }
1660         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1661         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1662                 if(!isWasmInitialized) {
1663                         throw new Error("initializeWasm() must be awaited first!");
1664                 }
1665                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1666                 // debug statements here
1667         }
1668         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1669         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1670                 if(!isWasmInitialized) {
1671                         throw new Error("initializeWasm() must be awaited first!");
1672                 }
1673                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1674                 // debug statements here
1675         }
1676         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1677         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1678                 if(!isWasmInitialized) {
1679                         throw new Error("initializeWasm() must be awaited first!");
1680                 }
1681                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1682                 // debug statements here
1683         }
1684         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
1685         export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1686                 if(!isWasmInitialized) {
1687                         throw new Error("initializeWasm() must be awaited first!");
1688                 }
1689                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
1690                 // debug statements here
1691         }
1692         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1693         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1694                 if(!isWasmInitialized) {
1695                         throw new Error("initializeWasm() must be awaited first!");
1696                 }
1697                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1698                 // debug statements here
1699         }
1700
1701
1702
1703 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1704
1705                 export interface LDKRoutingMessageHandler {
1706                         handle_node_announcement (msg: number): number;
1707                         handle_channel_announcement (msg: number): number;
1708                         handle_channel_update (msg: number): number;
1709                         handle_htlc_fail_channel_update (update: number): void;
1710                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1711                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1712                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
1713                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1714                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1715                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1716                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1717                 }
1718
1719                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1720             throw new Error('unimplemented'); // TODO: bind to WASM
1721         }
1722
1723 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1724
1725
1726         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1727         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1728                 if(!isWasmInitialized) {
1729                         throw new Error("initializeWasm() must be awaited first!");
1730                 }
1731                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1732                 return nativeResponseValue;
1733         }
1734         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1735         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1736                 if(!isWasmInitialized) {
1737                         throw new Error("initializeWasm() must be awaited first!");
1738                 }
1739                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1740                 return nativeResponseValue;
1741         }
1742         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1743         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1744                 if(!isWasmInitialized) {
1745                         throw new Error("initializeWasm() must be awaited first!");
1746                 }
1747                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1748                 return nativeResponseValue;
1749         }
1750         // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1751         export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1752                 if(!isWasmInitialized) {
1753                         throw new Error("initializeWasm() must be awaited first!");
1754                 }
1755                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1756                 // debug statements here
1757         }
1758         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1759         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1760                 if(!isWasmInitialized) {
1761                         throw new Error("initializeWasm() must be awaited first!");
1762                 }
1763                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1764                 return nativeResponseValue;
1765         }
1766         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1767         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1768                 if(!isWasmInitialized) {
1769                         throw new Error("initializeWasm() must be awaited first!");
1770                 }
1771                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1772                 return nativeResponseValue;
1773         }
1774         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1775         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1776                 if(!isWasmInitialized) {
1777                         throw new Error("initializeWasm() must be awaited first!");
1778                 }
1779                 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1780                 // debug statements here
1781         }
1782         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1783         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1784                 if(!isWasmInitialized) {
1785                         throw new Error("initializeWasm() must be awaited first!");
1786                 }
1787                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1788                 return nativeResponseValue;
1789         }
1790         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1791         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1792                 if(!isWasmInitialized) {
1793                         throw new Error("initializeWasm() must be awaited first!");
1794                 }
1795                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1796                 return nativeResponseValue;
1797         }
1798         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1799         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1800                 if(!isWasmInitialized) {
1801                         throw new Error("initializeWasm() must be awaited first!");
1802                 }
1803                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1804                 return nativeResponseValue;
1805         }
1806         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1807         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1808                 if(!isWasmInitialized) {
1809                         throw new Error("initializeWasm() must be awaited first!");
1810                 }
1811                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1812                 return nativeResponseValue;
1813         }
1814
1815
1816
1817 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1818
1819                 export interface LDKSocketDescriptor {
1820                         send_data (data: Uint8Array, resume_read: boolean): number;
1821                         disconnect_socket (): void;
1822                         eq (other_arg: number): boolean;
1823                         hash (): number;
1824                 }
1825
1826                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1827             throw new Error('unimplemented'); // TODO: bind to WASM
1828         }
1829
1830 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1831
1832
1833         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1834         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1835                 if(!isWasmInitialized) {
1836                         throw new Error("initializeWasm() must be awaited first!");
1837                 }
1838                 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1839                 return nativeResponseValue;
1840         }
1841         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1842         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1843                 if(!isWasmInitialized) {
1844                         throw new Error("initializeWasm() must be awaited first!");
1845                 }
1846                 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1847                 // debug statements here
1848         }
1849         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1850         export function SocketDescriptor_hash(this_arg: number): number {
1851                 if(!isWasmInitialized) {
1852                         throw new Error("initializeWasm() must be awaited first!");
1853                 }
1854                 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1855                 return nativeResponseValue;
1856         }
1857
1858
1859
1860 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1861
1862                 export interface LDKChannelManagerPersister {
1863                         persist_manager (channel_manager: number): number;
1864                 }
1865
1866                 export function LDKChannelManagerPersister_new(impl: LDKChannelManagerPersister): number {
1867             throw new Error('unimplemented'); // TODO: bind to WASM
1868         }
1869
1870 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1871
1872
1873         // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
1874         export function ChannelManagerPersister_persist_manager(this_arg: number, channel_manager: number): number {
1875                 if(!isWasmInitialized) {
1876                         throw new Error("initializeWasm() must be awaited first!");
1877                 }
1878                 const nativeResponseValue = wasm.ChannelManagerPersister_persist_manager(this_arg, channel_manager);
1879                 return nativeResponseValue;
1880         }
1881         public static class LDKFallback {
1882                 private LDKFallback() {}
1883                 export class SegWitProgram extends LDKFallback {
1884                         public number version;
1885                         public Uint8Array program;
1886                         SegWitProgram(number version, Uint8Array program) { this.version = version; this.program = program; }
1887                 }
1888                 export class PubKeyHash extends LDKFallback {
1889                         public Uint8Array pub_key_hash;
1890                         PubKeyHash(Uint8Array pub_key_hash) { this.pub_key_hash = pub_key_hash; }
1891                 }
1892                 export class ScriptHash extends LDKFallback {
1893                         public Uint8Array script_hash;
1894                         ScriptHash(Uint8Array script_hash) { this.script_hash = script_hash; }
1895                 }
1896                 static native void init();
1897         }
1898         static { LDKFallback.init(); }
1899         public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
1900         // struct LDKStr _ldk_get_compiled_version(void);
1901         export function _ldk_get_compiled_version(): String {
1902                 if(!isWasmInitialized) {
1903                         throw new Error("initializeWasm() must be awaited first!");
1904                 }
1905                 const nativeResponseValue = wasm._ldk_get_compiled_version();
1906                 return nativeResponseValue;
1907         }
1908         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
1909         export function _ldk_c_bindings_get_compiled_version(): String {
1910                 if(!isWasmInitialized) {
1911                         throw new Error("initializeWasm() must be awaited first!");
1912                 }
1913                 const nativeResponseValue = wasm._ldk_c_bindings_get_compiled_version();
1914                 return nativeResponseValue;
1915         }
1916         // void Transaction_free(struct LDKTransaction _res);
1917         export function Transaction_free(_res: Uint8Array): void {
1918                 if(!isWasmInitialized) {
1919                         throw new Error("initializeWasm() must be awaited first!");
1920                 }
1921                 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1922                 // debug statements here
1923         }
1924         // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
1925         export function TxOut_new(script_pubkey: Uint8Array, value: number): number {
1926                 if(!isWasmInitialized) {
1927                         throw new Error("initializeWasm() must be awaited first!");
1928                 }
1929                 const nativeResponseValue = wasm.TxOut_new(encodeArray(script_pubkey), value);
1930                 return nativeResponseValue;
1931         }
1932         // void TxOut_free(struct LDKTxOut _res);
1933         export function TxOut_free(_res: number): void {
1934                 if(!isWasmInitialized) {
1935                         throw new Error("initializeWasm() must be awaited first!");
1936                 }
1937                 const nativeResponseValue = wasm.TxOut_free(_res);
1938                 // debug statements here
1939         }
1940         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1941         export function TxOut_clone(orig: number): number {
1942                 if(!isWasmInitialized) {
1943                         throw new Error("initializeWasm() must be awaited first!");
1944                 }
1945                 const nativeResponseValue = wasm.TxOut_clone(orig);
1946                 return nativeResponseValue;
1947         }
1948         // void Str_free(struct LDKStr _res);
1949         export function Str_free(_res: String): void {
1950                 if(!isWasmInitialized) {
1951                         throw new Error("initializeWasm() must be awaited first!");
1952                 }
1953                 const nativeResponseValue = wasm.Str_free(_res);
1954                 // debug statements here
1955         }
1956         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1957         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1958                 if(!isWasmInitialized) {
1959                         throw new Error("initializeWasm() must be awaited first!");
1960                 }
1961                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1962                 return nativeResponseValue;
1963         }
1964         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1965         export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
1966                 if(!isWasmInitialized) {
1967                         throw new Error("initializeWasm() must be awaited first!");
1968                 }
1969                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1970                 return nativeResponseValue;
1971         }
1972         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1973         export function CResult_SecretKeyErrorZ_free(_res: number): void {
1974                 if(!isWasmInitialized) {
1975                         throw new Error("initializeWasm() must be awaited first!");
1976                 }
1977                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1978                 // debug statements here
1979         }
1980         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1981         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1982                 if(!isWasmInitialized) {
1983                         throw new Error("initializeWasm() must be awaited first!");
1984                 }
1985                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1986                 return nativeResponseValue;
1987         }
1988         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1989         export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
1990                 if(!isWasmInitialized) {
1991                         throw new Error("initializeWasm() must be awaited first!");
1992                 }
1993                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1994                 return nativeResponseValue;
1995         }
1996         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1997         export function CResult_PublicKeyErrorZ_free(_res: number): void {
1998                 if(!isWasmInitialized) {
1999                         throw new Error("initializeWasm() must be awaited first!");
2000                 }
2001                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
2002                 // debug statements here
2003         }
2004         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
2005         export function CResult_PublicKeyErrorZ_clone(orig: number): number {
2006                 if(!isWasmInitialized) {
2007                         throw new Error("initializeWasm() must be awaited first!");
2008                 }
2009                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
2010                 return nativeResponseValue;
2011         }
2012         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
2013         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
2014                 if(!isWasmInitialized) {
2015                         throw new Error("initializeWasm() must be awaited first!");
2016                 }
2017                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
2018                 return nativeResponseValue;
2019         }
2020         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
2021         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
2022                 if(!isWasmInitialized) {
2023                         throw new Error("initializeWasm() must be awaited first!");
2024                 }
2025                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
2026                 return nativeResponseValue;
2027         }
2028         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
2029         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
2030                 if(!isWasmInitialized) {
2031                         throw new Error("initializeWasm() must be awaited first!");
2032                 }
2033                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
2034                 // debug statements here
2035         }
2036         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
2037         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
2038                 if(!isWasmInitialized) {
2039                         throw new Error("initializeWasm() must be awaited first!");
2040                 }
2041                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
2042                 return nativeResponseValue;
2043         }
2044         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
2045         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
2046                 if(!isWasmInitialized) {
2047                         throw new Error("initializeWasm() must be awaited first!");
2048                 }
2049                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
2050                 return nativeResponseValue;
2051         }
2052         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
2053         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
2054                 if(!isWasmInitialized) {
2055                         throw new Error("initializeWasm() must be awaited first!");
2056                 }
2057                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
2058                 return nativeResponseValue;
2059         }
2060         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
2061         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
2062                 if(!isWasmInitialized) {
2063                         throw new Error("initializeWasm() must be awaited first!");
2064                 }
2065                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
2066                 // debug statements here
2067         }
2068         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
2069         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
2070                 if(!isWasmInitialized) {
2071                         throw new Error("initializeWasm() must be awaited first!");
2072                 }
2073                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
2074                 return nativeResponseValue;
2075         }
2076         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
2077         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
2078                 if(!isWasmInitialized) {
2079                         throw new Error("initializeWasm() must be awaited first!");
2080                 }
2081                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
2082                 return nativeResponseValue;
2083         }
2084         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
2085         export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
2086                 if(!isWasmInitialized) {
2087                         throw new Error("initializeWasm() must be awaited first!");
2088                 }
2089                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
2090                 return nativeResponseValue;
2091         }
2092         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
2093         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
2094                 if(!isWasmInitialized) {
2095                         throw new Error("initializeWasm() must be awaited first!");
2096                 }
2097                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
2098                 // debug statements here
2099         }
2100         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
2101         export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
2102                 if(!isWasmInitialized) {
2103                         throw new Error("initializeWasm() must be awaited first!");
2104                 }
2105                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
2106                 return nativeResponseValue;
2107         }
2108         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
2109         export function COption_u32Z_some(o: number): number {
2110                 if(!isWasmInitialized) {
2111                         throw new Error("initializeWasm() must be awaited first!");
2112                 }
2113                 const nativeResponseValue = wasm.COption_u32Z_some(o);
2114                 return nativeResponseValue;
2115         }
2116         // struct LDKCOption_u32Z COption_u32Z_none(void);
2117         export function COption_u32Z_none(): number {
2118                 if(!isWasmInitialized) {
2119                         throw new Error("initializeWasm() must be awaited first!");
2120                 }
2121                 const nativeResponseValue = wasm.COption_u32Z_none();
2122                 return nativeResponseValue;
2123         }
2124         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
2125         export function COption_u32Z_free(_res: number): void {
2126                 if(!isWasmInitialized) {
2127                         throw new Error("initializeWasm() must be awaited first!");
2128                 }
2129                 const nativeResponseValue = wasm.COption_u32Z_free(_res);
2130                 // debug statements here
2131         }
2132         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
2133         export function COption_u32Z_clone(orig: number): number {
2134                 if(!isWasmInitialized) {
2135                         throw new Error("initializeWasm() must be awaited first!");
2136                 }
2137                 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
2138                 return nativeResponseValue;
2139         }
2140         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
2141         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
2142                 if(!isWasmInitialized) {
2143                         throw new Error("initializeWasm() must be awaited first!");
2144                 }
2145                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
2146                 return nativeResponseValue;
2147         }
2148         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
2149         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
2150                 if(!isWasmInitialized) {
2151                         throw new Error("initializeWasm() must be awaited first!");
2152                 }
2153                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
2154                 return nativeResponseValue;
2155         }
2156         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
2157         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
2158                 if(!isWasmInitialized) {
2159                         throw new Error("initializeWasm() must be awaited first!");
2160                 }
2161                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
2162                 // debug statements here
2163         }
2164         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
2165         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
2166                 if(!isWasmInitialized) {
2167                         throw new Error("initializeWasm() must be awaited first!");
2168                 }
2169                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
2170                 return nativeResponseValue;
2171         }
2172         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
2173         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2174                 if(!isWasmInitialized) {
2175                         throw new Error("initializeWasm() must be awaited first!");
2176                 }
2177                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
2178                 return nativeResponseValue;
2179         }
2180         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2181         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2182                 if(!isWasmInitialized) {
2183                         throw new Error("initializeWasm() must be awaited first!");
2184                 }
2185                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
2186                 return nativeResponseValue;
2187         }
2188         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
2189         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2190                 if(!isWasmInitialized) {
2191                         throw new Error("initializeWasm() must be awaited first!");
2192                 }
2193                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
2194                 // debug statements here
2195         }
2196         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2197         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2198                 if(!isWasmInitialized) {
2199                         throw new Error("initializeWasm() must be awaited first!");
2200                 }
2201                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
2202                 return nativeResponseValue;
2203         }
2204         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
2205         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2206                 if(!isWasmInitialized) {
2207                         throw new Error("initializeWasm() must be awaited first!");
2208                 }
2209                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
2210                 return nativeResponseValue;
2211         }
2212         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2213         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2214                 if(!isWasmInitialized) {
2215                         throw new Error("initializeWasm() must be awaited first!");
2216                 }
2217                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
2218                 return nativeResponseValue;
2219         }
2220         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
2221         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2222                 if(!isWasmInitialized) {
2223                         throw new Error("initializeWasm() must be awaited first!");
2224                 }
2225                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
2226                 // debug statements here
2227         }
2228         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2229         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2230                 if(!isWasmInitialized) {
2231                         throw new Error("initializeWasm() must be awaited first!");
2232                 }
2233                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
2234                 return nativeResponseValue;
2235         }
2236         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
2237         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
2238                 if(!isWasmInitialized) {
2239                         throw new Error("initializeWasm() must be awaited first!");
2240                 }
2241                 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
2242                 // debug statements here
2243         }
2244         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
2245         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2246                 if(!isWasmInitialized) {
2247                         throw new Error("initializeWasm() must be awaited first!");
2248                 }
2249                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
2250                 return nativeResponseValue;
2251         }
2252         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2253         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
2254                 if(!isWasmInitialized) {
2255                         throw new Error("initializeWasm() must be awaited first!");
2256                 }
2257                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
2258                 return nativeResponseValue;
2259         }
2260         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
2261         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2262                 if(!isWasmInitialized) {
2263                         throw new Error("initializeWasm() must be awaited first!");
2264                 }
2265                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
2266                 // debug statements here
2267         }
2268         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2269         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2270                 if(!isWasmInitialized) {
2271                         throw new Error("initializeWasm() must be awaited first!");
2272                 }
2273                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
2274                 return nativeResponseValue;
2275         }
2276         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
2277         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2278                 if(!isWasmInitialized) {
2279                         throw new Error("initializeWasm() must be awaited first!");
2280                 }
2281                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
2282                 return nativeResponseValue;
2283         }
2284         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2285         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
2286                 if(!isWasmInitialized) {
2287                         throw new Error("initializeWasm() must be awaited first!");
2288                 }
2289                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
2290                 return nativeResponseValue;
2291         }
2292         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
2293         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2294                 if(!isWasmInitialized) {
2295                         throw new Error("initializeWasm() must be awaited first!");
2296                 }
2297                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
2298                 // debug statements here
2299         }
2300         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2301         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2302                 if(!isWasmInitialized) {
2303                         throw new Error("initializeWasm() must be awaited first!");
2304                 }
2305                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
2306                 return nativeResponseValue;
2307         }
2308         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
2309         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
2310                 if(!isWasmInitialized) {
2311                         throw new Error("initializeWasm() must be awaited first!");
2312                 }
2313                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
2314                 return nativeResponseValue;
2315         }
2316         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2317         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
2318                 if(!isWasmInitialized) {
2319                         throw new Error("initializeWasm() must be awaited first!");
2320                 }
2321                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
2322                 return nativeResponseValue;
2323         }
2324         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
2325         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
2326                 if(!isWasmInitialized) {
2327                         throw new Error("initializeWasm() must be awaited first!");
2328                 }
2329                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
2330                 // debug statements here
2331         }
2332         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2333         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2334                 if(!isWasmInitialized) {
2335                         throw new Error("initializeWasm() must be awaited first!");
2336                 }
2337                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
2338                 return nativeResponseValue;
2339         }
2340         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2341         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2342                 if(!isWasmInitialized) {
2343                         throw new Error("initializeWasm() must be awaited first!");
2344                 }
2345                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
2346                 return nativeResponseValue;
2347         }
2348         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
2349         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
2350                 if(!isWasmInitialized) {
2351                         throw new Error("initializeWasm() must be awaited first!");
2352                 }
2353                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2354                 return nativeResponseValue;
2355         }
2356         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2357         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2358                 if(!isWasmInitialized) {
2359                         throw new Error("initializeWasm() must be awaited first!");
2360                 }
2361                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2362                 // debug statements here
2363         }
2364         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
2365         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
2366                 if(!isWasmInitialized) {
2367                         throw new Error("initializeWasm() must be awaited first!");
2368                 }
2369                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
2370                 return nativeResponseValue;
2371         }
2372         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
2373         export function CResult_CVec_SignatureZNoneZ_err(): number {
2374                 if(!isWasmInitialized) {
2375                         throw new Error("initializeWasm() must be awaited first!");
2376                 }
2377                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
2378                 return nativeResponseValue;
2379         }
2380         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
2381         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
2382                 if(!isWasmInitialized) {
2383                         throw new Error("initializeWasm() must be awaited first!");
2384                 }
2385                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
2386                 // debug statements here
2387         }
2388         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
2389         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
2390                 if(!isWasmInitialized) {
2391                         throw new Error("initializeWasm() must be awaited first!");
2392                 }
2393                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
2394                 return nativeResponseValue;
2395         }
2396         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
2397         export function CResult_ShutdownScriptDecodeErrorZ_ok(o: number): number {
2398                 if(!isWasmInitialized) {
2399                         throw new Error("initializeWasm() must be awaited first!");
2400                 }
2401                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_ok(o);
2402                 return nativeResponseValue;
2403         }
2404         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
2405         export function CResult_ShutdownScriptDecodeErrorZ_err(e: number): number {
2406                 if(!isWasmInitialized) {
2407                         throw new Error("initializeWasm() must be awaited first!");
2408                 }
2409                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_err(e);
2410                 return nativeResponseValue;
2411         }
2412         // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
2413         export function CResult_ShutdownScriptDecodeErrorZ_free(_res: number): void {
2414                 if(!isWasmInitialized) {
2415                         throw new Error("initializeWasm() must be awaited first!");
2416                 }
2417                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_free(_res);
2418                 // debug statements here
2419         }
2420         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
2421         export function CResult_ShutdownScriptDecodeErrorZ_clone(orig: number): number {
2422                 if(!isWasmInitialized) {
2423                         throw new Error("initializeWasm() must be awaited first!");
2424                 }
2425                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_clone(orig);
2426                 return nativeResponseValue;
2427         }
2428         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
2429         export function CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o: number): number {
2430                 if(!isWasmInitialized) {
2431                         throw new Error("initializeWasm() must be awaited first!");
2432                 }
2433                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o);
2434                 return nativeResponseValue;
2435         }
2436         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
2437         export function CResult_ShutdownScriptInvalidShutdownScriptZ_err(e: number): number {
2438                 if(!isWasmInitialized) {
2439                         throw new Error("initializeWasm() must be awaited first!");
2440                 }
2441                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e);
2442                 return nativeResponseValue;
2443         }
2444         // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
2445         export function CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res: number): void {
2446                 if(!isWasmInitialized) {
2447                         throw new Error("initializeWasm() must be awaited first!");
2448                 }
2449                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res);
2450                 // debug statements here
2451         }
2452         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
2453         export function CResult_NoneErrorZ_ok(): number {
2454                 if(!isWasmInitialized) {
2455                         throw new Error("initializeWasm() must be awaited first!");
2456                 }
2457                 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
2458                 return nativeResponseValue;
2459         }
2460         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
2461         export function CResult_NoneErrorZ_err(e: IOError): number {
2462                 if(!isWasmInitialized) {
2463                         throw new Error("initializeWasm() must be awaited first!");
2464                 }
2465                 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
2466                 return nativeResponseValue;
2467         }
2468         // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
2469         export function CResult_NoneErrorZ_free(_res: number): void {
2470                 if(!isWasmInitialized) {
2471                         throw new Error("initializeWasm() must be awaited first!");
2472                 }
2473                 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
2474                 // debug statements here
2475         }
2476         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
2477         export function CResult_NoneErrorZ_clone(orig: number): number {
2478                 if(!isWasmInitialized) {
2479                         throw new Error("initializeWasm() must be awaited first!");
2480                 }
2481                 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
2482                 return nativeResponseValue;
2483         }
2484         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
2485         export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
2486                 if(!isWasmInitialized) {
2487                         throw new Error("initializeWasm() must be awaited first!");
2488                 }
2489                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
2490                 return nativeResponseValue;
2491         }
2492         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
2493         export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
2494                 if(!isWasmInitialized) {
2495                         throw new Error("initializeWasm() must be awaited first!");
2496                 }
2497                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
2498                 return nativeResponseValue;
2499         }
2500         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
2501         export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
2502                 if(!isWasmInitialized) {
2503                         throw new Error("initializeWasm() must be awaited first!");
2504                 }
2505                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
2506                 // debug statements here
2507         }
2508         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
2509         export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
2510                 if(!isWasmInitialized) {
2511                         throw new Error("initializeWasm() must be awaited first!");
2512                 }
2513                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
2514                 return nativeResponseValue;
2515         }
2516         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
2517         export function CVec_RouteHopZ_free(_res: number[]): void {
2518                 if(!isWasmInitialized) {
2519                         throw new Error("initializeWasm() must be awaited first!");
2520                 }
2521                 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
2522                 // debug statements here
2523         }
2524         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
2525         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
2526                 if(!isWasmInitialized) {
2527                         throw new Error("initializeWasm() must be awaited first!");
2528                 }
2529                 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
2530                 // debug statements here
2531         }
2532         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
2533         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
2534                 if(!isWasmInitialized) {
2535                         throw new Error("initializeWasm() must be awaited first!");
2536                 }
2537                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
2538                 return nativeResponseValue;
2539         }
2540         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
2541         export function CResult_RouteDecodeErrorZ_err(e: number): number {
2542                 if(!isWasmInitialized) {
2543                         throw new Error("initializeWasm() must be awaited first!");
2544                 }
2545                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
2546                 return nativeResponseValue;
2547         }
2548         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
2549         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
2550                 if(!isWasmInitialized) {
2551                         throw new Error("initializeWasm() must be awaited first!");
2552                 }
2553                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
2554                 // debug statements here
2555         }
2556         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
2557         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
2558                 if(!isWasmInitialized) {
2559                         throw new Error("initializeWasm() must be awaited first!");
2560                 }
2561                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
2562                 return nativeResponseValue;
2563         }
2564         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
2565         export function COption_u64Z_some(o: number): number {
2566                 if(!isWasmInitialized) {
2567                         throw new Error("initializeWasm() must be awaited first!");
2568                 }
2569                 const nativeResponseValue = wasm.COption_u64Z_some(o);
2570                 return nativeResponseValue;
2571         }
2572         // struct LDKCOption_u64Z COption_u64Z_none(void);
2573         export function COption_u64Z_none(): number {
2574                 if(!isWasmInitialized) {
2575                         throw new Error("initializeWasm() must be awaited first!");
2576                 }
2577                 const nativeResponseValue = wasm.COption_u64Z_none();
2578                 return nativeResponseValue;
2579         }
2580         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
2581         export function COption_u64Z_free(_res: number): void {
2582                 if(!isWasmInitialized) {
2583                         throw new Error("initializeWasm() must be awaited first!");
2584                 }
2585                 const nativeResponseValue = wasm.COption_u64Z_free(_res);
2586                 // debug statements here
2587         }
2588         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
2589         export function COption_u64Z_clone(orig: number): number {
2590                 if(!isWasmInitialized) {
2591                         throw new Error("initializeWasm() must be awaited first!");
2592                 }
2593                 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
2594                 return nativeResponseValue;
2595         }
2596         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2597         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
2598                 if(!isWasmInitialized) {
2599                         throw new Error("initializeWasm() must be awaited first!");
2600                 }
2601                 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
2602                 // debug statements here
2603         }
2604         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
2605         export function CVec_RouteHintZ_free(_res: number[]): void {
2606                 if(!isWasmInitialized) {
2607                         throw new Error("initializeWasm() must be awaited first!");
2608                 }
2609                 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
2610                 // debug statements here
2611         }
2612         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
2613         export function CResult_RouteLightningErrorZ_ok(o: number): number {
2614                 if(!isWasmInitialized) {
2615                         throw new Error("initializeWasm() must be awaited first!");
2616                 }
2617                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
2618                 return nativeResponseValue;
2619         }
2620         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
2621         export function CResult_RouteLightningErrorZ_err(e: number): number {
2622                 if(!isWasmInitialized) {
2623                         throw new Error("initializeWasm() must be awaited first!");
2624                 }
2625                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
2626                 return nativeResponseValue;
2627         }
2628         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
2629         export function CResult_RouteLightningErrorZ_free(_res: number): void {
2630                 if(!isWasmInitialized) {
2631                         throw new Error("initializeWasm() must be awaited first!");
2632                 }
2633                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
2634                 // debug statements here
2635         }
2636         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
2637         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
2638                 if(!isWasmInitialized) {
2639                         throw new Error("initializeWasm() must be awaited first!");
2640                 }
2641                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
2642                 return nativeResponseValue;
2643         }
2644         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2645         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2646                 if(!isWasmInitialized) {
2647                         throw new Error("initializeWasm() must be awaited first!");
2648                 }
2649                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2650                 return nativeResponseValue;
2651         }
2652         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2653         export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
2654                 if(!isWasmInitialized) {
2655                         throw new Error("initializeWasm() must be awaited first!");
2656                 }
2657                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2658                 return nativeResponseValue;
2659         }
2660         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2661         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2662                 if(!isWasmInitialized) {
2663                         throw new Error("initializeWasm() must be awaited first!");
2664                 }
2665                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2666                 // debug statements here
2667         }
2668         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2669         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2670                 if(!isWasmInitialized) {
2671                         throw new Error("initializeWasm() must be awaited first!");
2672                 }
2673                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2674                 return nativeResponseValue;
2675         }
2676         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
2677         export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
2678                 if(!isWasmInitialized) {
2679                         throw new Error("initializeWasm() must be awaited first!");
2680                 }
2681                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
2682                 return nativeResponseValue;
2683         }
2684         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2685         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2686                 if(!isWasmInitialized) {
2687                         throw new Error("initializeWasm() must be awaited first!");
2688                 }
2689                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2690                 return nativeResponseValue;
2691         }
2692         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2693         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2694                 if(!isWasmInitialized) {
2695                         throw new Error("initializeWasm() must be awaited first!");
2696                 }
2697                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2698                 // debug statements here
2699         }
2700         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2701         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2702                 if(!isWasmInitialized) {
2703                         throw new Error("initializeWasm() must be awaited first!");
2704                 }
2705                 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2706                 // debug statements here
2707         }
2708         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
2709         export function CVec_TxidZ_free(_res: Uint8Array[]): void {
2710                 if(!isWasmInitialized) {
2711                         throw new Error("initializeWasm() must be awaited first!");
2712                 }
2713                 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
2714                 // debug statements here
2715         }
2716         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2717         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2718                 if(!isWasmInitialized) {
2719                         throw new Error("initializeWasm() must be awaited first!");
2720                 }
2721                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2722                 return nativeResponseValue;
2723         }
2724         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2725         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
2726                 if(!isWasmInitialized) {
2727                         throw new Error("initializeWasm() must be awaited first!");
2728                 }
2729                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2730                 return nativeResponseValue;
2731         }
2732         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2733         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2734                 if(!isWasmInitialized) {
2735                         throw new Error("initializeWasm() must be awaited first!");
2736                 }
2737                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2738                 // debug statements here
2739         }
2740         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2741         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2742                 if(!isWasmInitialized) {
2743                         throw new Error("initializeWasm() must be awaited first!");
2744                 }
2745                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2746                 return nativeResponseValue;
2747         }
2748         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2749         export function CVec_MonitorEventZ_free(_res: number[]): void {
2750                 if(!isWasmInitialized) {
2751                         throw new Error("initializeWasm() must be awaited first!");
2752                 }
2753                 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2754                 // debug statements here
2755         }
2756         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
2757         export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
2758                 if(!isWasmInitialized) {
2759                         throw new Error("initializeWasm() must be awaited first!");
2760                 }
2761                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
2762                 return nativeResponseValue;
2763         }
2764         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
2765         export function COption_C2Tuple_usizeTransactionZZ_none(): number {
2766                 if(!isWasmInitialized) {
2767                         throw new Error("initializeWasm() must be awaited first!");
2768                 }
2769                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
2770                 return nativeResponseValue;
2771         }
2772         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
2773         export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
2774                 if(!isWasmInitialized) {
2775                         throw new Error("initializeWasm() must be awaited first!");
2776                 }
2777                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
2778                 // debug statements here
2779         }
2780         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
2781         export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
2782                 if(!isWasmInitialized) {
2783                         throw new Error("initializeWasm() must be awaited first!");
2784                 }
2785                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
2786                 return nativeResponseValue;
2787         }
2788         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2789         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
2790                 if(!isWasmInitialized) {
2791                         throw new Error("initializeWasm() must be awaited first!");
2792                 }
2793                 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
2794                 // debug statements here
2795         }
2796         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
2797         export function CVec_MessageSendEventZ_free(_res: number[]): void {
2798                 if(!isWasmInitialized) {
2799                         throw new Error("initializeWasm() must be awaited first!");
2800                 }
2801                 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
2802                 // debug statements here
2803         }
2804         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
2805         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
2806                 if(!isWasmInitialized) {
2807                         throw new Error("initializeWasm() must be awaited first!");
2808                 }
2809                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
2810                 return nativeResponseValue;
2811         }
2812         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2813         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
2814                 if(!isWasmInitialized) {
2815                         throw new Error("initializeWasm() must be awaited first!");
2816                 }
2817                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
2818                 return nativeResponseValue;
2819         }
2820         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
2821         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
2822                 if(!isWasmInitialized) {
2823                         throw new Error("initializeWasm() must be awaited first!");
2824                 }
2825                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
2826                 // debug statements here
2827         }
2828         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
2829         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
2830                 if(!isWasmInitialized) {
2831                         throw new Error("initializeWasm() must be awaited first!");
2832                 }
2833                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
2834                 return nativeResponseValue;
2835         }
2836         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2837         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
2838                 if(!isWasmInitialized) {
2839                         throw new Error("initializeWasm() must be awaited first!");
2840                 }
2841                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
2842                 return nativeResponseValue;
2843         }
2844         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
2845         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
2846                 if(!isWasmInitialized) {
2847                         throw new Error("initializeWasm() must be awaited first!");
2848                 }
2849                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
2850                 // debug statements here
2851         }
2852         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
2853         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
2854                 if(!isWasmInitialized) {
2855                         throw new Error("initializeWasm() must be awaited first!");
2856                 }
2857                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
2858                 return nativeResponseValue;
2859         }
2860         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2861         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
2862                 if(!isWasmInitialized) {
2863                         throw new Error("initializeWasm() must be awaited first!");
2864                 }
2865                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
2866                 return nativeResponseValue;
2867         }
2868         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
2869         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
2870                 if(!isWasmInitialized) {
2871                         throw new Error("initializeWasm() must be awaited first!");
2872                 }
2873                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
2874                 // debug statements here
2875         }
2876         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
2877         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
2878                 if(!isWasmInitialized) {
2879                         throw new Error("initializeWasm() must be awaited first!");
2880                 }
2881                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
2882                 return nativeResponseValue;
2883         }
2884         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2885         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
2886                 if(!isWasmInitialized) {
2887                         throw new Error("initializeWasm() must be awaited first!");
2888                 }
2889                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
2890                 return nativeResponseValue;
2891         }
2892         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
2893         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
2894                 if(!isWasmInitialized) {
2895                         throw new Error("initializeWasm() must be awaited first!");
2896                 }
2897                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
2898                 // debug statements here
2899         }
2900         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
2901         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
2902                 if(!isWasmInitialized) {
2903                         throw new Error("initializeWasm() must be awaited first!");
2904                 }
2905                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
2906                 return nativeResponseValue;
2907         }
2908         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2909         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
2910                 if(!isWasmInitialized) {
2911                         throw new Error("initializeWasm() must be awaited first!");
2912                 }
2913                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
2914                 return nativeResponseValue;
2915         }
2916         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
2917         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
2918                 if(!isWasmInitialized) {
2919                         throw new Error("initializeWasm() must be awaited first!");
2920                 }
2921                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
2922                 // debug statements here
2923         }
2924         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2925         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2926                 if(!isWasmInitialized) {
2927                         throw new Error("initializeWasm() must be awaited first!");
2928                 }
2929                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
2930                 return nativeResponseValue;
2931         }
2932         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
2933         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
2934                 if(!isWasmInitialized) {
2935                         throw new Error("initializeWasm() must be awaited first!");
2936                 }
2937                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
2938                 return nativeResponseValue;
2939         }
2940         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2941         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
2942                 if(!isWasmInitialized) {
2943                         throw new Error("initializeWasm() must be awaited first!");
2944                 }
2945                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
2946                 return nativeResponseValue;
2947         }
2948         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
2949         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
2950                 if(!isWasmInitialized) {
2951                         throw new Error("initializeWasm() must be awaited first!");
2952                 }
2953                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
2954                 // debug statements here
2955         }
2956         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2957         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2958                 if(!isWasmInitialized) {
2959                         throw new Error("initializeWasm() must be awaited first!");
2960                 }
2961                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
2962                 return nativeResponseValue;
2963         }
2964         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
2965         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
2966                 if(!isWasmInitialized) {
2967                         throw new Error("initializeWasm() must be awaited first!");
2968                 }
2969                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
2970                 return nativeResponseValue;
2971         }
2972         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2973         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
2974                 if(!isWasmInitialized) {
2975                         throw new Error("initializeWasm() must be awaited first!");
2976                 }
2977                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
2978                 return nativeResponseValue;
2979         }
2980         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
2981         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
2982                 if(!isWasmInitialized) {
2983                         throw new Error("initializeWasm() must be awaited first!");
2984                 }
2985                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
2986                 // debug statements here
2987         }
2988         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2989         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2990                 if(!isWasmInitialized) {
2991                         throw new Error("initializeWasm() must be awaited first!");
2992                 }
2993                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
2994                 return nativeResponseValue;
2995         }
2996         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
2997         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
2998                 if(!isWasmInitialized) {
2999                         throw new Error("initializeWasm() must be awaited first!");
3000                 }
3001                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
3002                 return nativeResponseValue;
3003         }
3004         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
3005         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
3006                 if(!isWasmInitialized) {
3007                         throw new Error("initializeWasm() must be awaited first!");
3008                 }
3009                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
3010                 return nativeResponseValue;
3011         }
3012         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
3013         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
3014                 if(!isWasmInitialized) {
3015                         throw new Error("initializeWasm() must be awaited first!");
3016                 }
3017                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
3018                 // debug statements here
3019         }
3020         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
3021         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
3022                 if(!isWasmInitialized) {
3023                         throw new Error("initializeWasm() must be awaited first!");
3024                 }
3025                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
3026                 return nativeResponseValue;
3027         }
3028         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
3029         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
3030                 if(!isWasmInitialized) {
3031                         throw new Error("initializeWasm() must be awaited first!");
3032                 }
3033                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
3034                 return nativeResponseValue;
3035         }
3036         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
3037         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
3038                 if(!isWasmInitialized) {
3039                         throw new Error("initializeWasm() must be awaited first!");
3040                 }
3041                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
3042                 // debug statements here
3043         }
3044         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
3045         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
3046                 if(!isWasmInitialized) {
3047                         throw new Error("initializeWasm() must be awaited first!");
3048                 }
3049                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
3050                 return nativeResponseValue;
3051         }
3052         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
3053         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
3054                 if(!isWasmInitialized) {
3055                         throw new Error("initializeWasm() must be awaited first!");
3056                 }
3057                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
3058                 return nativeResponseValue;
3059         }
3060         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
3061         export function CResult_SignatureNoneZ_err(): number {
3062                 if(!isWasmInitialized) {
3063                         throw new Error("initializeWasm() must be awaited first!");
3064                 }
3065                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
3066                 return nativeResponseValue;
3067         }
3068         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
3069         export function CResult_SignatureNoneZ_free(_res: number): void {
3070                 if(!isWasmInitialized) {
3071                         throw new Error("initializeWasm() must be awaited first!");
3072                 }
3073                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
3074                 // debug statements here
3075         }
3076         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
3077         export function CResult_SignatureNoneZ_clone(orig: number): number {
3078                 if(!isWasmInitialized) {
3079                         throw new Error("initializeWasm() must be awaited first!");
3080                 }
3081                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
3082                 return nativeResponseValue;
3083         }
3084         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
3085         export function CResult_SignDecodeErrorZ_ok(o: number): number {
3086                 if(!isWasmInitialized) {
3087                         throw new Error("initializeWasm() must be awaited first!");
3088                 }
3089                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
3090                 return nativeResponseValue;
3091         }
3092         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
3093         export function CResult_SignDecodeErrorZ_err(e: number): number {
3094                 if(!isWasmInitialized) {
3095                         throw new Error("initializeWasm() must be awaited first!");
3096                 }
3097                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
3098                 return nativeResponseValue;
3099         }
3100         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
3101         export function CResult_SignDecodeErrorZ_free(_res: number): void {
3102                 if(!isWasmInitialized) {
3103                         throw new Error("initializeWasm() must be awaited first!");
3104                 }
3105                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
3106                 // debug statements here
3107         }
3108         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
3109         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
3110                 if(!isWasmInitialized) {
3111                         throw new Error("initializeWasm() must be awaited first!");
3112                 }
3113                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
3114                 return nativeResponseValue;
3115         }
3116         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
3117         export function CVec_u8Z_free(_res: Uint8Array): void {
3118                 if(!isWasmInitialized) {
3119                         throw new Error("initializeWasm() must be awaited first!");
3120                 }
3121                 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
3122                 // debug statements here
3123         }
3124         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
3125         export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
3126                 if(!isWasmInitialized) {
3127                         throw new Error("initializeWasm() must be awaited first!");
3128                 }
3129                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_ok(encodeArray(arg));
3130                 return nativeResponseValue;
3131         }
3132         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
3133         export function CResult_RecoverableSignatureNoneZ_err(): number {
3134                 if(!isWasmInitialized) {
3135                         throw new Error("initializeWasm() must be awaited first!");
3136                 }
3137                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_err();
3138                 return nativeResponseValue;
3139         }
3140         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
3141         export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
3142                 if(!isWasmInitialized) {
3143                         throw new Error("initializeWasm() must be awaited first!");
3144                 }
3145                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_free(_res);
3146                 // debug statements here
3147         }
3148         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
3149         export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
3150                 if(!isWasmInitialized) {
3151                         throw new Error("initializeWasm() must be awaited first!");
3152                 }
3153                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone(orig);
3154                 return nativeResponseValue;
3155         }
3156         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3157         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3158                 if(!isWasmInitialized) {
3159                         throw new Error("initializeWasm() must be awaited first!");
3160                 }
3161                 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3162                 // debug statements here
3163         }
3164         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3165         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3166                 if(!isWasmInitialized) {
3167                         throw new Error("initializeWasm() must be awaited first!");
3168                 }
3169                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3170                 return nativeResponseValue;
3171         }
3172         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3173         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3174                 if(!isWasmInitialized) {
3175                         throw new Error("initializeWasm() must be awaited first!");
3176                 }
3177                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3178                 return nativeResponseValue;
3179         }
3180         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3181         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3182                 if(!isWasmInitialized) {
3183                         throw new Error("initializeWasm() must be awaited first!");
3184                 }
3185                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3186                 // debug statements here
3187         }
3188         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3189         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3190                 if(!isWasmInitialized) {
3191                         throw new Error("initializeWasm() must be awaited first!");
3192                 }
3193                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3194                 return nativeResponseValue;
3195         }
3196         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3197         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3198                 if(!isWasmInitialized) {
3199                         throw new Error("initializeWasm() must be awaited first!");
3200                 }
3201                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3202                 return nativeResponseValue;
3203         }
3204         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3205         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3206                 if(!isWasmInitialized) {
3207                         throw new Error("initializeWasm() must be awaited first!");
3208                 }
3209                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3210                 return nativeResponseValue;
3211         }
3212         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3213         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3214                 if(!isWasmInitialized) {
3215                         throw new Error("initializeWasm() must be awaited first!");
3216                 }
3217                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3218                 // debug statements here
3219         }
3220         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3221         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3222                 if(!isWasmInitialized) {
3223                         throw new Error("initializeWasm() must be awaited first!");
3224                 }
3225                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3226                 return nativeResponseValue;
3227         }
3228         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3229         export function CVec_TxOutZ_free(_res: number[]): void {
3230                 if(!isWasmInitialized) {
3231                         throw new Error("initializeWasm() must be awaited first!");
3232                 }
3233                 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3234                 // debug statements here
3235         }
3236         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3237         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3238                 if(!isWasmInitialized) {
3239                         throw new Error("initializeWasm() must be awaited first!");
3240                 }
3241                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3242                 return nativeResponseValue;
3243         }
3244         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3245         export function CResult_TransactionNoneZ_err(): number {
3246                 if(!isWasmInitialized) {
3247                         throw new Error("initializeWasm() must be awaited first!");
3248                 }
3249                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3250                 return nativeResponseValue;
3251         }
3252         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3253         export function CResult_TransactionNoneZ_free(_res: number): void {
3254                 if(!isWasmInitialized) {
3255                         throw new Error("initializeWasm() must be awaited first!");
3256                 }
3257                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3258                 // debug statements here
3259         }
3260         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
3261         export function CResult_TransactionNoneZ_clone(orig: number): number {
3262                 if(!isWasmInitialized) {
3263                         throw new Error("initializeWasm() must be awaited first!");
3264                 }
3265                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
3266                 return nativeResponseValue;
3267         }
3268         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
3269         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
3270                 if(!isWasmInitialized) {
3271                         throw new Error("initializeWasm() must be awaited first!");
3272                 }
3273                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
3274                 return nativeResponseValue;
3275         }
3276         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
3277         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
3278                 if(!isWasmInitialized) {
3279                         throw new Error("initializeWasm() must be awaited first!");
3280                 }
3281                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
3282                 // debug statements here
3283         }
3284         // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
3285         export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
3286                 if(!isWasmInitialized) {
3287                         throw new Error("initializeWasm() must be awaited first!");
3288                 }
3289                 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
3290                 // debug statements here
3291         }
3292         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
3293         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
3294                 if(!isWasmInitialized) {
3295                         throw new Error("initializeWasm() must be awaited first!");
3296                 }
3297                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
3298                 return nativeResponseValue;
3299         }
3300         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
3301         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: IOError): number {
3302                 if(!isWasmInitialized) {
3303                         throw new Error("initializeWasm() must be awaited first!");
3304                 }
3305                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
3306                 return nativeResponseValue;
3307         }
3308         // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
3309         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
3310                 if(!isWasmInitialized) {
3311                         throw new Error("initializeWasm() must be awaited first!");
3312                 }
3313                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
3314                 // debug statements here
3315         }
3316         // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
3317         export function COption_u16Z_some(o: number): number {
3318                 if(!isWasmInitialized) {
3319                         throw new Error("initializeWasm() must be awaited first!");
3320                 }
3321                 const nativeResponseValue = wasm.COption_u16Z_some(o);
3322                 return nativeResponseValue;
3323         }
3324         // struct LDKCOption_u16Z COption_u16Z_none(void);
3325         export function COption_u16Z_none(): number {
3326                 if(!isWasmInitialized) {
3327                         throw new Error("initializeWasm() must be awaited first!");
3328                 }
3329                 const nativeResponseValue = wasm.COption_u16Z_none();
3330                 return nativeResponseValue;
3331         }
3332         // void COption_u16Z_free(struct LDKCOption_u16Z _res);
3333         export function COption_u16Z_free(_res: number): void {
3334                 if(!isWasmInitialized) {
3335                         throw new Error("initializeWasm() must be awaited first!");
3336                 }
3337                 const nativeResponseValue = wasm.COption_u16Z_free(_res);
3338                 // debug statements here
3339         }
3340         // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
3341         export function COption_u16Z_clone(orig: number): number {
3342                 if(!isWasmInitialized) {
3343                         throw new Error("initializeWasm() must be awaited first!");
3344                 }
3345                 const nativeResponseValue = wasm.COption_u16Z_clone(orig);
3346                 return nativeResponseValue;
3347         }
3348         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
3349         export function CResult_NoneAPIErrorZ_ok(): number {
3350                 if(!isWasmInitialized) {
3351                         throw new Error("initializeWasm() must be awaited first!");
3352                 }
3353                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
3354                 return nativeResponseValue;
3355         }
3356         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
3357         export function CResult_NoneAPIErrorZ_err(e: number): number {
3358                 if(!isWasmInitialized) {
3359                         throw new Error("initializeWasm() must be awaited first!");
3360                 }
3361                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
3362                 return nativeResponseValue;
3363         }
3364         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
3365         export function CResult_NoneAPIErrorZ_free(_res: number): void {
3366                 if(!isWasmInitialized) {
3367                         throw new Error("initializeWasm() must be awaited first!");
3368                 }
3369                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
3370                 // debug statements here
3371         }
3372         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
3373         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
3374                 if(!isWasmInitialized) {
3375                         throw new Error("initializeWasm() must be awaited first!");
3376                 }
3377                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
3378                 return nativeResponseValue;
3379         }
3380         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
3381         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
3382                 if(!isWasmInitialized) {
3383                         throw new Error("initializeWasm() must be awaited first!");
3384                 }
3385                 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
3386                 // debug statements here
3387         }
3388         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
3389         export function CVec_APIErrorZ_free(_res: number[]): void {
3390                 if(!isWasmInitialized) {
3391                         throw new Error("initializeWasm() must be awaited first!");
3392                 }
3393                 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
3394                 // debug statements here
3395         }
3396         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
3397         export function CResult_NonePaymentSendFailureZ_ok(): number {
3398                 if(!isWasmInitialized) {
3399                         throw new Error("initializeWasm() must be awaited first!");
3400                 }
3401                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
3402                 return nativeResponseValue;
3403         }
3404         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3405         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
3406                 if(!isWasmInitialized) {
3407                         throw new Error("initializeWasm() must be awaited first!");
3408                 }
3409                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
3410                 return nativeResponseValue;
3411         }
3412         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
3413         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
3414                 if(!isWasmInitialized) {
3415                         throw new Error("initializeWasm() must be awaited first!");
3416                 }
3417                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
3418                 // debug statements here
3419         }
3420         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
3421         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
3422                 if(!isWasmInitialized) {
3423                         throw new Error("initializeWasm() must be awaited first!");
3424                 }
3425                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
3426                 return nativeResponseValue;
3427         }
3428         // struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
3429         export function CResult_PaymentHashPaymentSendFailureZ_ok(o: Uint8Array): number {
3430                 if(!isWasmInitialized) {
3431                         throw new Error("initializeWasm() must be awaited first!");
3432                 }
3433                 const nativeResponseValue = wasm.CResult_PaymentHashPaymentSendFailureZ_ok(encodeArray(o));
3434                 return nativeResponseValue;
3435         }
3436         // struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3437         export function CResult_PaymentHashPaymentSendFailureZ_err(e: number): number {
3438                 if(!isWasmInitialized) {
3439                         throw new Error("initializeWasm() must be awaited first!");
3440                 }
3441                 const nativeResponseValue = wasm.CResult_PaymentHashPaymentSendFailureZ_err(e);
3442                 return nativeResponseValue;
3443         }
3444         // void CResult_PaymentHashPaymentSendFailureZ_free(struct LDKCResult_PaymentHashPaymentSendFailureZ _res);
3445         export function CResult_PaymentHashPaymentSendFailureZ_free(_res: number): void {
3446                 if(!isWasmInitialized) {
3447                         throw new Error("initializeWasm() must be awaited first!");
3448                 }
3449                 const nativeResponseValue = wasm.CResult_PaymentHashPaymentSendFailureZ_free(_res);
3450                 // debug statements here
3451         }
3452         // struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_clone(const struct LDKCResult_PaymentHashPaymentSendFailureZ *NONNULL_PTR orig);
3453         export function CResult_PaymentHashPaymentSendFailureZ_clone(orig: number): number {
3454                 if(!isWasmInitialized) {
3455                         throw new Error("initializeWasm() must be awaited first!");
3456                 }
3457                 const nativeResponseValue = wasm.CResult_PaymentHashPaymentSendFailureZ_clone(orig);
3458                 return nativeResponseValue;
3459         }
3460         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
3461         export function CVec_NetAddressZ_free(_res: number[]): void {
3462                 if(!isWasmInitialized) {
3463                         throw new Error("initializeWasm() must be awaited first!");
3464                 }
3465                 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
3466                 // debug statements here
3467         }
3468         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
3469         export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
3470                 if(!isWasmInitialized) {
3471                         throw new Error("initializeWasm() must be awaited first!");
3472                 }
3473                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
3474                 return nativeResponseValue;
3475         }
3476         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
3477         export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
3478                 if(!isWasmInitialized) {
3479                         throw new Error("initializeWasm() must be awaited first!");
3480                 }
3481                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_new(encodeArray(a), encodeArray(b));
3482                 return nativeResponseValue;
3483         }
3484         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
3485         export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
3486                 if(!isWasmInitialized) {
3487                         throw new Error("initializeWasm() must be awaited first!");
3488                 }
3489                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_free(_res);
3490                 // debug statements here
3491         }
3492         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
3493         export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
3494                 if(!isWasmInitialized) {
3495                         throw new Error("initializeWasm() must be awaited first!");
3496                 }
3497                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_ok(encodeArray(o));
3498                 return nativeResponseValue;
3499         }
3500         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
3501         export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
3502                 if(!isWasmInitialized) {
3503                         throw new Error("initializeWasm() must be awaited first!");
3504                 }
3505                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_err(e);
3506                 return nativeResponseValue;
3507         }
3508         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
3509         export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
3510                 if(!isWasmInitialized) {
3511                         throw new Error("initializeWasm() must be awaited first!");
3512                 }
3513                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_free(_res);
3514                 // debug statements here
3515         }
3516         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
3517         export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
3518                 if(!isWasmInitialized) {
3519                         throw new Error("initializeWasm() must be awaited first!");
3520                 }
3521                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone(orig);
3522                 return nativeResponseValue;
3523         }
3524         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
3525         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
3526                 if(!isWasmInitialized) {
3527                         throw new Error("initializeWasm() must be awaited first!");
3528                 }
3529                 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
3530                 // debug statements here
3531         }
3532         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
3533         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
3534                 if(!isWasmInitialized) {
3535                         throw new Error("initializeWasm() must be awaited first!");
3536                 }
3537                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
3538                 return nativeResponseValue;
3539         }
3540         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
3541         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
3542                 if(!isWasmInitialized) {
3543                         throw new Error("initializeWasm() must be awaited first!");
3544                 }
3545                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
3546                 // debug statements here
3547         }
3548         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
3549         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
3550                 if(!isWasmInitialized) {
3551                         throw new Error("initializeWasm() must be awaited first!");
3552                 }
3553                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
3554                 return nativeResponseValue;
3555         }
3556         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
3557         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
3558                 if(!isWasmInitialized) {
3559                         throw new Error("initializeWasm() must be awaited first!");
3560                 }
3561                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
3562                 return nativeResponseValue;
3563         }
3564         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
3565         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
3566                 if(!isWasmInitialized) {
3567                         throw new Error("initializeWasm() must be awaited first!");
3568                 }
3569                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
3570                 // debug statements here
3571         }
3572         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
3573         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
3574                 if(!isWasmInitialized) {
3575                         throw new Error("initializeWasm() must be awaited first!");
3576                 }
3577                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
3578                 return nativeResponseValue;
3579         }
3580         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
3581         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
3582                 if(!isWasmInitialized) {
3583                         throw new Error("initializeWasm() must be awaited first!");
3584                 }
3585                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
3586                 return nativeResponseValue;
3587         }
3588         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
3589         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
3590                 if(!isWasmInitialized) {
3591                         throw new Error("initializeWasm() must be awaited first!");
3592                 }
3593                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
3594                 // debug statements here
3595         }
3596         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
3597         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
3598                 if(!isWasmInitialized) {
3599                         throw new Error("initializeWasm() must be awaited first!");
3600                 }
3601                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
3602                 return nativeResponseValue;
3603         }
3604         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
3605         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
3606                 if(!isWasmInitialized) {
3607                         throw new Error("initializeWasm() must be awaited first!");
3608                 }
3609                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
3610                 return nativeResponseValue;
3611         }
3612         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
3613         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
3614                 if(!isWasmInitialized) {
3615                         throw new Error("initializeWasm() must be awaited first!");
3616                 }
3617                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
3618                 return nativeResponseValue;
3619         }
3620         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
3621         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
3622                 if(!isWasmInitialized) {
3623                         throw new Error("initializeWasm() must be awaited first!");
3624                 }
3625                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
3626                 // debug statements here
3627         }
3628         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
3629         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
3630                 if(!isWasmInitialized) {
3631                         throw new Error("initializeWasm() must be awaited first!");
3632                 }
3633                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
3634                 return nativeResponseValue;
3635         }
3636         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
3637         export function CResult_SiPrefixNoneZ_ok(o: SiPrefix): number {
3638                 if(!isWasmInitialized) {
3639                         throw new Error("initializeWasm() must be awaited first!");
3640                 }
3641                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_ok(o);
3642                 return nativeResponseValue;
3643         }
3644         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
3645         export function CResult_SiPrefixNoneZ_err(): number {
3646                 if(!isWasmInitialized) {
3647                         throw new Error("initializeWasm() must be awaited first!");
3648                 }
3649                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_err();
3650                 return nativeResponseValue;
3651         }
3652         // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
3653         export function CResult_SiPrefixNoneZ_free(_res: number): void {
3654                 if(!isWasmInitialized) {
3655                         throw new Error("initializeWasm() must be awaited first!");
3656                 }
3657                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_free(_res);
3658                 // debug statements here
3659         }
3660         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
3661         export function CResult_SiPrefixNoneZ_clone(orig: number): number {
3662                 if(!isWasmInitialized) {
3663                         throw new Error("initializeWasm() must be awaited first!");
3664                 }
3665                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone(orig);
3666                 return nativeResponseValue;
3667         }
3668         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
3669         export function CResult_InvoiceNoneZ_ok(o: number): number {
3670                 if(!isWasmInitialized) {
3671                         throw new Error("initializeWasm() must be awaited first!");
3672                 }
3673                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_ok(o);
3674                 return nativeResponseValue;
3675         }
3676         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
3677         export function CResult_InvoiceNoneZ_err(): number {
3678                 if(!isWasmInitialized) {
3679                         throw new Error("initializeWasm() must be awaited first!");
3680                 }
3681                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_err();
3682                 return nativeResponseValue;
3683         }
3684         // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
3685         export function CResult_InvoiceNoneZ_free(_res: number): void {
3686                 if(!isWasmInitialized) {
3687                         throw new Error("initializeWasm() must be awaited first!");
3688                 }
3689                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_free(_res);
3690                 // debug statements here
3691         }
3692         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
3693         export function CResult_InvoiceNoneZ_clone(orig: number): number {
3694                 if(!isWasmInitialized) {
3695                         throw new Error("initializeWasm() must be awaited first!");
3696                 }
3697                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone(orig);
3698                 return nativeResponseValue;
3699         }
3700         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
3701         export function CResult_SignedRawInvoiceNoneZ_ok(o: number): number {
3702                 if(!isWasmInitialized) {
3703                         throw new Error("initializeWasm() must be awaited first!");
3704                 }
3705                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_ok(o);
3706                 return nativeResponseValue;
3707         }
3708         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
3709         export function CResult_SignedRawInvoiceNoneZ_err(): number {
3710                 if(!isWasmInitialized) {
3711                         throw new Error("initializeWasm() must be awaited first!");
3712                 }
3713                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_err();
3714                 return nativeResponseValue;
3715         }
3716         // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
3717         export function CResult_SignedRawInvoiceNoneZ_free(_res: number): void {
3718                 if(!isWasmInitialized) {
3719                         throw new Error("initializeWasm() must be awaited first!");
3720                 }
3721                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_free(_res);
3722                 // debug statements here
3723         }
3724         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
3725         export function CResult_SignedRawInvoiceNoneZ_clone(orig: number): number {
3726                 if(!isWasmInitialized) {
3727                         throw new Error("initializeWasm() must be awaited first!");
3728                 }
3729                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone(orig);
3730                 return nativeResponseValue;
3731         }
3732         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
3733         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig: number): number {
3734                 if(!isWasmInitialized) {
3735                         throw new Error("initializeWasm() must be awaited first!");
3736                 }
3737                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig);
3738                 return nativeResponseValue;
3739         }
3740         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
3741         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a: number, b: Uint8Array, c: number): number {
3742                 if(!isWasmInitialized) {
3743                         throw new Error("initializeWasm() must be awaited first!");
3744                 }
3745                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a, encodeArray(b), c);
3746                 return nativeResponseValue;
3747         }
3748         // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
3749         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res: number): void {
3750                 if(!isWasmInitialized) {
3751                         throw new Error("initializeWasm() must be awaited first!");
3752                 }
3753                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res);
3754                 // debug statements here
3755         }
3756         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
3757         export function CResult_PayeePubKeyErrorZ_ok(o: number): number {
3758                 if(!isWasmInitialized) {
3759                         throw new Error("initializeWasm() must be awaited first!");
3760                 }
3761                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_ok(o);
3762                 return nativeResponseValue;
3763         }
3764         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
3765         export function CResult_PayeePubKeyErrorZ_err(e: Secp256k1Error): number {
3766                 if(!isWasmInitialized) {
3767                         throw new Error("initializeWasm() must be awaited first!");
3768                 }
3769                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_err(e);
3770                 return nativeResponseValue;
3771         }
3772         // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
3773         export function CResult_PayeePubKeyErrorZ_free(_res: number): void {
3774                 if(!isWasmInitialized) {
3775                         throw new Error("initializeWasm() must be awaited first!");
3776                 }
3777                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_free(_res);
3778                 // debug statements here
3779         }
3780         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
3781         export function CResult_PayeePubKeyErrorZ_clone(orig: number): number {
3782                 if(!isWasmInitialized) {
3783                         throw new Error("initializeWasm() must be awaited first!");
3784                 }
3785                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone(orig);
3786                 return nativeResponseValue;
3787         }
3788         // void CVec_PrivateRouteZ_free(struct LDKCVec_PrivateRouteZ _res);
3789         export function CVec_PrivateRouteZ_free(_res: number[]): void {
3790                 if(!isWasmInitialized) {
3791                         throw new Error("initializeWasm() must be awaited first!");
3792                 }
3793                 const nativeResponseValue = wasm.CVec_PrivateRouteZ_free(_res);
3794                 // debug statements here
3795         }
3796         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
3797         export function CResult_PositiveTimestampCreationErrorZ_ok(o: number): number {
3798                 if(!isWasmInitialized) {
3799                         throw new Error("initializeWasm() must be awaited first!");
3800                 }
3801                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_ok(o);
3802                 return nativeResponseValue;
3803         }
3804         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
3805         export function CResult_PositiveTimestampCreationErrorZ_err(e: CreationError): number {
3806                 if(!isWasmInitialized) {
3807                         throw new Error("initializeWasm() must be awaited first!");
3808                 }
3809                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_err(e);
3810                 return nativeResponseValue;
3811         }
3812         // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
3813         export function CResult_PositiveTimestampCreationErrorZ_free(_res: number): void {
3814                 if(!isWasmInitialized) {
3815                         throw new Error("initializeWasm() must be awaited first!");
3816                 }
3817                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_free(_res);
3818                 // debug statements here
3819         }
3820         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
3821         export function CResult_PositiveTimestampCreationErrorZ_clone(orig: number): number {
3822                 if(!isWasmInitialized) {
3823                         throw new Error("initializeWasm() must be awaited first!");
3824                 }
3825                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone(orig);
3826                 return nativeResponseValue;
3827         }
3828         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
3829         export function CResult_NoneSemanticErrorZ_ok(): number {
3830                 if(!isWasmInitialized) {
3831                         throw new Error("initializeWasm() must be awaited first!");
3832                 }
3833                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_ok();
3834                 return nativeResponseValue;
3835         }
3836         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
3837         export function CResult_NoneSemanticErrorZ_err(e: SemanticError): number {
3838                 if(!isWasmInitialized) {
3839                         throw new Error("initializeWasm() must be awaited first!");
3840                 }
3841                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_err(e);
3842                 return nativeResponseValue;
3843         }
3844         // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
3845         export function CResult_NoneSemanticErrorZ_free(_res: number): void {
3846                 if(!isWasmInitialized) {
3847                         throw new Error("initializeWasm() must be awaited first!");
3848                 }
3849                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_free(_res);
3850                 // debug statements here
3851         }
3852         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
3853         export function CResult_NoneSemanticErrorZ_clone(orig: number): number {
3854                 if(!isWasmInitialized) {
3855                         throw new Error("initializeWasm() must be awaited first!");
3856                 }
3857                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone(orig);
3858                 return nativeResponseValue;
3859         }
3860         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
3861         export function CResult_InvoiceSemanticErrorZ_ok(o: number): number {
3862                 if(!isWasmInitialized) {
3863                         throw new Error("initializeWasm() must be awaited first!");
3864                 }
3865                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_ok(o);
3866                 return nativeResponseValue;
3867         }
3868         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
3869         export function CResult_InvoiceSemanticErrorZ_err(e: SemanticError): number {
3870                 if(!isWasmInitialized) {
3871                         throw new Error("initializeWasm() must be awaited first!");
3872                 }
3873                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_err(e);
3874                 return nativeResponseValue;
3875         }
3876         // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
3877         export function CResult_InvoiceSemanticErrorZ_free(_res: number): void {
3878                 if(!isWasmInitialized) {
3879                         throw new Error("initializeWasm() must be awaited first!");
3880                 }
3881                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_free(_res);
3882                 // debug statements here
3883         }
3884         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
3885         export function CResult_InvoiceSemanticErrorZ_clone(orig: number): number {
3886                 if(!isWasmInitialized) {
3887                         throw new Error("initializeWasm() must be awaited first!");
3888                 }
3889                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone(orig);
3890                 return nativeResponseValue;
3891         }
3892         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
3893         export function CResult_DescriptionCreationErrorZ_ok(o: number): number {
3894                 if(!isWasmInitialized) {
3895                         throw new Error("initializeWasm() must be awaited first!");
3896                 }
3897                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_ok(o);
3898                 return nativeResponseValue;
3899         }
3900         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
3901         export function CResult_DescriptionCreationErrorZ_err(e: CreationError): number {
3902                 if(!isWasmInitialized) {
3903                         throw new Error("initializeWasm() must be awaited first!");
3904                 }
3905                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_err(e);
3906                 return nativeResponseValue;
3907         }
3908         // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
3909         export function CResult_DescriptionCreationErrorZ_free(_res: number): void {
3910                 if(!isWasmInitialized) {
3911                         throw new Error("initializeWasm() must be awaited first!");
3912                 }
3913                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_free(_res);
3914                 // debug statements here
3915         }
3916         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
3917         export function CResult_DescriptionCreationErrorZ_clone(orig: number): number {
3918                 if(!isWasmInitialized) {
3919                         throw new Error("initializeWasm() must be awaited first!");
3920                 }
3921                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone(orig);
3922                 return nativeResponseValue;
3923         }
3924         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
3925         export function CResult_ExpiryTimeCreationErrorZ_ok(o: number): number {
3926                 if(!isWasmInitialized) {
3927                         throw new Error("initializeWasm() must be awaited first!");
3928                 }
3929                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_ok(o);
3930                 return nativeResponseValue;
3931         }
3932         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
3933         export function CResult_ExpiryTimeCreationErrorZ_err(e: CreationError): number {
3934                 if(!isWasmInitialized) {
3935                         throw new Error("initializeWasm() must be awaited first!");
3936                 }
3937                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_err(e);
3938                 return nativeResponseValue;
3939         }
3940         // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
3941         export function CResult_ExpiryTimeCreationErrorZ_free(_res: number): void {
3942                 if(!isWasmInitialized) {
3943                         throw new Error("initializeWasm() must be awaited first!");
3944                 }
3945                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_free(_res);
3946                 // debug statements here
3947         }
3948         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
3949         export function CResult_ExpiryTimeCreationErrorZ_clone(orig: number): number {
3950                 if(!isWasmInitialized) {
3951                         throw new Error("initializeWasm() must be awaited first!");
3952                 }
3953                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone(orig);
3954                 return nativeResponseValue;
3955         }
3956         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_ok(struct LDKPrivateRoute o);
3957         export function CResult_PrivateRouteCreationErrorZ_ok(o: number): number {
3958                 if(!isWasmInitialized) {
3959                         throw new Error("initializeWasm() must be awaited first!");
3960                 }
3961                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_ok(o);
3962                 return nativeResponseValue;
3963         }
3964         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_err(enum LDKCreationError e);
3965         export function CResult_PrivateRouteCreationErrorZ_err(e: CreationError): number {
3966                 if(!isWasmInitialized) {
3967                         throw new Error("initializeWasm() must be awaited first!");
3968                 }
3969                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_err(e);
3970                 return nativeResponseValue;
3971         }
3972         // void CResult_PrivateRouteCreationErrorZ_free(struct LDKCResult_PrivateRouteCreationErrorZ _res);
3973         export function CResult_PrivateRouteCreationErrorZ_free(_res: number): void {
3974                 if(!isWasmInitialized) {
3975                         throw new Error("initializeWasm() must be awaited first!");
3976                 }
3977                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_free(_res);
3978                 // debug statements here
3979         }
3980         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_clone(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR orig);
3981         export function CResult_PrivateRouteCreationErrorZ_clone(orig: number): number {
3982                 if(!isWasmInitialized) {
3983                         throw new Error("initializeWasm() must be awaited first!");
3984                 }
3985                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_clone(orig);
3986                 return nativeResponseValue;
3987         }
3988         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
3989         export function CResult_StringErrorZ_ok(o: String): number {
3990                 if(!isWasmInitialized) {
3991                         throw new Error("initializeWasm() must be awaited first!");
3992                 }
3993                 const nativeResponseValue = wasm.CResult_StringErrorZ_ok(o);
3994                 return nativeResponseValue;
3995         }
3996         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
3997         export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
3998                 if(!isWasmInitialized) {
3999                         throw new Error("initializeWasm() must be awaited first!");
4000                 }
4001                 const nativeResponseValue = wasm.CResult_StringErrorZ_err(e);
4002                 return nativeResponseValue;
4003         }
4004         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
4005         export function CResult_StringErrorZ_free(_res: number): void {
4006                 if(!isWasmInitialized) {
4007                         throw new Error("initializeWasm() must be awaited first!");
4008                 }
4009                 const nativeResponseValue = wasm.CResult_StringErrorZ_free(_res);
4010                 // debug statements here
4011         }
4012         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
4013         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
4014                 if(!isWasmInitialized) {
4015                         throw new Error("initializeWasm() must be awaited first!");
4016                 }
4017                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
4018                 return nativeResponseValue;
4019         }
4020         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4021         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
4022                 if(!isWasmInitialized) {
4023                         throw new Error("initializeWasm() must be awaited first!");
4024                 }
4025                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
4026                 return nativeResponseValue;
4027         }
4028         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
4029         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
4030                 if(!isWasmInitialized) {
4031                         throw new Error("initializeWasm() must be awaited first!");
4032                 }
4033                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
4034                 // debug statements here
4035         }
4036         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
4037         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
4038                 if(!isWasmInitialized) {
4039                         throw new Error("initializeWasm() must be awaited first!");
4040                 }
4041                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
4042                 return nativeResponseValue;
4043         }
4044         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
4045         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
4046                 if(!isWasmInitialized) {
4047                         throw new Error("initializeWasm() must be awaited first!");
4048                 }
4049                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
4050                 return nativeResponseValue;
4051         }
4052         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4053         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
4054                 if(!isWasmInitialized) {
4055                         throw new Error("initializeWasm() must be awaited first!");
4056                 }
4057                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
4058                 return nativeResponseValue;
4059         }
4060         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
4061         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
4062                 if(!isWasmInitialized) {
4063                         throw new Error("initializeWasm() must be awaited first!");
4064                 }
4065                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
4066                 // debug statements here
4067         }
4068         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
4069         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
4070                 if(!isWasmInitialized) {
4071                         throw new Error("initializeWasm() must be awaited first!");
4072                 }
4073                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
4074                 return nativeResponseValue;
4075         }
4076         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
4077         export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
4078                 if(!isWasmInitialized) {
4079                         throw new Error("initializeWasm() must be awaited first!");
4080                 }
4081                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
4082                 return nativeResponseValue;
4083         }
4084         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
4085         export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
4086                 if(!isWasmInitialized) {
4087                         throw new Error("initializeWasm() must be awaited first!");
4088                 }
4089                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
4090                 return nativeResponseValue;
4091         }
4092         // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
4093         export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
4094                 if(!isWasmInitialized) {
4095                         throw new Error("initializeWasm() must be awaited first!");
4096                 }
4097                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
4098                 // debug statements here
4099         }
4100         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
4101         export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
4102                 if(!isWasmInitialized) {
4103                         throw new Error("initializeWasm() must be awaited first!");
4104                 }
4105                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
4106                 return nativeResponseValue;
4107         }
4108         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
4109         export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
4110                 if(!isWasmInitialized) {
4111                         throw new Error("initializeWasm() must be awaited first!");
4112                 }
4113                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
4114                 return nativeResponseValue;
4115         }
4116         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
4117         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
4118                 if(!isWasmInitialized) {
4119                         throw new Error("initializeWasm() must be awaited first!");
4120                 }
4121                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
4122                 return nativeResponseValue;
4123         }
4124         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
4125         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
4126                 if(!isWasmInitialized) {
4127                         throw new Error("initializeWasm() must be awaited first!");
4128                 }
4129                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
4130                 // debug statements here
4131         }
4132         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
4133         export function C2Tuple_u32ScriptZ_clone(orig: number): number {
4134                 if(!isWasmInitialized) {
4135                         throw new Error("initializeWasm() must be awaited first!");
4136                 }
4137                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
4138                 return nativeResponseValue;
4139         }
4140         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
4141         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
4142                 if(!isWasmInitialized) {
4143                         throw new Error("initializeWasm() must be awaited first!");
4144                 }
4145                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
4146                 return nativeResponseValue;
4147         }
4148         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
4149         export function C2Tuple_u32ScriptZ_free(_res: number): void {
4150                 if(!isWasmInitialized) {
4151                         throw new Error("initializeWasm() must be awaited first!");
4152                 }
4153                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
4154                 // debug statements here
4155         }
4156         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
4157         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
4158                 if(!isWasmInitialized) {
4159                         throw new Error("initializeWasm() must be awaited first!");
4160                 }
4161                 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
4162                 // debug statements here
4163         }
4164         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
4165         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig: number): number {
4166                 if(!isWasmInitialized) {
4167                         throw new Error("initializeWasm() must be awaited first!");
4168                 }
4169                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig);
4170                 return nativeResponseValue;
4171         }
4172         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
4173         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
4174                 if(!isWasmInitialized) {
4175                         throw new Error("initializeWasm() must be awaited first!");
4176                 }
4177                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
4178                 return nativeResponseValue;
4179         }
4180         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
4181         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
4182                 if(!isWasmInitialized) {
4183                         throw new Error("initializeWasm() must be awaited first!");
4184                 }
4185                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
4186                 // debug statements here
4187         }
4188         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
4189         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
4190                 if(!isWasmInitialized) {
4191                         throw new Error("initializeWasm() must be awaited first!");
4192                 }
4193                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
4194                 // debug statements here
4195         }
4196         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
4197         export function CVec_EventZ_free(_res: number[]): void {
4198                 if(!isWasmInitialized) {
4199                         throw new Error("initializeWasm() must be awaited first!");
4200                 }
4201                 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
4202                 // debug statements here
4203         }
4204         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
4205         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
4206                 if(!isWasmInitialized) {
4207                         throw new Error("initializeWasm() must be awaited first!");
4208                 }
4209                 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
4210                 // debug statements here
4211         }
4212         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
4213         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
4214                 if(!isWasmInitialized) {
4215                         throw new Error("initializeWasm() must be awaited first!");
4216                 }
4217                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
4218                 return nativeResponseValue;
4219         }
4220         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
4221         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
4222                 if(!isWasmInitialized) {
4223                         throw new Error("initializeWasm() must be awaited first!");
4224                 }
4225                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
4226                 return nativeResponseValue;
4227         }
4228         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
4229         export function C2Tuple_u32TxOutZ_free(_res: number): void {
4230                 if(!isWasmInitialized) {
4231                         throw new Error("initializeWasm() must be awaited first!");
4232                 }
4233                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
4234                 // debug statements here
4235         }
4236         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
4237         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
4238                 if(!isWasmInitialized) {
4239                         throw new Error("initializeWasm() must be awaited first!");
4240                 }
4241                 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
4242                 // debug statements here
4243         }
4244         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
4245         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
4246                 if(!isWasmInitialized) {
4247                         throw new Error("initializeWasm() must be awaited first!");
4248                 }
4249                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
4250                 return nativeResponseValue;
4251         }
4252         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
4253         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
4254                 if(!isWasmInitialized) {
4255                         throw new Error("initializeWasm() must be awaited first!");
4256                 }
4257                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
4258                 return nativeResponseValue;
4259         }
4260         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
4261         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
4262                 if(!isWasmInitialized) {
4263                         throw new Error("initializeWasm() must be awaited first!");
4264                 }
4265                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
4266                 // debug statements here
4267         }
4268         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
4269         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
4270                 if(!isWasmInitialized) {
4271                         throw new Error("initializeWasm() must be awaited first!");
4272                 }
4273                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
4274                 // debug statements here
4275         }
4276         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
4277         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
4278                 if(!isWasmInitialized) {
4279                         throw new Error("initializeWasm() must be awaited first!");
4280                 }
4281                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
4282                 return nativeResponseValue;
4283         }
4284         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
4285         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
4286                 if(!isWasmInitialized) {
4287                         throw new Error("initializeWasm() must be awaited first!");
4288                 }
4289                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
4290                 return nativeResponseValue;
4291         }
4292         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
4293         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
4294                 if(!isWasmInitialized) {
4295                         throw new Error("initializeWasm() must be awaited first!");
4296                 }
4297                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
4298                 // debug statements here
4299         }
4300         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
4301         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
4302                 if(!isWasmInitialized) {
4303                         throw new Error("initializeWasm() must be awaited first!");
4304                 }
4305                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
4306                 return nativeResponseValue;
4307         }
4308         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
4309         export function CResult_boolLightningErrorZ_err(e: number): number {
4310                 if(!isWasmInitialized) {
4311                         throw new Error("initializeWasm() must be awaited first!");
4312                 }
4313                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
4314                 return nativeResponseValue;
4315         }
4316         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
4317         export function CResult_boolLightningErrorZ_free(_res: number): void {
4318                 if(!isWasmInitialized) {
4319                         throw new Error("initializeWasm() must be awaited first!");
4320                 }
4321                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
4322                 // debug statements here
4323         }
4324         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
4325         export function CResult_boolLightningErrorZ_clone(orig: number): number {
4326                 if(!isWasmInitialized) {
4327                         throw new Error("initializeWasm() must be awaited first!");
4328                 }
4329                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
4330                 return nativeResponseValue;
4331         }
4332         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
4333         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
4334                 if(!isWasmInitialized) {
4335                         throw new Error("initializeWasm() must be awaited first!");
4336                 }
4337                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
4338                 return nativeResponseValue;
4339         }
4340         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
4341         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
4342                 if(!isWasmInitialized) {
4343                         throw new Error("initializeWasm() must be awaited first!");
4344                 }
4345                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
4346                 return nativeResponseValue;
4347         }
4348         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
4349         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
4350                 if(!isWasmInitialized) {
4351                         throw new Error("initializeWasm() must be awaited first!");
4352                 }
4353                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
4354                 // debug statements here
4355         }
4356         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
4357         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
4358                 if(!isWasmInitialized) {
4359                         throw new Error("initializeWasm() must be awaited first!");
4360                 }
4361                 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
4362                 // debug statements here
4363         }
4364         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
4365         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
4366                 if(!isWasmInitialized) {
4367                         throw new Error("initializeWasm() must be awaited first!");
4368                 }
4369                 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
4370                 // debug statements here
4371         }
4372         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
4373         export function CResult_NoneLightningErrorZ_ok(): number {
4374                 if(!isWasmInitialized) {
4375                         throw new Error("initializeWasm() must be awaited first!");
4376                 }
4377                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
4378                 return nativeResponseValue;
4379         }
4380         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
4381         export function CResult_NoneLightningErrorZ_err(e: number): number {
4382                 if(!isWasmInitialized) {
4383                         throw new Error("initializeWasm() must be awaited first!");
4384                 }
4385                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
4386                 return nativeResponseValue;
4387         }
4388         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
4389         export function CResult_NoneLightningErrorZ_free(_res: number): void {
4390                 if(!isWasmInitialized) {
4391                         throw new Error("initializeWasm() must be awaited first!");
4392                 }
4393                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
4394                 // debug statements here
4395         }
4396         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
4397         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
4398                 if(!isWasmInitialized) {
4399                         throw new Error("initializeWasm() must be awaited first!");
4400                 }
4401                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
4402                 return nativeResponseValue;
4403         }
4404         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
4405         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
4406                 if(!isWasmInitialized) {
4407                         throw new Error("initializeWasm() must be awaited first!");
4408                 }
4409                 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
4410                 // debug statements here
4411         }
4412         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
4413         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
4414                 if(!isWasmInitialized) {
4415                         throw new Error("initializeWasm() must be awaited first!");
4416                 }
4417                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
4418                 return nativeResponseValue;
4419         }
4420         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
4421         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
4422                 if(!isWasmInitialized) {
4423                         throw new Error("initializeWasm() must be awaited first!");
4424                 }
4425                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
4426                 return nativeResponseValue;
4427         }
4428         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
4429         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
4430                 if(!isWasmInitialized) {
4431                         throw new Error("initializeWasm() must be awaited first!");
4432                 }
4433                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
4434                 // debug statements here
4435         }
4436         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
4437         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
4438                 if(!isWasmInitialized) {
4439                         throw new Error("initializeWasm() must be awaited first!");
4440                 }
4441                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
4442                 return nativeResponseValue;
4443         }
4444         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
4445         export function CResult_NonePeerHandleErrorZ_ok(): number {
4446                 if(!isWasmInitialized) {
4447                         throw new Error("initializeWasm() must be awaited first!");
4448                 }
4449                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
4450                 return nativeResponseValue;
4451         }
4452         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
4453         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
4454                 if(!isWasmInitialized) {
4455                         throw new Error("initializeWasm() must be awaited first!");
4456                 }
4457                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
4458                 return nativeResponseValue;
4459         }
4460         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
4461         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
4462                 if(!isWasmInitialized) {
4463                         throw new Error("initializeWasm() must be awaited first!");
4464                 }
4465                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
4466                 // debug statements here
4467         }
4468         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
4469         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
4470                 if(!isWasmInitialized) {
4471                         throw new Error("initializeWasm() must be awaited first!");
4472                 }
4473                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
4474                 return nativeResponseValue;
4475         }
4476         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
4477         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
4478                 if(!isWasmInitialized) {
4479                         throw new Error("initializeWasm() must be awaited first!");
4480                 }
4481                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
4482                 return nativeResponseValue;
4483         }
4484         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
4485         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
4486                 if(!isWasmInitialized) {
4487                         throw new Error("initializeWasm() must be awaited first!");
4488                 }
4489                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
4490                 return nativeResponseValue;
4491         }
4492         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
4493         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
4494                 if(!isWasmInitialized) {
4495                         throw new Error("initializeWasm() must be awaited first!");
4496                 }
4497                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
4498                 // debug statements here
4499         }
4500         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
4501         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
4502                 if(!isWasmInitialized) {
4503                         throw new Error("initializeWasm() must be awaited first!");
4504                 }
4505                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
4506                 return nativeResponseValue;
4507         }
4508         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
4509         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
4510                 if(!isWasmInitialized) {
4511                         throw new Error("initializeWasm() must be awaited first!");
4512                 }
4513                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
4514                 return nativeResponseValue;
4515         }
4516         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
4517         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
4518                 if(!isWasmInitialized) {
4519                         throw new Error("initializeWasm() must be awaited first!");
4520                 }
4521                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
4522                 return nativeResponseValue;
4523         }
4524         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
4525         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
4526                 if(!isWasmInitialized) {
4527                         throw new Error("initializeWasm() must be awaited first!");
4528                 }
4529                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
4530                 // debug statements here
4531         }
4532         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
4533         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
4534                 if(!isWasmInitialized) {
4535                         throw new Error("initializeWasm() must be awaited first!");
4536                 }
4537                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
4538                 return nativeResponseValue;
4539         }
4540         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
4541         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
4542                 if(!isWasmInitialized) {
4543                         throw new Error("initializeWasm() must be awaited first!");
4544                 }
4545                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
4546                 return nativeResponseValue;
4547         }
4548         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
4549         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
4550                 if(!isWasmInitialized) {
4551                         throw new Error("initializeWasm() must be awaited first!");
4552                 }
4553                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
4554                 return nativeResponseValue;
4555         }
4556         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
4557         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
4558                 if(!isWasmInitialized) {
4559                         throw new Error("initializeWasm() must be awaited first!");
4560                 }
4561                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
4562                 // debug statements here
4563         }
4564         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
4565         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
4566                 if(!isWasmInitialized) {
4567                         throw new Error("initializeWasm() must be awaited first!");
4568                 }
4569                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
4570                 return nativeResponseValue;
4571         }
4572         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
4573         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
4574                 if(!isWasmInitialized) {
4575                         throw new Error("initializeWasm() must be awaited first!");
4576                 }
4577                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
4578                 return nativeResponseValue;
4579         }
4580         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
4581         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
4582                 if(!isWasmInitialized) {
4583                         throw new Error("initializeWasm() must be awaited first!");
4584                 }
4585                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
4586                 return nativeResponseValue;
4587         }
4588         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
4589         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
4590                 if(!isWasmInitialized) {
4591                         throw new Error("initializeWasm() must be awaited first!");
4592                 }
4593                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
4594                 // debug statements here
4595         }
4596         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
4597         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
4598                 if(!isWasmInitialized) {
4599                         throw new Error("initializeWasm() must be awaited first!");
4600                 }
4601                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
4602                 return nativeResponseValue;
4603         }
4604         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
4605         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
4606                 if(!isWasmInitialized) {
4607                         throw new Error("initializeWasm() must be awaited first!");
4608                 }
4609                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
4610                 return nativeResponseValue;
4611         }
4612         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
4613         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
4614                 if(!isWasmInitialized) {
4615                         throw new Error("initializeWasm() must be awaited first!");
4616                 }
4617                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
4618                 return nativeResponseValue;
4619         }
4620         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
4621         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
4622                 if(!isWasmInitialized) {
4623                         throw new Error("initializeWasm() must be awaited first!");
4624                 }
4625                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
4626                 // debug statements here
4627         }
4628         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
4629         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
4630                 if(!isWasmInitialized) {
4631                         throw new Error("initializeWasm() must be awaited first!");
4632                 }
4633                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
4634                 return nativeResponseValue;
4635         }
4636         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
4637         export function CVec_u64Z_free(_res: number[]): void {
4638                 if(!isWasmInitialized) {
4639                         throw new Error("initializeWasm() must be awaited first!");
4640                 }
4641                 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
4642                 // debug statements here
4643         }
4644         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
4645         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
4646                 if(!isWasmInitialized) {
4647                         throw new Error("initializeWasm() must be awaited first!");
4648                 }
4649                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
4650                 return nativeResponseValue;
4651         }
4652         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
4653         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
4654                 if(!isWasmInitialized) {
4655                         throw new Error("initializeWasm() must be awaited first!");
4656                 }
4657                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
4658                 return nativeResponseValue;
4659         }
4660         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
4661         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
4662                 if(!isWasmInitialized) {
4663                         throw new Error("initializeWasm() must be awaited first!");
4664                 }
4665                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
4666                 // debug statements here
4667         }
4668         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
4669         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
4670                 if(!isWasmInitialized) {
4671                         throw new Error("initializeWasm() must be awaited first!");
4672                 }
4673                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
4674                 return nativeResponseValue;
4675         }
4676         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
4677         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
4678                 if(!isWasmInitialized) {
4679                         throw new Error("initializeWasm() must be awaited first!");
4680                 }
4681                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
4682                 return nativeResponseValue;
4683         }
4684         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
4685         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
4686                 if(!isWasmInitialized) {
4687                         throw new Error("initializeWasm() must be awaited first!");
4688                 }
4689                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
4690                 return nativeResponseValue;
4691         }
4692         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
4693         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
4694                 if(!isWasmInitialized) {
4695                         throw new Error("initializeWasm() must be awaited first!");
4696                 }
4697                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
4698                 // debug statements here
4699         }
4700         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
4701         export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
4702                 if(!isWasmInitialized) {
4703                         throw new Error("initializeWasm() must be awaited first!");
4704                 }
4705                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
4706                 return nativeResponseValue;
4707         }
4708         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
4709         export function CResult_NetAddressu8Z_ok(o: number): number {
4710                 if(!isWasmInitialized) {
4711                         throw new Error("initializeWasm() must be awaited first!");
4712                 }
4713                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
4714                 return nativeResponseValue;
4715         }
4716         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
4717         export function CResult_NetAddressu8Z_err(e: number): number {
4718                 if(!isWasmInitialized) {
4719                         throw new Error("initializeWasm() must be awaited first!");
4720                 }
4721                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
4722                 return nativeResponseValue;
4723         }
4724         // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
4725         export function CResult_NetAddressu8Z_free(_res: number): void {
4726                 if(!isWasmInitialized) {
4727                         throw new Error("initializeWasm() must be awaited first!");
4728                 }
4729                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
4730                 // debug statements here
4731         }
4732         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
4733         export function CResult_NetAddressu8Z_clone(orig: number): number {
4734                 if(!isWasmInitialized) {
4735                         throw new Error("initializeWasm() must be awaited first!");
4736                 }
4737                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
4738                 return nativeResponseValue;
4739         }
4740         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
4741         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
4742                 if(!isWasmInitialized) {
4743                         throw new Error("initializeWasm() must be awaited first!");
4744                 }
4745                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
4746                 return nativeResponseValue;
4747         }
4748         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
4749         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
4750                 if(!isWasmInitialized) {
4751                         throw new Error("initializeWasm() must be awaited first!");
4752                 }
4753                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
4754                 return nativeResponseValue;
4755         }
4756         // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
4757         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
4758                 if(!isWasmInitialized) {
4759                         throw new Error("initializeWasm() must be awaited first!");
4760                 }
4761                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
4762                 // debug statements here
4763         }
4764         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
4765         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
4766                 if(!isWasmInitialized) {
4767                         throw new Error("initializeWasm() must be awaited first!");
4768                 }
4769                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
4770                 return nativeResponseValue;
4771         }
4772         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
4773         export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
4774                 if(!isWasmInitialized) {
4775                         throw new Error("initializeWasm() must be awaited first!");
4776                 }
4777                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_ok(o);
4778                 return nativeResponseValue;
4779         }
4780         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
4781         export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
4782                 if(!isWasmInitialized) {
4783                         throw new Error("initializeWasm() must be awaited first!");
4784                 }
4785                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_err(e);
4786                 return nativeResponseValue;
4787         }
4788         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
4789         export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
4790                 if(!isWasmInitialized) {
4791                         throw new Error("initializeWasm() must be awaited first!");
4792                 }
4793                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_free(_res);
4794                 // debug statements here
4795         }
4796         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
4797         export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
4798                 if(!isWasmInitialized) {
4799                         throw new Error("initializeWasm() must be awaited first!");
4800                 }
4801                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone(orig);
4802                 return nativeResponseValue;
4803         }
4804         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
4805         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
4806                 if(!isWasmInitialized) {
4807                         throw new Error("initializeWasm() must be awaited first!");
4808                 }
4809                 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
4810                 // debug statements here
4811         }
4812         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
4813         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
4814                 if(!isWasmInitialized) {
4815                         throw new Error("initializeWasm() must be awaited first!");
4816                 }
4817                 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
4818                 // debug statements here
4819         }
4820         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
4821         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
4822                 if(!isWasmInitialized) {
4823                         throw new Error("initializeWasm() must be awaited first!");
4824                 }
4825                 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
4826                 // debug statements here
4827         }
4828         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
4829         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
4830                 if(!isWasmInitialized) {
4831                         throw new Error("initializeWasm() must be awaited first!");
4832                 }
4833                 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
4834                 // debug statements here
4835         }
4836         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
4837         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
4838                 if(!isWasmInitialized) {
4839                         throw new Error("initializeWasm() must be awaited first!");
4840                 }
4841                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
4842                 return nativeResponseValue;
4843         }
4844         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
4845         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
4846                 if(!isWasmInitialized) {
4847                         throw new Error("initializeWasm() must be awaited first!");
4848                 }
4849                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
4850                 return nativeResponseValue;
4851         }
4852         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
4853         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
4854                 if(!isWasmInitialized) {
4855                         throw new Error("initializeWasm() must be awaited first!");
4856                 }
4857                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
4858                 // debug statements here
4859         }
4860         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
4861         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
4862                 if(!isWasmInitialized) {
4863                         throw new Error("initializeWasm() must be awaited first!");
4864                 }
4865                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
4866                 return nativeResponseValue;
4867         }
4868         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
4869         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
4870                 if(!isWasmInitialized) {
4871                         throw new Error("initializeWasm() must be awaited first!");
4872                 }
4873                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
4874                 return nativeResponseValue;
4875         }
4876         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
4877         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
4878                 if(!isWasmInitialized) {
4879                         throw new Error("initializeWasm() must be awaited first!");
4880                 }
4881                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
4882                 return nativeResponseValue;
4883         }
4884         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
4885         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
4886                 if(!isWasmInitialized) {
4887                         throw new Error("initializeWasm() must be awaited first!");
4888                 }
4889                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
4890                 // debug statements here
4891         }
4892         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
4893         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
4894                 if(!isWasmInitialized) {
4895                         throw new Error("initializeWasm() must be awaited first!");
4896                 }
4897                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
4898                 return nativeResponseValue;
4899         }
4900         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
4901         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
4902                 if(!isWasmInitialized) {
4903                         throw new Error("initializeWasm() must be awaited first!");
4904                 }
4905                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
4906                 return nativeResponseValue;
4907         }
4908         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
4909         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
4910                 if(!isWasmInitialized) {
4911                         throw new Error("initializeWasm() must be awaited first!");
4912                 }
4913                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
4914                 return nativeResponseValue;
4915         }
4916         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
4917         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
4918                 if(!isWasmInitialized) {
4919                         throw new Error("initializeWasm() must be awaited first!");
4920                 }
4921                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
4922                 // debug statements here
4923         }
4924         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
4925         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
4926                 if(!isWasmInitialized) {
4927                         throw new Error("initializeWasm() must be awaited first!");
4928                 }
4929                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
4930                 return nativeResponseValue;
4931         }
4932         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
4933         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
4934                 if(!isWasmInitialized) {
4935                         throw new Error("initializeWasm() must be awaited first!");
4936                 }
4937                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
4938                 return nativeResponseValue;
4939         }
4940         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
4941         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
4942                 if(!isWasmInitialized) {
4943                         throw new Error("initializeWasm() must be awaited first!");
4944                 }
4945                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
4946                 return nativeResponseValue;
4947         }
4948         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
4949         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
4950                 if(!isWasmInitialized) {
4951                         throw new Error("initializeWasm() must be awaited first!");
4952                 }
4953                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
4954                 // debug statements here
4955         }
4956         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
4957         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
4958                 if(!isWasmInitialized) {
4959                         throw new Error("initializeWasm() must be awaited first!");
4960                 }
4961                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
4962                 return nativeResponseValue;
4963         }
4964         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
4965         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: number): number {
4966                 if(!isWasmInitialized) {
4967                         throw new Error("initializeWasm() must be awaited first!");
4968                 }
4969                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o);
4970                 return nativeResponseValue;
4971         }
4972         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
4973         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: number): number {
4974                 if(!isWasmInitialized) {
4975                         throw new Error("initializeWasm() must be awaited first!");
4976                 }
4977                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e);
4978                 return nativeResponseValue;
4979         }
4980         // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
4981         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: number): void {
4982                 if(!isWasmInitialized) {
4983                         throw new Error("initializeWasm() must be awaited first!");
4984                 }
4985                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res);
4986                 // debug statements here
4987         }
4988         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
4989         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: number): number {
4990                 if(!isWasmInitialized) {
4991                         throw new Error("initializeWasm() must be awaited first!");
4992                 }
4993                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig);
4994                 return nativeResponseValue;
4995         }
4996         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
4997         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
4998                 if(!isWasmInitialized) {
4999                         throw new Error("initializeWasm() must be awaited first!");
5000                 }
5001                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
5002                 return nativeResponseValue;
5003         }
5004         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
5005         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
5006                 if(!isWasmInitialized) {
5007                         throw new Error("initializeWasm() must be awaited first!");
5008                 }
5009                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
5010                 return nativeResponseValue;
5011         }
5012         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
5013         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
5014                 if(!isWasmInitialized) {
5015                         throw new Error("initializeWasm() must be awaited first!");
5016                 }
5017                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
5018                 // debug statements here
5019         }
5020         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
5021         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
5022                 if(!isWasmInitialized) {
5023                         throw new Error("initializeWasm() must be awaited first!");
5024                 }
5025                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
5026                 return nativeResponseValue;
5027         }
5028         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
5029         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
5030                 if(!isWasmInitialized) {
5031                         throw new Error("initializeWasm() must be awaited first!");
5032                 }
5033                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
5034                 return nativeResponseValue;
5035         }
5036         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
5037         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
5038                 if(!isWasmInitialized) {
5039                         throw new Error("initializeWasm() must be awaited first!");
5040                 }
5041                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
5042                 return nativeResponseValue;
5043         }
5044         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
5045         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
5046                 if(!isWasmInitialized) {
5047                         throw new Error("initializeWasm() must be awaited first!");
5048                 }
5049                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
5050                 // debug statements here
5051         }
5052         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
5053         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
5054                 if(!isWasmInitialized) {
5055                         throw new Error("initializeWasm() must be awaited first!");
5056                 }
5057                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
5058                 return nativeResponseValue;
5059         }
5060         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
5061         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
5062                 if(!isWasmInitialized) {
5063                         throw new Error("initializeWasm() must be awaited first!");
5064                 }
5065                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
5066                 return nativeResponseValue;
5067         }
5068         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
5069         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
5070                 if(!isWasmInitialized) {
5071                         throw new Error("initializeWasm() must be awaited first!");
5072                 }
5073                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
5074                 return nativeResponseValue;
5075         }
5076         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
5077         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
5078                 if(!isWasmInitialized) {
5079                         throw new Error("initializeWasm() must be awaited first!");
5080                 }
5081                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
5082                 // debug statements here
5083         }
5084         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
5085         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
5086                 if(!isWasmInitialized) {
5087                         throw new Error("initializeWasm() must be awaited first!");
5088                 }
5089                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
5090                 return nativeResponseValue;
5091         }
5092         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
5093         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
5094                 if(!isWasmInitialized) {
5095                         throw new Error("initializeWasm() must be awaited first!");
5096                 }
5097                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
5098                 return nativeResponseValue;
5099         }
5100         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
5101         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
5102                 if(!isWasmInitialized) {
5103                         throw new Error("initializeWasm() must be awaited first!");
5104                 }
5105                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
5106                 return nativeResponseValue;
5107         }
5108         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
5109         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
5110                 if(!isWasmInitialized) {
5111                         throw new Error("initializeWasm() must be awaited first!");
5112                 }
5113                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
5114                 // debug statements here
5115         }
5116         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
5117         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
5118                 if(!isWasmInitialized) {
5119                         throw new Error("initializeWasm() must be awaited first!");
5120                 }
5121                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
5122                 return nativeResponseValue;
5123         }
5124         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
5125         export function CResult_InitDecodeErrorZ_ok(o: number): number {
5126                 if(!isWasmInitialized) {
5127                         throw new Error("initializeWasm() must be awaited first!");
5128                 }
5129                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
5130                 return nativeResponseValue;
5131         }
5132         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
5133         export function CResult_InitDecodeErrorZ_err(e: number): number {
5134                 if(!isWasmInitialized) {
5135                         throw new Error("initializeWasm() must be awaited first!");
5136                 }
5137                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
5138                 return nativeResponseValue;
5139         }
5140         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
5141         export function CResult_InitDecodeErrorZ_free(_res: number): void {
5142                 if(!isWasmInitialized) {
5143                         throw new Error("initializeWasm() must be awaited first!");
5144                 }
5145                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
5146                 // debug statements here
5147         }
5148         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
5149         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
5150                 if(!isWasmInitialized) {
5151                         throw new Error("initializeWasm() must be awaited first!");
5152                 }
5153                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
5154                 return nativeResponseValue;
5155         }
5156         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
5157         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
5158                 if(!isWasmInitialized) {
5159                         throw new Error("initializeWasm() must be awaited first!");
5160                 }
5161                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
5162                 return nativeResponseValue;
5163         }
5164         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
5165         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
5166                 if(!isWasmInitialized) {
5167                         throw new Error("initializeWasm() must be awaited first!");
5168                 }
5169                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
5170                 return nativeResponseValue;
5171         }
5172         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
5173         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
5174                 if(!isWasmInitialized) {
5175                         throw new Error("initializeWasm() must be awaited first!");
5176                 }
5177                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
5178                 // debug statements here
5179         }
5180         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
5181         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
5182                 if(!isWasmInitialized) {
5183                         throw new Error("initializeWasm() must be awaited first!");
5184                 }
5185                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
5186                 return nativeResponseValue;
5187         }
5188         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
5189         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
5190                 if(!isWasmInitialized) {
5191                         throw new Error("initializeWasm() must be awaited first!");
5192                 }
5193                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
5194                 return nativeResponseValue;
5195         }
5196         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
5197         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
5198                 if(!isWasmInitialized) {
5199                         throw new Error("initializeWasm() must be awaited first!");
5200                 }
5201                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
5202                 return nativeResponseValue;
5203         }
5204         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
5205         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
5206                 if(!isWasmInitialized) {
5207                         throw new Error("initializeWasm() must be awaited first!");
5208                 }
5209                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
5210                 // debug statements here
5211         }
5212         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
5213         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
5214                 if(!isWasmInitialized) {
5215                         throw new Error("initializeWasm() must be awaited first!");
5216                 }
5217                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
5218                 return nativeResponseValue;
5219         }
5220         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
5221         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
5222                 if(!isWasmInitialized) {
5223                         throw new Error("initializeWasm() must be awaited first!");
5224                 }
5225                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
5226                 return nativeResponseValue;
5227         }
5228         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
5229         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
5230                 if(!isWasmInitialized) {
5231                         throw new Error("initializeWasm() must be awaited first!");
5232                 }
5233                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
5234                 return nativeResponseValue;
5235         }
5236         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
5237         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
5238                 if(!isWasmInitialized) {
5239                         throw new Error("initializeWasm() must be awaited first!");
5240                 }
5241                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
5242                 // debug statements here
5243         }
5244         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
5245         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
5246                 if(!isWasmInitialized) {
5247                         throw new Error("initializeWasm() must be awaited first!");
5248                 }
5249                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
5250                 return nativeResponseValue;
5251         }
5252         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
5253         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
5254                 if(!isWasmInitialized) {
5255                         throw new Error("initializeWasm() must be awaited first!");
5256                 }
5257                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
5258                 return nativeResponseValue;
5259         }
5260         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5261         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
5262                 if(!isWasmInitialized) {
5263                         throw new Error("initializeWasm() must be awaited first!");
5264                 }
5265                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
5266                 return nativeResponseValue;
5267         }
5268         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
5269         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
5270                 if(!isWasmInitialized) {
5271                         throw new Error("initializeWasm() must be awaited first!");
5272                 }
5273                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
5274                 // debug statements here
5275         }
5276         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
5277         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
5278                 if(!isWasmInitialized) {
5279                         throw new Error("initializeWasm() must be awaited first!");
5280                 }
5281                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
5282                 return nativeResponseValue;
5283         }
5284         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
5285         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
5286                 if(!isWasmInitialized) {
5287                         throw new Error("initializeWasm() must be awaited first!");
5288                 }
5289                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
5290                 return nativeResponseValue;
5291         }
5292         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5293         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
5294                 if(!isWasmInitialized) {
5295                         throw new Error("initializeWasm() must be awaited first!");
5296                 }
5297                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
5298                 return nativeResponseValue;
5299         }
5300         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
5301         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
5302                 if(!isWasmInitialized) {
5303                         throw new Error("initializeWasm() must be awaited first!");
5304                 }
5305                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
5306                 // debug statements here
5307         }
5308         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
5309         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
5310                 if(!isWasmInitialized) {
5311                         throw new Error("initializeWasm() must be awaited first!");
5312                 }
5313                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
5314                 return nativeResponseValue;
5315         }
5316         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
5317         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
5318                 if(!isWasmInitialized) {
5319                         throw new Error("initializeWasm() must be awaited first!");
5320                 }
5321                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
5322                 return nativeResponseValue;
5323         }
5324         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
5325         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
5326                 if(!isWasmInitialized) {
5327                         throw new Error("initializeWasm() must be awaited first!");
5328                 }
5329                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
5330                 return nativeResponseValue;
5331         }
5332         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
5333         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
5334                 if(!isWasmInitialized) {
5335                         throw new Error("initializeWasm() must be awaited first!");
5336                 }
5337                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
5338                 // debug statements here
5339         }
5340         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
5341         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
5342                 if(!isWasmInitialized) {
5343                         throw new Error("initializeWasm() must be awaited first!");
5344                 }
5345                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
5346                 return nativeResponseValue;
5347         }
5348         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
5349         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
5350                 if(!isWasmInitialized) {
5351                         throw new Error("initializeWasm() must be awaited first!");
5352                 }
5353                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
5354                 return nativeResponseValue;
5355         }
5356         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5357         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
5358                 if(!isWasmInitialized) {
5359                         throw new Error("initializeWasm() must be awaited first!");
5360                 }
5361                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
5362                 return nativeResponseValue;
5363         }
5364         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
5365         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
5366                 if(!isWasmInitialized) {
5367                         throw new Error("initializeWasm() must be awaited first!");
5368                 }
5369                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
5370                 // debug statements here
5371         }
5372         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
5373         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
5374                 if(!isWasmInitialized) {
5375                         throw new Error("initializeWasm() must be awaited first!");
5376                 }
5377                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
5378                 return nativeResponseValue;
5379         }
5380         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
5381         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
5382                 if(!isWasmInitialized) {
5383                         throw new Error("initializeWasm() must be awaited first!");
5384                 }
5385                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
5386                 return nativeResponseValue;
5387         }
5388         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5389         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
5390                 if(!isWasmInitialized) {
5391                         throw new Error("initializeWasm() must be awaited first!");
5392                 }
5393                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
5394                 return nativeResponseValue;
5395         }
5396         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
5397         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
5398                 if(!isWasmInitialized) {
5399                         throw new Error("initializeWasm() must be awaited first!");
5400                 }
5401                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
5402                 // debug statements here
5403         }
5404         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
5405         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
5406                 if(!isWasmInitialized) {
5407                         throw new Error("initializeWasm() must be awaited first!");
5408                 }
5409                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
5410                 return nativeResponseValue;
5411         }
5412         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
5413         export function CResult_PingDecodeErrorZ_ok(o: number): number {
5414                 if(!isWasmInitialized) {
5415                         throw new Error("initializeWasm() must be awaited first!");
5416                 }
5417                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
5418                 return nativeResponseValue;
5419         }
5420         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
5421         export function CResult_PingDecodeErrorZ_err(e: number): number {
5422                 if(!isWasmInitialized) {
5423                         throw new Error("initializeWasm() must be awaited first!");
5424                 }
5425                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
5426                 return nativeResponseValue;
5427         }
5428         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
5429         export function CResult_PingDecodeErrorZ_free(_res: number): void {
5430                 if(!isWasmInitialized) {
5431                         throw new Error("initializeWasm() must be awaited first!");
5432                 }
5433                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
5434                 // debug statements here
5435         }
5436         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
5437         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
5438                 if(!isWasmInitialized) {
5439                         throw new Error("initializeWasm() must be awaited first!");
5440                 }
5441                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
5442                 return nativeResponseValue;
5443         }
5444         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
5445         export function CResult_PongDecodeErrorZ_ok(o: number): number {
5446                 if(!isWasmInitialized) {
5447                         throw new Error("initializeWasm() must be awaited first!");
5448                 }
5449                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
5450                 return nativeResponseValue;
5451         }
5452         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
5453         export function CResult_PongDecodeErrorZ_err(e: number): number {
5454                 if(!isWasmInitialized) {
5455                         throw new Error("initializeWasm() must be awaited first!");
5456                 }
5457                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
5458                 return nativeResponseValue;
5459         }
5460         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
5461         export function CResult_PongDecodeErrorZ_free(_res: number): void {
5462                 if(!isWasmInitialized) {
5463                         throw new Error("initializeWasm() must be awaited first!");
5464                 }
5465                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
5466                 // debug statements here
5467         }
5468         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
5469         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
5470                 if(!isWasmInitialized) {
5471                         throw new Error("initializeWasm() must be awaited first!");
5472                 }
5473                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
5474                 return nativeResponseValue;
5475         }
5476         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
5477         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
5478                 if(!isWasmInitialized) {
5479                         throw new Error("initializeWasm() must be awaited first!");
5480                 }
5481                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
5482                 return nativeResponseValue;
5483         }
5484         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5485         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
5486                 if(!isWasmInitialized) {
5487                         throw new Error("initializeWasm() must be awaited first!");
5488                 }
5489                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
5490                 return nativeResponseValue;
5491         }
5492         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
5493         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
5494                 if(!isWasmInitialized) {
5495                         throw new Error("initializeWasm() must be awaited first!");
5496                 }
5497                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
5498                 // debug statements here
5499         }
5500         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5501         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
5502                 if(!isWasmInitialized) {
5503                         throw new Error("initializeWasm() must be awaited first!");
5504                 }
5505                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
5506                 return nativeResponseValue;
5507         }
5508         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
5509         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
5510                 if(!isWasmInitialized) {
5511                         throw new Error("initializeWasm() must be awaited first!");
5512                 }
5513                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
5514                 return nativeResponseValue;
5515         }
5516         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5517         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
5518                 if(!isWasmInitialized) {
5519                         throw new Error("initializeWasm() must be awaited first!");
5520                 }
5521                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
5522                 return nativeResponseValue;
5523         }
5524         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
5525         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
5526                 if(!isWasmInitialized) {
5527                         throw new Error("initializeWasm() must be awaited first!");
5528                 }
5529                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
5530                 // debug statements here
5531         }
5532         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5533         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
5534                 if(!isWasmInitialized) {
5535                         throw new Error("initializeWasm() must be awaited first!");
5536                 }
5537                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
5538                 return nativeResponseValue;
5539         }
5540         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
5541         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
5542                 if(!isWasmInitialized) {
5543                         throw new Error("initializeWasm() must be awaited first!");
5544                 }
5545                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
5546                 return nativeResponseValue;
5547         }
5548         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5549         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
5550                 if(!isWasmInitialized) {
5551                         throw new Error("initializeWasm() must be awaited first!");
5552                 }
5553                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
5554                 return nativeResponseValue;
5555         }
5556         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
5557         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
5558                 if(!isWasmInitialized) {
5559                         throw new Error("initializeWasm() must be awaited first!");
5560                 }
5561                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
5562                 // debug statements here
5563         }
5564         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
5565         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
5566                 if(!isWasmInitialized) {
5567                         throw new Error("initializeWasm() must be awaited first!");
5568                 }
5569                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
5570                 return nativeResponseValue;
5571         }
5572         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
5573         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
5574                 if(!isWasmInitialized) {
5575                         throw new Error("initializeWasm() must be awaited first!");
5576                 }
5577                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
5578                 return nativeResponseValue;
5579         }
5580         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5581         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
5582                 if(!isWasmInitialized) {
5583                         throw new Error("initializeWasm() must be awaited first!");
5584                 }
5585                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
5586                 return nativeResponseValue;
5587         }
5588         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
5589         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
5590                 if(!isWasmInitialized) {
5591                         throw new Error("initializeWasm() must be awaited first!");
5592                 }
5593                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
5594                 // debug statements here
5595         }
5596         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
5597         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
5598                 if(!isWasmInitialized) {
5599                         throw new Error("initializeWasm() must be awaited first!");
5600                 }
5601                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
5602                 return nativeResponseValue;
5603         }
5604         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
5605         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
5606                 if(!isWasmInitialized) {
5607                         throw new Error("initializeWasm() must be awaited first!");
5608                 }
5609                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
5610                 return nativeResponseValue;
5611         }
5612         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
5613         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
5614                 if(!isWasmInitialized) {
5615                         throw new Error("initializeWasm() must be awaited first!");
5616                 }
5617                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
5618                 return nativeResponseValue;
5619         }
5620         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
5621         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
5622                 if(!isWasmInitialized) {
5623                         throw new Error("initializeWasm() must be awaited first!");
5624                 }
5625                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
5626                 // debug statements here
5627         }
5628         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
5629         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
5630                 if(!isWasmInitialized) {
5631                         throw new Error("initializeWasm() must be awaited first!");
5632                 }
5633                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
5634                 return nativeResponseValue;
5635         }
5636         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
5637         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
5638                 if(!isWasmInitialized) {
5639                         throw new Error("initializeWasm() must be awaited first!");
5640                 }
5641                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
5642                 return nativeResponseValue;
5643         }
5644         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5645         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
5646                 if(!isWasmInitialized) {
5647                         throw new Error("initializeWasm() must be awaited first!");
5648                 }
5649                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
5650                 return nativeResponseValue;
5651         }
5652         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
5653         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
5654                 if(!isWasmInitialized) {
5655                         throw new Error("initializeWasm() must be awaited first!");
5656                 }
5657                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
5658                 // debug statements here
5659         }
5660         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5661         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
5662                 if(!isWasmInitialized) {
5663                         throw new Error("initializeWasm() must be awaited first!");
5664                 }
5665                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
5666                 return nativeResponseValue;
5667         }
5668         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
5669         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
5670                 if(!isWasmInitialized) {
5671                         throw new Error("initializeWasm() must be awaited first!");
5672                 }
5673                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
5674                 return nativeResponseValue;
5675         }
5676         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5677         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
5678                 if(!isWasmInitialized) {
5679                         throw new Error("initializeWasm() must be awaited first!");
5680                 }
5681                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
5682                 return nativeResponseValue;
5683         }
5684         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
5685         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
5686                 if(!isWasmInitialized) {
5687                         throw new Error("initializeWasm() must be awaited first!");
5688                 }
5689                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
5690                 // debug statements here
5691         }
5692         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5693         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
5694                 if(!isWasmInitialized) {
5695                         throw new Error("initializeWasm() must be awaited first!");
5696                 }
5697                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
5698                 return nativeResponseValue;
5699         }
5700         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
5701         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
5702                 if(!isWasmInitialized) {
5703                         throw new Error("initializeWasm() must be awaited first!");
5704                 }
5705                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
5706                 return nativeResponseValue;
5707         }
5708         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
5709         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
5710                 if(!isWasmInitialized) {
5711                         throw new Error("initializeWasm() must be awaited first!");
5712                 }
5713                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
5714                 return nativeResponseValue;
5715         }
5716         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
5717         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
5718                 if(!isWasmInitialized) {
5719                         throw new Error("initializeWasm() must be awaited first!");
5720                 }
5721                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
5722                 // debug statements here
5723         }
5724         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
5725         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
5726                 if(!isWasmInitialized) {
5727                         throw new Error("initializeWasm() must be awaited first!");
5728                 }
5729                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
5730                 return nativeResponseValue;
5731         }
5732         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
5733         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
5734                 if(!isWasmInitialized) {
5735                         throw new Error("initializeWasm() must be awaited first!");
5736                 }
5737                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
5738                 return nativeResponseValue;
5739         }
5740         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
5741         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
5742                 if(!isWasmInitialized) {
5743                         throw new Error("initializeWasm() must be awaited first!");
5744                 }
5745                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
5746                 return nativeResponseValue;
5747         }
5748         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
5749         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
5750                 if(!isWasmInitialized) {
5751                         throw new Error("initializeWasm() must be awaited first!");
5752                 }
5753                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
5754                 // debug statements here
5755         }
5756         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
5757         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
5758                 if(!isWasmInitialized) {
5759                         throw new Error("initializeWasm() must be awaited first!");
5760                 }
5761                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
5762                 return nativeResponseValue;
5763         }
5764         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
5765         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
5766                 if(!isWasmInitialized) {
5767                         throw new Error("initializeWasm() must be awaited first!");
5768                 }
5769                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
5770                 return nativeResponseValue;
5771         }
5772         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
5773         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
5774                 if(!isWasmInitialized) {
5775                         throw new Error("initializeWasm() must be awaited first!");
5776                 }
5777                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
5778                 return nativeResponseValue;
5779         }
5780         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
5781         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
5782                 if(!isWasmInitialized) {
5783                         throw new Error("initializeWasm() must be awaited first!");
5784                 }
5785                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
5786                 // debug statements here
5787         }
5788         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
5789         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
5790                 if(!isWasmInitialized) {
5791                         throw new Error("initializeWasm() must be awaited first!");
5792                 }
5793                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
5794                 return nativeResponseValue;
5795         }
5796         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
5797         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
5798                 if(!isWasmInitialized) {
5799                         throw new Error("initializeWasm() must be awaited first!");
5800                 }
5801                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
5802                 return nativeResponseValue;
5803         }
5804         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
5805         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
5806                 if(!isWasmInitialized) {
5807                         throw new Error("initializeWasm() must be awaited first!");
5808                 }
5809                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
5810                 return nativeResponseValue;
5811         }
5812         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
5813         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
5814                 if(!isWasmInitialized) {
5815                         throw new Error("initializeWasm() must be awaited first!");
5816                 }
5817                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
5818                 // debug statements here
5819         }
5820         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
5821         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
5822                 if(!isWasmInitialized) {
5823                         throw new Error("initializeWasm() must be awaited first!");
5824                 }
5825                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
5826                 return nativeResponseValue;
5827         }
5828         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
5829         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
5830                 if(!isWasmInitialized) {
5831                         throw new Error("initializeWasm() must be awaited first!");
5832                 }
5833                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
5834                 return nativeResponseValue;
5835         }
5836         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
5837         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
5838                 if(!isWasmInitialized) {
5839                         throw new Error("initializeWasm() must be awaited first!");
5840                 }
5841                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
5842                 return nativeResponseValue;
5843         }
5844         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
5845         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
5846                 if(!isWasmInitialized) {
5847                         throw new Error("initializeWasm() must be awaited first!");
5848                 }
5849                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
5850                 // debug statements here
5851         }
5852         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
5853         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
5854                 if(!isWasmInitialized) {
5855                         throw new Error("initializeWasm() must be awaited first!");
5856                 }
5857                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
5858                 return nativeResponseValue;
5859         }
5860         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
5861         export function CResult_InvoiceSignOrCreationErrorZ_ok(o: number): number {
5862                 if(!isWasmInitialized) {
5863                         throw new Error("initializeWasm() must be awaited first!");
5864                 }
5865                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_ok(o);
5866                 return nativeResponseValue;
5867         }
5868         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
5869         export function CResult_InvoiceSignOrCreationErrorZ_err(e: number): number {
5870                 if(!isWasmInitialized) {
5871                         throw new Error("initializeWasm() must be awaited first!");
5872                 }
5873                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_err(e);
5874                 return nativeResponseValue;
5875         }
5876         // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
5877         export function CResult_InvoiceSignOrCreationErrorZ_free(_res: number): void {
5878                 if(!isWasmInitialized) {
5879                         throw new Error("initializeWasm() must be awaited first!");
5880                 }
5881                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_free(_res);
5882                 // debug statements here
5883         }
5884         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
5885         export function CResult_InvoiceSignOrCreationErrorZ_clone(orig: number): number {
5886                 if(!isWasmInitialized) {
5887                         throw new Error("initializeWasm() must be awaited first!");
5888                 }
5889                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone(orig);
5890                 return nativeResponseValue;
5891         }
5892         // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
5893         export function PaymentPurpose_free(this_ptr: number): void {
5894                 if(!isWasmInitialized) {
5895                         throw new Error("initializeWasm() must be awaited first!");
5896                 }
5897                 const nativeResponseValue = wasm.PaymentPurpose_free(this_ptr);
5898                 // debug statements here
5899         }
5900         // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
5901         export function PaymentPurpose_clone(orig: number): number {
5902                 if(!isWasmInitialized) {
5903                         throw new Error("initializeWasm() must be awaited first!");
5904                 }
5905                 const nativeResponseValue = wasm.PaymentPurpose_clone(orig);
5906                 return nativeResponseValue;
5907         }
5908         // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t user_payment_id);
5909         export function PaymentPurpose_invoice_payment(payment_preimage: Uint8Array, payment_secret: Uint8Array, user_payment_id: number): number {
5910                 if(!isWasmInitialized) {
5911                         throw new Error("initializeWasm() must be awaited first!");
5912                 }
5913                 const nativeResponseValue = wasm.PaymentPurpose_invoice_payment(encodeArray(payment_preimage), encodeArray(payment_secret), user_payment_id);
5914                 return nativeResponseValue;
5915         }
5916         // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
5917         export function PaymentPurpose_spontaneous_payment(a: Uint8Array): number {
5918                 if(!isWasmInitialized) {
5919                         throw new Error("initializeWasm() must be awaited first!");
5920                 }
5921                 const nativeResponseValue = wasm.PaymentPurpose_spontaneous_payment(encodeArray(a));
5922                 return nativeResponseValue;
5923         }
5924         // void Event_free(struct LDKEvent this_ptr);
5925         export function Event_free(this_ptr: number): void {
5926                 if(!isWasmInitialized) {
5927                         throw new Error("initializeWasm() must be awaited first!");
5928                 }
5929                 const nativeResponseValue = wasm.Event_free(this_ptr);
5930                 // debug statements here
5931         }
5932         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
5933         export function Event_clone(orig: number): number {
5934                 if(!isWasmInitialized) {
5935                         throw new Error("initializeWasm() must be awaited first!");
5936                 }
5937                 const nativeResponseValue = wasm.Event_clone(orig);
5938                 return nativeResponseValue;
5939         }
5940         // 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);
5941         export function Event_funding_generation_ready(temporary_channel_id: Uint8Array, channel_value_satoshis: number, output_script: Uint8Array, user_channel_id: number): number {
5942                 if(!isWasmInitialized) {
5943                         throw new Error("initializeWasm() must be awaited first!");
5944                 }
5945                 const nativeResponseValue = wasm.Event_funding_generation_ready(encodeArray(temporary_channel_id), channel_value_satoshis, encodeArray(output_script), user_channel_id);
5946                 return nativeResponseValue;
5947         }
5948         // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
5949         export function Event_payment_received(payment_hash: Uint8Array, amt: number, purpose: number): number {
5950                 if(!isWasmInitialized) {
5951                         throw new Error("initializeWasm() must be awaited first!");
5952                 }
5953                 const nativeResponseValue = wasm.Event_payment_received(encodeArray(payment_hash), amt, purpose);
5954                 return nativeResponseValue;
5955         }
5956         // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_preimage);
5957         export function Event_payment_sent(payment_preimage: Uint8Array): number {
5958                 if(!isWasmInitialized) {
5959                         throw new Error("initializeWasm() must be awaited first!");
5960                 }
5961                 const nativeResponseValue = wasm.Event_payment_sent(encodeArray(payment_preimage));
5962                 return nativeResponseValue;
5963         }
5964         // struct LDKEvent Event_payment_failed(struct LDKThirtyTwoBytes payment_hash, bool rejected_by_dest);
5965         export function Event_payment_failed(payment_hash: Uint8Array, rejected_by_dest: boolean): number {
5966                 if(!isWasmInitialized) {
5967                         throw new Error("initializeWasm() must be awaited first!");
5968                 }
5969                 const nativeResponseValue = wasm.Event_payment_failed(encodeArray(payment_hash), rejected_by_dest);
5970                 return nativeResponseValue;
5971         }
5972         // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
5973         export function Event_pending_htlcs_forwardable(time_forwardable: number): number {
5974                 if(!isWasmInitialized) {
5975                         throw new Error("initializeWasm() must be awaited first!");
5976                 }
5977                 const nativeResponseValue = wasm.Event_pending_htlcs_forwardable(time_forwardable);
5978                 return nativeResponseValue;
5979         }
5980         // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
5981         export function Event_spendable_outputs(outputs: number[]): number {
5982                 if(!isWasmInitialized) {
5983                         throw new Error("initializeWasm() must be awaited first!");
5984                 }
5985                 const nativeResponseValue = wasm.Event_spendable_outputs(outputs);
5986                 return nativeResponseValue;
5987         }
5988         // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
5989         export function Event_payment_forwarded(fee_earned_msat: number, claim_from_onchain_tx: boolean): number {
5990                 if(!isWasmInitialized) {
5991                         throw new Error("initializeWasm() must be awaited first!");
5992                 }
5993                 const nativeResponseValue = wasm.Event_payment_forwarded(fee_earned_msat, claim_from_onchain_tx);
5994                 return nativeResponseValue;
5995         }
5996         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
5997         export function Event_write(obj: number): Uint8Array {
5998                 if(!isWasmInitialized) {
5999                         throw new Error("initializeWasm() must be awaited first!");
6000                 }
6001                 const nativeResponseValue = wasm.Event_write(obj);
6002                 return decodeArray(nativeResponseValue);
6003         }
6004         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
6005         export function MessageSendEvent_free(this_ptr: number): void {
6006                 if(!isWasmInitialized) {
6007                         throw new Error("initializeWasm() must be awaited first!");
6008                 }
6009                 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
6010                 // debug statements here
6011         }
6012         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
6013         export function MessageSendEvent_clone(orig: number): number {
6014                 if(!isWasmInitialized) {
6015                         throw new Error("initializeWasm() must be awaited first!");
6016                 }
6017                 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
6018                 return nativeResponseValue;
6019         }
6020         // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
6021         export function MessageSendEvent_send_accept_channel(node_id: Uint8Array, msg: number): number {
6022                 if(!isWasmInitialized) {
6023                         throw new Error("initializeWasm() must be awaited first!");
6024                 }
6025                 const nativeResponseValue = wasm.MessageSendEvent_send_accept_channel(encodeArray(node_id), msg);
6026                 return nativeResponseValue;
6027         }
6028         // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
6029         export function MessageSendEvent_send_open_channel(node_id: Uint8Array, msg: number): number {
6030                 if(!isWasmInitialized) {
6031                         throw new Error("initializeWasm() must be awaited first!");
6032                 }
6033                 const nativeResponseValue = wasm.MessageSendEvent_send_open_channel(encodeArray(node_id), msg);
6034                 return nativeResponseValue;
6035         }
6036         // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
6037         export function MessageSendEvent_send_funding_created(node_id: Uint8Array, msg: number): number {
6038                 if(!isWasmInitialized) {
6039                         throw new Error("initializeWasm() must be awaited first!");
6040                 }
6041                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_created(encodeArray(node_id), msg);
6042                 return nativeResponseValue;
6043         }
6044         // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
6045         export function MessageSendEvent_send_funding_signed(node_id: Uint8Array, msg: number): number {
6046                 if(!isWasmInitialized) {
6047                         throw new Error("initializeWasm() must be awaited first!");
6048                 }
6049                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_signed(encodeArray(node_id), msg);
6050                 return nativeResponseValue;
6051         }
6052         // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
6053         export function MessageSendEvent_send_funding_locked(node_id: Uint8Array, msg: number): number {
6054                 if(!isWasmInitialized) {
6055                         throw new Error("initializeWasm() must be awaited first!");
6056                 }
6057                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_locked(encodeArray(node_id), msg);
6058                 return nativeResponseValue;
6059         }
6060         // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
6061         export function MessageSendEvent_send_announcement_signatures(node_id: Uint8Array, msg: number): number {
6062                 if(!isWasmInitialized) {
6063                         throw new Error("initializeWasm() must be awaited first!");
6064                 }
6065                 const nativeResponseValue = wasm.MessageSendEvent_send_announcement_signatures(encodeArray(node_id), msg);
6066                 return nativeResponseValue;
6067         }
6068         // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
6069         export function MessageSendEvent_update_htlcs(node_id: Uint8Array, updates: number): number {
6070                 if(!isWasmInitialized) {
6071                         throw new Error("initializeWasm() must be awaited first!");
6072                 }
6073                 const nativeResponseValue = wasm.MessageSendEvent_update_htlcs(encodeArray(node_id), updates);
6074                 return nativeResponseValue;
6075         }
6076         // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
6077         export function MessageSendEvent_send_revoke_and_ack(node_id: Uint8Array, msg: number): number {
6078                 if(!isWasmInitialized) {
6079                         throw new Error("initializeWasm() must be awaited first!");
6080                 }
6081                 const nativeResponseValue = wasm.MessageSendEvent_send_revoke_and_ack(encodeArray(node_id), msg);
6082                 return nativeResponseValue;
6083         }
6084         // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
6085         export function MessageSendEvent_send_closing_signed(node_id: Uint8Array, msg: number): number {
6086                 if(!isWasmInitialized) {
6087                         throw new Error("initializeWasm() must be awaited first!");
6088                 }
6089                 const nativeResponseValue = wasm.MessageSendEvent_send_closing_signed(encodeArray(node_id), msg);
6090                 return nativeResponseValue;
6091         }
6092         // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
6093         export function MessageSendEvent_send_shutdown(node_id: Uint8Array, msg: number): number {
6094                 if(!isWasmInitialized) {
6095                         throw new Error("initializeWasm() must be awaited first!");
6096                 }
6097                 const nativeResponseValue = wasm.MessageSendEvent_send_shutdown(encodeArray(node_id), msg);
6098                 return nativeResponseValue;
6099         }
6100         // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
6101         export function MessageSendEvent_send_channel_reestablish(node_id: Uint8Array, msg: number): number {
6102                 if(!isWasmInitialized) {
6103                         throw new Error("initializeWasm() must be awaited first!");
6104                 }
6105                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_reestablish(encodeArray(node_id), msg);
6106                 return nativeResponseValue;
6107         }
6108         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
6109         export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
6110                 if(!isWasmInitialized) {
6111                         throw new Error("initializeWasm() must be awaited first!");
6112                 }
6113                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
6114                 return nativeResponseValue;
6115         }
6116         // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
6117         export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
6118                 if(!isWasmInitialized) {
6119                         throw new Error("initializeWasm() must be awaited first!");
6120                 }
6121                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_node_announcement(msg);
6122                 return nativeResponseValue;
6123         }
6124         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
6125         export function MessageSendEvent_broadcast_channel_update(msg: number): number {
6126                 if(!isWasmInitialized) {
6127                         throw new Error("initializeWasm() must be awaited first!");
6128                 }
6129                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_update(msg);
6130                 return nativeResponseValue;
6131         }
6132         // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
6133         export function MessageSendEvent_send_channel_update(node_id: Uint8Array, msg: number): number {
6134                 if(!isWasmInitialized) {
6135                         throw new Error("initializeWasm() must be awaited first!");
6136                 }
6137                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_update(encodeArray(node_id), msg);
6138                 return nativeResponseValue;
6139         }
6140         // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
6141         export function MessageSendEvent_handle_error(node_id: Uint8Array, action: number): number {
6142                 if(!isWasmInitialized) {
6143                         throw new Error("initializeWasm() must be awaited first!");
6144                 }
6145                 const nativeResponseValue = wasm.MessageSendEvent_handle_error(encodeArray(node_id), action);
6146                 return nativeResponseValue;
6147         }
6148         // struct LDKMessageSendEvent MessageSendEvent_payment_failure_network_update(struct LDKHTLCFailChannelUpdate update);
6149         export function MessageSendEvent_payment_failure_network_update(update: number): number {
6150                 if(!isWasmInitialized) {
6151                         throw new Error("initializeWasm() must be awaited first!");
6152                 }
6153                 const nativeResponseValue = wasm.MessageSendEvent_payment_failure_network_update(update);
6154                 return nativeResponseValue;
6155         }
6156         // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
6157         export function MessageSendEvent_send_channel_range_query(node_id: Uint8Array, msg: number): number {
6158                 if(!isWasmInitialized) {
6159                         throw new Error("initializeWasm() must be awaited first!");
6160                 }
6161                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_range_query(encodeArray(node_id), msg);
6162                 return nativeResponseValue;
6163         }
6164         // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
6165         export function MessageSendEvent_send_short_ids_query(node_id: Uint8Array, msg: number): number {
6166                 if(!isWasmInitialized) {
6167                         throw new Error("initializeWasm() must be awaited first!");
6168                 }
6169                 const nativeResponseValue = wasm.MessageSendEvent_send_short_ids_query(encodeArray(node_id), msg);
6170                 return nativeResponseValue;
6171         }
6172         // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
6173         export function MessageSendEvent_send_reply_channel_range(node_id: Uint8Array, msg: number): number {
6174                 if(!isWasmInitialized) {
6175                         throw new Error("initializeWasm() must be awaited first!");
6176                 }
6177                 const nativeResponseValue = wasm.MessageSendEvent_send_reply_channel_range(encodeArray(node_id), msg);
6178                 return nativeResponseValue;
6179         }
6180         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
6181         export function MessageSendEventsProvider_free(this_ptr: number): void {
6182                 if(!isWasmInitialized) {
6183                         throw new Error("initializeWasm() must be awaited first!");
6184                 }
6185                 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
6186                 // debug statements here
6187         }
6188         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
6189         export function EventsProvider_free(this_ptr: number): void {
6190                 if(!isWasmInitialized) {
6191                         throw new Error("initializeWasm() must be awaited first!");
6192                 }
6193                 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
6194                 // debug statements here
6195         }
6196         // void EventHandler_free(struct LDKEventHandler this_ptr);
6197         export function EventHandler_free(this_ptr: number): void {
6198                 if(!isWasmInitialized) {
6199                         throw new Error("initializeWasm() must be awaited first!");
6200                 }
6201                 const nativeResponseValue = wasm.EventHandler_free(this_ptr);
6202                 // debug statements here
6203         }
6204         // void APIError_free(struct LDKAPIError this_ptr);
6205         export function APIError_free(this_ptr: number): void {
6206                 if(!isWasmInitialized) {
6207                         throw new Error("initializeWasm() must be awaited first!");
6208                 }
6209                 const nativeResponseValue = wasm.APIError_free(this_ptr);
6210                 // debug statements here
6211         }
6212         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
6213         export function APIError_clone(orig: number): number {
6214                 if(!isWasmInitialized) {
6215                         throw new Error("initializeWasm() must be awaited first!");
6216                 }
6217                 const nativeResponseValue = wasm.APIError_clone(orig);
6218                 return nativeResponseValue;
6219         }
6220         // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
6221         export function APIError_apimisuse_error(err: String): number {
6222                 if(!isWasmInitialized) {
6223                         throw new Error("initializeWasm() must be awaited first!");
6224                 }
6225                 const nativeResponseValue = wasm.APIError_apimisuse_error(err);
6226                 return nativeResponseValue;
6227         }
6228         // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
6229         export function APIError_fee_rate_too_high(err: String, feerate: number): number {
6230                 if(!isWasmInitialized) {
6231                         throw new Error("initializeWasm() must be awaited first!");
6232                 }
6233                 const nativeResponseValue = wasm.APIError_fee_rate_too_high(err, feerate);
6234                 return nativeResponseValue;
6235         }
6236         // struct LDKAPIError APIError_route_error(struct LDKStr err);
6237         export function APIError_route_error(err: String): number {
6238                 if(!isWasmInitialized) {
6239                         throw new Error("initializeWasm() must be awaited first!");
6240                 }
6241                 const nativeResponseValue = wasm.APIError_route_error(err);
6242                 return nativeResponseValue;
6243         }
6244         // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
6245         export function APIError_channel_unavailable(err: String): number {
6246                 if(!isWasmInitialized) {
6247                         throw new Error("initializeWasm() must be awaited first!");
6248                 }
6249                 const nativeResponseValue = wasm.APIError_channel_unavailable(err);
6250                 return nativeResponseValue;
6251         }
6252         // struct LDKAPIError APIError_monitor_update_failed(void);
6253         export function APIError_monitor_update_failed(): number {
6254                 if(!isWasmInitialized) {
6255                         throw new Error("initializeWasm() must be awaited first!");
6256                 }
6257                 const nativeResponseValue = wasm.APIError_monitor_update_failed();
6258                 return nativeResponseValue;
6259         }
6260         // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
6261         export function APIError_incompatible_shutdown_script(script: number): number {
6262                 if(!isWasmInitialized) {
6263                         throw new Error("initializeWasm() must be awaited first!");
6264                 }
6265                 const nativeResponseValue = wasm.APIError_incompatible_shutdown_script(script);
6266                 return nativeResponseValue;
6267         }
6268         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
6269         export function sign(msg: Uint8Array, sk: Uint8Array): number {
6270                 if(!isWasmInitialized) {
6271                         throw new Error("initializeWasm() must be awaited first!");
6272                 }
6273                 const nativeResponseValue = wasm.sign(encodeArray(msg), encodeArray(sk));
6274                 return nativeResponseValue;
6275         }
6276         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
6277         export function recover_pk(msg: Uint8Array, sig: String): number {
6278                 if(!isWasmInitialized) {
6279                         throw new Error("initializeWasm() must be awaited first!");
6280                 }
6281                 const nativeResponseValue = wasm.recover_pk(encodeArray(msg), sig);
6282                 return nativeResponseValue;
6283         }
6284         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
6285         export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
6286                 if(!isWasmInitialized) {
6287                         throw new Error("initializeWasm() must be awaited first!");
6288                 }
6289                 const nativeResponseValue = wasm.verify(encodeArray(msg), sig, encodeArray(pk));
6290                 return nativeResponseValue;
6291         }
6292         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
6293         export function Level_clone(orig: number): Level {
6294                 if(!isWasmInitialized) {
6295                         throw new Error("initializeWasm() must be awaited first!");
6296                 }
6297                 const nativeResponseValue = wasm.Level_clone(orig);
6298                 return nativeResponseValue;
6299         }
6300         // enum LDKLevel Level_trace(void);
6301         export function Level_trace(): Level {
6302                 if(!isWasmInitialized) {
6303                         throw new Error("initializeWasm() must be awaited first!");
6304                 }
6305                 const nativeResponseValue = wasm.Level_trace();
6306                 return nativeResponseValue;
6307         }
6308         // enum LDKLevel Level_debug(void);
6309         export function Level_debug(): Level {
6310                 if(!isWasmInitialized) {
6311                         throw new Error("initializeWasm() must be awaited first!");
6312                 }
6313                 const nativeResponseValue = wasm.Level_debug();
6314                 return nativeResponseValue;
6315         }
6316         // enum LDKLevel Level_info(void);
6317         export function Level_info(): Level {
6318                 if(!isWasmInitialized) {
6319                         throw new Error("initializeWasm() must be awaited first!");
6320                 }
6321                 const nativeResponseValue = wasm.Level_info();
6322                 return nativeResponseValue;
6323         }
6324         // enum LDKLevel Level_warn(void);
6325         export function Level_warn(): Level {
6326                 if(!isWasmInitialized) {
6327                         throw new Error("initializeWasm() must be awaited first!");
6328                 }
6329                 const nativeResponseValue = wasm.Level_warn();
6330                 return nativeResponseValue;
6331         }
6332         // enum LDKLevel Level_error(void);
6333         export function Level_error(): Level {
6334                 if(!isWasmInitialized) {
6335                         throw new Error("initializeWasm() must be awaited first!");
6336                 }
6337                 const nativeResponseValue = wasm.Level_error();
6338                 return nativeResponseValue;
6339         }
6340         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
6341         export function Level_eq(a: number, b: number): boolean {
6342                 if(!isWasmInitialized) {
6343                         throw new Error("initializeWasm() must be awaited first!");
6344                 }
6345                 const nativeResponseValue = wasm.Level_eq(a, b);
6346                 return nativeResponseValue;
6347         }
6348         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
6349         export function Level_hash(o: number): number {
6350                 if(!isWasmInitialized) {
6351                         throw new Error("initializeWasm() must be awaited first!");
6352                 }
6353                 const nativeResponseValue = wasm.Level_hash(o);
6354                 return nativeResponseValue;
6355         }
6356         // MUST_USE_RES enum LDKLevel Level_max(void);
6357         export function Level_max(): Level {
6358                 if(!isWasmInitialized) {
6359                         throw new Error("initializeWasm() must be awaited first!");
6360                 }
6361                 const nativeResponseValue = wasm.Level_max();
6362                 return nativeResponseValue;
6363         }
6364         // void Logger_free(struct LDKLogger this_ptr);
6365         export function Logger_free(this_ptr: number): void {
6366                 if(!isWasmInitialized) {
6367                         throw new Error("initializeWasm() must be awaited first!");
6368                 }
6369                 const nativeResponseValue = wasm.Logger_free(this_ptr);
6370                 // debug statements here
6371         }
6372         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
6373         export function ChannelHandshakeConfig_free(this_obj: number): void {
6374                 if(!isWasmInitialized) {
6375                         throw new Error("initializeWasm() must be awaited first!");
6376                 }
6377                 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
6378                 // debug statements here
6379         }
6380         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
6381         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
6382                 if(!isWasmInitialized) {
6383                         throw new Error("initializeWasm() must be awaited first!");
6384                 }
6385                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
6386                 return nativeResponseValue;
6387         }
6388         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
6389         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
6390                 if(!isWasmInitialized) {
6391                         throw new Error("initializeWasm() must be awaited first!");
6392                 }
6393                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
6394                 // debug statements here
6395         }
6396         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
6397         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
6398                 if(!isWasmInitialized) {
6399                         throw new Error("initializeWasm() must be awaited first!");
6400                 }
6401                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
6402                 return nativeResponseValue;
6403         }
6404         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
6405         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
6406                 if(!isWasmInitialized) {
6407                         throw new Error("initializeWasm() must be awaited first!");
6408                 }
6409                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
6410                 // debug statements here
6411         }
6412         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
6413         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
6414                 if(!isWasmInitialized) {
6415                         throw new Error("initializeWasm() must be awaited first!");
6416                 }
6417                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
6418                 return nativeResponseValue;
6419         }
6420         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
6421         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
6422                 if(!isWasmInitialized) {
6423                         throw new Error("initializeWasm() must be awaited first!");
6424                 }
6425                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
6426                 // debug statements here
6427         }
6428         // 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);
6429         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
6430                 if(!isWasmInitialized) {
6431                         throw new Error("initializeWasm() must be awaited first!");
6432                 }
6433                 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
6434                 return nativeResponseValue;
6435         }
6436         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
6437         export function ChannelHandshakeConfig_clone(orig: number): number {
6438                 if(!isWasmInitialized) {
6439                         throw new Error("initializeWasm() must be awaited first!");
6440                 }
6441                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
6442                 return nativeResponseValue;
6443         }
6444         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
6445         export function ChannelHandshakeConfig_default(): number {
6446                 if(!isWasmInitialized) {
6447                         throw new Error("initializeWasm() must be awaited first!");
6448                 }
6449                 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
6450                 return nativeResponseValue;
6451         }
6452         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
6453         export function ChannelHandshakeLimits_free(this_obj: number): void {
6454                 if(!isWasmInitialized) {
6455                         throw new Error("initializeWasm() must be awaited first!");
6456                 }
6457                 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
6458                 // debug statements here
6459         }
6460         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6461         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
6462                 if(!isWasmInitialized) {
6463                         throw new Error("initializeWasm() must be awaited first!");
6464                 }
6465                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
6466                 return nativeResponseValue;
6467         }
6468         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
6469         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
6470                 if(!isWasmInitialized) {
6471                         throw new Error("initializeWasm() must be awaited first!");
6472                 }
6473                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
6474                 // debug statements here
6475         }
6476         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6477         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
6478                 if(!isWasmInitialized) {
6479                         throw new Error("initializeWasm() must be awaited first!");
6480                 }
6481                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
6482                 return nativeResponseValue;
6483         }
6484         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
6485         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
6486                 if(!isWasmInitialized) {
6487                         throw new Error("initializeWasm() must be awaited first!");
6488                 }
6489                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
6490                 // debug statements here
6491         }
6492         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6493         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
6494                 if(!isWasmInitialized) {
6495                         throw new Error("initializeWasm() must be awaited first!");
6496                 }
6497                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
6498                 return nativeResponseValue;
6499         }
6500         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
6501         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
6502                 if(!isWasmInitialized) {
6503                         throw new Error("initializeWasm() must be awaited first!");
6504                 }
6505                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
6506                 // debug statements here
6507         }
6508         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6509         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
6510                 if(!isWasmInitialized) {
6511                         throw new Error("initializeWasm() must be awaited first!");
6512                 }
6513                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
6514                 return nativeResponseValue;
6515         }
6516         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
6517         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
6518                 if(!isWasmInitialized) {
6519                         throw new Error("initializeWasm() must be awaited first!");
6520                 }
6521                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
6522                 // debug statements here
6523         }
6524         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6525         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
6526                 if(!isWasmInitialized) {
6527                         throw new Error("initializeWasm() must be awaited first!");
6528                 }
6529                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
6530                 return nativeResponseValue;
6531         }
6532         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
6533         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
6534                 if(!isWasmInitialized) {
6535                         throw new Error("initializeWasm() must be awaited first!");
6536                 }
6537                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
6538                 // debug statements here
6539         }
6540         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6541         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
6542                 if(!isWasmInitialized) {
6543                         throw new Error("initializeWasm() must be awaited first!");
6544                 }
6545                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
6546                 return nativeResponseValue;
6547         }
6548         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
6549         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
6550                 if(!isWasmInitialized) {
6551                         throw new Error("initializeWasm() must be awaited first!");
6552                 }
6553                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
6554                 // debug statements here
6555         }
6556         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6557         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
6558                 if(!isWasmInitialized) {
6559                         throw new Error("initializeWasm() must be awaited first!");
6560                 }
6561                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
6562                 return nativeResponseValue;
6563         }
6564         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
6565         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
6566                 if(!isWasmInitialized) {
6567                         throw new Error("initializeWasm() must be awaited first!");
6568                 }
6569                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
6570                 // debug statements here
6571         }
6572         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6573         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
6574                 if(!isWasmInitialized) {
6575                         throw new Error("initializeWasm() must be awaited first!");
6576                 }
6577                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
6578                 return nativeResponseValue;
6579         }
6580         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
6581         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
6582                 if(!isWasmInitialized) {
6583                         throw new Error("initializeWasm() must be awaited first!");
6584                 }
6585                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
6586                 // debug statements here
6587         }
6588         // 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);
6589         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 {
6590                 if(!isWasmInitialized) {
6591                         throw new Error("initializeWasm() must be awaited first!");
6592                 }
6593                 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);
6594                 return nativeResponseValue;
6595         }
6596         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
6597         export function ChannelHandshakeLimits_clone(orig: number): number {
6598                 if(!isWasmInitialized) {
6599                         throw new Error("initializeWasm() must be awaited first!");
6600                 }
6601                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
6602                 return nativeResponseValue;
6603         }
6604         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
6605         export function ChannelHandshakeLimits_default(): number {
6606                 if(!isWasmInitialized) {
6607                         throw new Error("initializeWasm() must be awaited first!");
6608                 }
6609                 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
6610                 return nativeResponseValue;
6611         }
6612         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
6613         export function ChannelConfig_free(this_obj: number): void {
6614                 if(!isWasmInitialized) {
6615                         throw new Error("initializeWasm() must be awaited first!");
6616                 }
6617                 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
6618                 // debug statements here
6619         }
6620         // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6621         export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
6622                 if(!isWasmInitialized) {
6623                         throw new Error("initializeWasm() must be awaited first!");
6624                 }
6625                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
6626                 return nativeResponseValue;
6627         }
6628         // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
6629         export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
6630                 if(!isWasmInitialized) {
6631                         throw new Error("initializeWasm() must be awaited first!");
6632                 }
6633                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
6634                 // debug statements here
6635         }
6636         // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6637         export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
6638                 if(!isWasmInitialized) {
6639                         throw new Error("initializeWasm() must be awaited first!");
6640                 }
6641                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
6642                 return nativeResponseValue;
6643         }
6644         // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
6645         export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
6646                 if(!isWasmInitialized) {
6647                         throw new Error("initializeWasm() must be awaited first!");
6648                 }
6649                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
6650                 // debug statements here
6651         }
6652         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6653         export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
6654                 if(!isWasmInitialized) {
6655                         throw new Error("initializeWasm() must be awaited first!");
6656                 }
6657                 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
6658                 return nativeResponseValue;
6659         }
6660         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
6661         export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
6662                 if(!isWasmInitialized) {
6663                         throw new Error("initializeWasm() must be awaited first!");
6664                 }
6665                 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
6666                 // debug statements here
6667         }
6668         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6669         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
6670                 if(!isWasmInitialized) {
6671                         throw new Error("initializeWasm() must be awaited first!");
6672                 }
6673                 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
6674                 return nativeResponseValue;
6675         }
6676         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
6677         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
6678                 if(!isWasmInitialized) {
6679                         throw new Error("initializeWasm() must be awaited first!");
6680                 }
6681                 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
6682                 // debug statements here
6683         }
6684         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6685         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
6686                 if(!isWasmInitialized) {
6687                         throw new Error("initializeWasm() must be awaited first!");
6688                 }
6689                 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
6690                 return nativeResponseValue;
6691         }
6692         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
6693         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
6694                 if(!isWasmInitialized) {
6695                         throw new Error("initializeWasm() must be awaited first!");
6696                 }
6697                 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
6698                 // debug statements here
6699         }
6700         // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6701         export function ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr: number): number {
6702                 if(!isWasmInitialized) {
6703                         throw new Error("initializeWasm() must be awaited first!");
6704                 }
6705                 const nativeResponseValue = wasm.ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr);
6706                 return nativeResponseValue;
6707         }
6708         // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
6709         export function ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr: number, val: number): void {
6710                 if(!isWasmInitialized) {
6711                         throw new Error("initializeWasm() must be awaited first!");
6712                 }
6713                 const nativeResponseValue = wasm.ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr, val);
6714                 // debug statements here
6715         }
6716         // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6717         export function ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr: number): number {
6718                 if(!isWasmInitialized) {
6719                         throw new Error("initializeWasm() must be awaited first!");
6720                 }
6721                 const nativeResponseValue = wasm.ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr);
6722                 return nativeResponseValue;
6723         }
6724         // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
6725         export function ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr: number, val: number): void {
6726                 if(!isWasmInitialized) {
6727                         throw new Error("initializeWasm() must be awaited first!");
6728                 }
6729                 const nativeResponseValue = wasm.ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr, val);
6730                 // debug statements here
6731         }
6732         // 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);
6733         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 {
6734                 if(!isWasmInitialized) {
6735                         throw new Error("initializeWasm() must be awaited first!");
6736                 }
6737                 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);
6738                 return nativeResponseValue;
6739         }
6740         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
6741         export function ChannelConfig_clone(orig: number): number {
6742                 if(!isWasmInitialized) {
6743                         throw new Error("initializeWasm() must be awaited first!");
6744                 }
6745                 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
6746                 return nativeResponseValue;
6747         }
6748         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
6749         export function ChannelConfig_default(): number {
6750                 if(!isWasmInitialized) {
6751                         throw new Error("initializeWasm() must be awaited first!");
6752                 }
6753                 const nativeResponseValue = wasm.ChannelConfig_default();
6754                 return nativeResponseValue;
6755         }
6756         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
6757         export function ChannelConfig_write(obj: number): Uint8Array {
6758                 if(!isWasmInitialized) {
6759                         throw new Error("initializeWasm() must be awaited first!");
6760                 }
6761                 const nativeResponseValue = wasm.ChannelConfig_write(obj);
6762                 return decodeArray(nativeResponseValue);
6763         }
6764         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
6765         export function ChannelConfig_read(ser: Uint8Array): number {
6766                 if(!isWasmInitialized) {
6767                         throw new Error("initializeWasm() must be awaited first!");
6768                 }
6769                 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
6770                 return nativeResponseValue;
6771         }
6772         // void UserConfig_free(struct LDKUserConfig this_obj);
6773         export function UserConfig_free(this_obj: number): void {
6774                 if(!isWasmInitialized) {
6775                         throw new Error("initializeWasm() must be awaited first!");
6776                 }
6777                 const nativeResponseValue = wasm.UserConfig_free(this_obj);
6778                 // debug statements here
6779         }
6780         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6781         export function UserConfig_get_own_channel_config(this_ptr: number): number {
6782                 if(!isWasmInitialized) {
6783                         throw new Error("initializeWasm() must be awaited first!");
6784                 }
6785                 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
6786                 return nativeResponseValue;
6787         }
6788         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
6789         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
6790                 if(!isWasmInitialized) {
6791                         throw new Error("initializeWasm() must be awaited first!");
6792                 }
6793                 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
6794                 // debug statements here
6795         }
6796         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6797         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
6798                 if(!isWasmInitialized) {
6799                         throw new Error("initializeWasm() must be awaited first!");
6800                 }
6801                 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
6802                 return nativeResponseValue;
6803         }
6804         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
6805         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
6806                 if(!isWasmInitialized) {
6807                         throw new Error("initializeWasm() must be awaited first!");
6808                 }
6809                 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
6810                 // debug statements here
6811         }
6812         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6813         export function UserConfig_get_channel_options(this_ptr: number): number {
6814                 if(!isWasmInitialized) {
6815                         throw new Error("initializeWasm() must be awaited first!");
6816                 }
6817                 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
6818                 return nativeResponseValue;
6819         }
6820         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
6821         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
6822                 if(!isWasmInitialized) {
6823                         throw new Error("initializeWasm() must be awaited first!");
6824                 }
6825                 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
6826                 // debug statements here
6827         }
6828         // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6829         export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
6830                 if(!isWasmInitialized) {
6831                         throw new Error("initializeWasm() must be awaited first!");
6832                 }
6833                 const nativeResponseValue = wasm.UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
6834                 return nativeResponseValue;
6835         }
6836         // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
6837         export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
6838                 if(!isWasmInitialized) {
6839                         throw new Error("initializeWasm() must be awaited first!");
6840                 }
6841                 const nativeResponseValue = wasm.UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
6842                 // debug statements here
6843         }
6844         // 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);
6845         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 {
6846                 if(!isWasmInitialized) {
6847                         throw new Error("initializeWasm() must be awaited first!");
6848                 }
6849                 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg, accept_forwards_to_priv_channels_arg);
6850                 return nativeResponseValue;
6851         }
6852         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
6853         export function UserConfig_clone(orig: number): number {
6854                 if(!isWasmInitialized) {
6855                         throw new Error("initializeWasm() must be awaited first!");
6856                 }
6857                 const nativeResponseValue = wasm.UserConfig_clone(orig);
6858                 return nativeResponseValue;
6859         }
6860         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
6861         export function UserConfig_default(): number {
6862                 if(!isWasmInitialized) {
6863                         throw new Error("initializeWasm() must be awaited first!");
6864                 }
6865                 const nativeResponseValue = wasm.UserConfig_default();
6866                 return nativeResponseValue;
6867         }
6868         // void BestBlock_free(struct LDKBestBlock this_obj);
6869         export function BestBlock_free(this_obj: number): void {
6870                 if(!isWasmInitialized) {
6871                         throw new Error("initializeWasm() must be awaited first!");
6872                 }
6873                 const nativeResponseValue = wasm.BestBlock_free(this_obj);
6874                 // debug statements here
6875         }
6876         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
6877         export function BestBlock_clone(orig: number): number {
6878                 if(!isWasmInitialized) {
6879                         throw new Error("initializeWasm() must be awaited first!");
6880                 }
6881                 const nativeResponseValue = wasm.BestBlock_clone(orig);
6882                 return nativeResponseValue;
6883         }
6884         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
6885         export function BestBlock_from_genesis(network: Network): number {
6886                 if(!isWasmInitialized) {
6887                         throw new Error("initializeWasm() must be awaited first!");
6888                 }
6889                 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
6890                 return nativeResponseValue;
6891         }
6892         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
6893         export function BestBlock_new(block_hash: Uint8Array, height: number): number {
6894                 if(!isWasmInitialized) {
6895                         throw new Error("initializeWasm() must be awaited first!");
6896                 }
6897                 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
6898                 return nativeResponseValue;
6899         }
6900         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
6901         export function BestBlock_block_hash(this_arg: number): Uint8Array {
6902                 if(!isWasmInitialized) {
6903                         throw new Error("initializeWasm() must be awaited first!");
6904                 }
6905                 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
6906                 return decodeArray(nativeResponseValue);
6907         }
6908         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
6909         export function BestBlock_height(this_arg: number): number {
6910                 if(!isWasmInitialized) {
6911                         throw new Error("initializeWasm() must be awaited first!");
6912                 }
6913                 const nativeResponseValue = wasm.BestBlock_height(this_arg);
6914                 return nativeResponseValue;
6915         }
6916         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
6917         export function AccessError_clone(orig: number): AccessError {
6918                 if(!isWasmInitialized) {
6919                         throw new Error("initializeWasm() must be awaited first!");
6920                 }
6921                 const nativeResponseValue = wasm.AccessError_clone(orig);
6922                 return nativeResponseValue;
6923         }
6924         // enum LDKAccessError AccessError_unknown_chain(void);
6925         export function AccessError_unknown_chain(): AccessError {
6926                 if(!isWasmInitialized) {
6927                         throw new Error("initializeWasm() must be awaited first!");
6928                 }
6929                 const nativeResponseValue = wasm.AccessError_unknown_chain();
6930                 return nativeResponseValue;
6931         }
6932         // enum LDKAccessError AccessError_unknown_tx(void);
6933         export function AccessError_unknown_tx(): AccessError {
6934                 if(!isWasmInitialized) {
6935                         throw new Error("initializeWasm() must be awaited first!");
6936                 }
6937                 const nativeResponseValue = wasm.AccessError_unknown_tx();
6938                 return nativeResponseValue;
6939         }
6940         // void Access_free(struct LDKAccess this_ptr);
6941         export function Access_free(this_ptr: number): void {
6942                 if(!isWasmInitialized) {
6943                         throw new Error("initializeWasm() must be awaited first!");
6944                 }
6945                 const nativeResponseValue = wasm.Access_free(this_ptr);
6946                 // debug statements here
6947         }
6948         // void Listen_free(struct LDKListen this_ptr);
6949         export function Listen_free(this_ptr: number): void {
6950                 if(!isWasmInitialized) {
6951                         throw new Error("initializeWasm() must be awaited first!");
6952                 }
6953                 const nativeResponseValue = wasm.Listen_free(this_ptr);
6954                 // debug statements here
6955         }
6956         // void Confirm_free(struct LDKConfirm this_ptr);
6957         export function Confirm_free(this_ptr: number): void {
6958                 if(!isWasmInitialized) {
6959                         throw new Error("initializeWasm() must be awaited first!");
6960                 }
6961                 const nativeResponseValue = wasm.Confirm_free(this_ptr);
6962                 // debug statements here
6963         }
6964         // void Watch_free(struct LDKWatch this_ptr);
6965         export function Watch_free(this_ptr: number): void {
6966                 if(!isWasmInitialized) {
6967                         throw new Error("initializeWasm() must be awaited first!");
6968                 }
6969                 const nativeResponseValue = wasm.Watch_free(this_ptr);
6970                 // debug statements here
6971         }
6972         // void Filter_free(struct LDKFilter this_ptr);
6973         export function Filter_free(this_ptr: number): void {
6974                 if(!isWasmInitialized) {
6975                         throw new Error("initializeWasm() must be awaited first!");
6976                 }
6977                 const nativeResponseValue = wasm.Filter_free(this_ptr);
6978                 // debug statements here
6979         }
6980         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
6981         export function WatchedOutput_free(this_obj: number): void {
6982                 if(!isWasmInitialized) {
6983                         throw new Error("initializeWasm() must be awaited first!");
6984                 }
6985                 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
6986                 // debug statements here
6987         }
6988         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
6989         export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
6990                 if(!isWasmInitialized) {
6991                         throw new Error("initializeWasm() must be awaited first!");
6992                 }
6993                 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
6994                 return decodeArray(nativeResponseValue);
6995         }
6996         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6997         export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
6998                 if(!isWasmInitialized) {
6999                         throw new Error("initializeWasm() must be awaited first!");
7000                 }
7001                 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
7002                 // debug statements here
7003         }
7004         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
7005         export function WatchedOutput_get_outpoint(this_ptr: number): number {
7006                 if(!isWasmInitialized) {
7007                         throw new Error("initializeWasm() must be awaited first!");
7008                 }
7009                 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
7010                 return nativeResponseValue;
7011         }
7012         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
7013         export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
7014                 if(!isWasmInitialized) {
7015                         throw new Error("initializeWasm() must be awaited first!");
7016                 }
7017                 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
7018                 // debug statements here
7019         }
7020         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
7021         export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
7022                 if(!isWasmInitialized) {
7023                         throw new Error("initializeWasm() must be awaited first!");
7024                 }
7025                 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
7026                 return decodeArray(nativeResponseValue);
7027         }
7028         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7029         export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
7030                 if(!isWasmInitialized) {
7031                         throw new Error("initializeWasm() must be awaited first!");
7032                 }
7033                 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
7034                 // debug statements here
7035         }
7036         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
7037         export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
7038                 if(!isWasmInitialized) {
7039                         throw new Error("initializeWasm() must be awaited first!");
7040                 }
7041                 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
7042                 return nativeResponseValue;
7043         }
7044         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
7045         export function WatchedOutput_clone(orig: number): number {
7046                 if(!isWasmInitialized) {
7047                         throw new Error("initializeWasm() must be awaited first!");
7048                 }
7049                 const nativeResponseValue = wasm.WatchedOutput_clone(orig);
7050                 return nativeResponseValue;
7051         }
7052         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
7053         export function WatchedOutput_hash(o: number): number {
7054                 if(!isWasmInitialized) {
7055                         throw new Error("initializeWasm() must be awaited first!");
7056                 }
7057                 const nativeResponseValue = wasm.WatchedOutput_hash(o);
7058                 return nativeResponseValue;
7059         }
7060         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
7061         export function BroadcasterInterface_free(this_ptr: number): void {
7062                 if(!isWasmInitialized) {
7063                         throw new Error("initializeWasm() must be awaited first!");
7064                 }
7065                 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
7066                 // debug statements here
7067         }
7068         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
7069         export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
7070                 if(!isWasmInitialized) {
7071                         throw new Error("initializeWasm() must be awaited first!");
7072                 }
7073                 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
7074                 return nativeResponseValue;
7075         }
7076         // enum LDKConfirmationTarget ConfirmationTarget_background(void);
7077         export function ConfirmationTarget_background(): ConfirmationTarget {
7078                 if(!isWasmInitialized) {
7079                         throw new Error("initializeWasm() must be awaited first!");
7080                 }
7081                 const nativeResponseValue = wasm.ConfirmationTarget_background();
7082                 return nativeResponseValue;
7083         }
7084         // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
7085         export function ConfirmationTarget_normal(): ConfirmationTarget {
7086                 if(!isWasmInitialized) {
7087                         throw new Error("initializeWasm() must be awaited first!");
7088                 }
7089                 const nativeResponseValue = wasm.ConfirmationTarget_normal();
7090                 return nativeResponseValue;
7091         }
7092         // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
7093         export function ConfirmationTarget_high_priority(): ConfirmationTarget {
7094                 if(!isWasmInitialized) {
7095                         throw new Error("initializeWasm() must be awaited first!");
7096                 }
7097                 const nativeResponseValue = wasm.ConfirmationTarget_high_priority();
7098                 return nativeResponseValue;
7099         }
7100         // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
7101         export function ConfirmationTarget_eq(a: number, b: number): boolean {
7102                 if(!isWasmInitialized) {
7103                         throw new Error("initializeWasm() must be awaited first!");
7104                 }
7105                 const nativeResponseValue = wasm.ConfirmationTarget_eq(a, b);
7106                 return nativeResponseValue;
7107         }
7108         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
7109         export function FeeEstimator_free(this_ptr: number): void {
7110                 if(!isWasmInitialized) {
7111                         throw new Error("initializeWasm() must be awaited first!");
7112                 }
7113                 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
7114                 // debug statements here
7115         }
7116         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
7117         export function ChainMonitor_free(this_obj: number): void {
7118                 if(!isWasmInitialized) {
7119                         throw new Error("initializeWasm() must be awaited first!");
7120                 }
7121                 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
7122                 // debug statements here
7123         }
7124         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
7125         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
7126                 if(!isWasmInitialized) {
7127                         throw new Error("initializeWasm() must be awaited first!");
7128                 }
7129                 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
7130                 return nativeResponseValue;
7131         }
7132         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
7133         export function ChainMonitor_as_Listen(this_arg: number): number {
7134                 if(!isWasmInitialized) {
7135                         throw new Error("initializeWasm() must be awaited first!");
7136                 }
7137                 const nativeResponseValue = wasm.ChainMonitor_as_Listen(this_arg);
7138                 return nativeResponseValue;
7139         }
7140         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
7141         export function ChainMonitor_as_Confirm(this_arg: number): number {
7142                 if(!isWasmInitialized) {
7143                         throw new Error("initializeWasm() must be awaited first!");
7144                 }
7145                 const nativeResponseValue = wasm.ChainMonitor_as_Confirm(this_arg);
7146                 return nativeResponseValue;
7147         }
7148         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
7149         export function ChainMonitor_as_Watch(this_arg: number): number {
7150                 if(!isWasmInitialized) {
7151                         throw new Error("initializeWasm() must be awaited first!");
7152                 }
7153                 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
7154                 return nativeResponseValue;
7155         }
7156         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
7157         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
7158                 if(!isWasmInitialized) {
7159                         throw new Error("initializeWasm() must be awaited first!");
7160                 }
7161                 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
7162                 return nativeResponseValue;
7163         }
7164         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
7165         export function ChannelMonitorUpdate_free(this_obj: number): void {
7166                 if(!isWasmInitialized) {
7167                         throw new Error("initializeWasm() must be awaited first!");
7168                 }
7169                 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
7170                 // debug statements here
7171         }
7172         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
7173         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
7174                 if(!isWasmInitialized) {
7175                         throw new Error("initializeWasm() must be awaited first!");
7176                 }
7177                 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
7178                 return nativeResponseValue;
7179         }
7180         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
7181         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
7182                 if(!isWasmInitialized) {
7183                         throw new Error("initializeWasm() must be awaited first!");
7184                 }
7185                 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
7186                 // debug statements here
7187         }
7188         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
7189         export function ChannelMonitorUpdate_clone(orig: number): number {
7190                 if(!isWasmInitialized) {
7191                         throw new Error("initializeWasm() must be awaited first!");
7192                 }
7193                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
7194                 return nativeResponseValue;
7195         }
7196         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
7197         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
7198                 if(!isWasmInitialized) {
7199                         throw new Error("initializeWasm() must be awaited first!");
7200                 }
7201                 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
7202                 return decodeArray(nativeResponseValue);
7203         }
7204         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
7205         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
7206                 if(!isWasmInitialized) {
7207                         throw new Error("initializeWasm() must be awaited first!");
7208                 }
7209                 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
7210                 return nativeResponseValue;
7211         }
7212         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
7213         export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
7214                 if(!isWasmInitialized) {
7215                         throw new Error("initializeWasm() must be awaited first!");
7216                 }
7217                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
7218                 return nativeResponseValue;
7219         }
7220         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
7221         export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
7222                 if(!isWasmInitialized) {
7223                         throw new Error("initializeWasm() must be awaited first!");
7224                 }
7225                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_temporary_failure();
7226                 return nativeResponseValue;
7227         }
7228         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
7229         export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
7230                 if(!isWasmInitialized) {
7231                         throw new Error("initializeWasm() must be awaited first!");
7232                 }
7233                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_permanent_failure();
7234                 return nativeResponseValue;
7235         }
7236         // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
7237         export function MonitorUpdateError_free(this_obj: number): void {
7238                 if(!isWasmInitialized) {
7239                         throw new Error("initializeWasm() must be awaited first!");
7240                 }
7241                 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
7242                 // debug statements here
7243         }
7244         // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
7245         export function MonitorUpdateError_clone(orig: number): number {
7246                 if(!isWasmInitialized) {
7247                         throw new Error("initializeWasm() must be awaited first!");
7248                 }
7249                 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
7250                 return nativeResponseValue;
7251         }
7252         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
7253         export function MonitorEvent_free(this_ptr: number): void {
7254                 if(!isWasmInitialized) {
7255                         throw new Error("initializeWasm() must be awaited first!");
7256                 }
7257                 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
7258                 // debug statements here
7259         }
7260         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
7261         export function MonitorEvent_clone(orig: number): number {
7262                 if(!isWasmInitialized) {
7263                         throw new Error("initializeWasm() must be awaited first!");
7264                 }
7265                 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
7266                 return nativeResponseValue;
7267         }
7268         // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
7269         export function MonitorEvent_htlcevent(a: number): number {
7270                 if(!isWasmInitialized) {
7271                         throw new Error("initializeWasm() must be awaited first!");
7272                 }
7273                 const nativeResponseValue = wasm.MonitorEvent_htlcevent(a);
7274                 return nativeResponseValue;
7275         }
7276         // struct LDKMonitorEvent MonitorEvent_commitment_tx_broadcasted(struct LDKOutPoint a);
7277         export function MonitorEvent_commitment_tx_broadcasted(a: number): number {
7278                 if(!isWasmInitialized) {
7279                         throw new Error("initializeWasm() must be awaited first!");
7280                 }
7281                 const nativeResponseValue = wasm.MonitorEvent_commitment_tx_broadcasted(a);
7282                 return nativeResponseValue;
7283         }
7284         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
7285         export function HTLCUpdate_free(this_obj: number): void {
7286                 if(!isWasmInitialized) {
7287                         throw new Error("initializeWasm() must be awaited first!");
7288                 }
7289                 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
7290                 // debug statements here
7291         }
7292         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
7293         export function HTLCUpdate_clone(orig: number): number {
7294                 if(!isWasmInitialized) {
7295                         throw new Error("initializeWasm() must be awaited first!");
7296                 }
7297                 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
7298                 return nativeResponseValue;
7299         }
7300         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
7301         export function HTLCUpdate_write(obj: number): Uint8Array {
7302                 if(!isWasmInitialized) {
7303                         throw new Error("initializeWasm() must be awaited first!");
7304                 }
7305                 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
7306                 return decodeArray(nativeResponseValue);
7307         }
7308         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
7309         export function HTLCUpdate_read(ser: Uint8Array): number {
7310                 if(!isWasmInitialized) {
7311                         throw new Error("initializeWasm() must be awaited first!");
7312                 }
7313                 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
7314                 return nativeResponseValue;
7315         }
7316         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
7317         export function ChannelMonitor_free(this_obj: number): void {
7318                 if(!isWasmInitialized) {
7319                         throw new Error("initializeWasm() must be awaited first!");
7320                 }
7321                 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
7322                 // debug statements here
7323         }
7324         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
7325         export function ChannelMonitor_clone(orig: number): number {
7326                 if(!isWasmInitialized) {
7327                         throw new Error("initializeWasm() must be awaited first!");
7328                 }
7329                 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
7330                 return nativeResponseValue;
7331         }
7332         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
7333         export function ChannelMonitor_write(obj: number): Uint8Array {
7334                 if(!isWasmInitialized) {
7335                         throw new Error("initializeWasm() must be awaited first!");
7336                 }
7337                 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
7338                 return decodeArray(nativeResponseValue);
7339         }
7340         // 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);
7341         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
7342                 if(!isWasmInitialized) {
7343                         throw new Error("initializeWasm() must be awaited first!");
7344                 }
7345                 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
7346                 return nativeResponseValue;
7347         }
7348         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7349         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
7350                 if(!isWasmInitialized) {
7351                         throw new Error("initializeWasm() must be awaited first!");
7352                 }
7353                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
7354                 return nativeResponseValue;
7355         }
7356         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7357         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
7358                 if(!isWasmInitialized) {
7359                         throw new Error("initializeWasm() must be awaited first!");
7360                 }
7361                 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
7362                 return nativeResponseValue;
7363         }
7364         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7365         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
7366                 if(!isWasmInitialized) {
7367                         throw new Error("initializeWasm() must be awaited first!");
7368                 }
7369                 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
7370                 return nativeResponseValue;
7371         }
7372         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
7373         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
7374                 if(!isWasmInitialized) {
7375                         throw new Error("initializeWasm() must be awaited first!");
7376                 }
7377                 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
7378                 // debug statements here
7379         }
7380         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7381         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
7382                 if(!isWasmInitialized) {
7383                         throw new Error("initializeWasm() must be awaited first!");
7384                 }
7385                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
7386                 return nativeResponseValue;
7387         }
7388         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7389         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
7390                 if(!isWasmInitialized) {
7391                         throw new Error("initializeWasm() must be awaited first!");
7392                 }
7393                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
7394                 return nativeResponseValue;
7395         }
7396         // 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);
7397         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
7398                 if(!isWasmInitialized) {
7399                         throw new Error("initializeWasm() must be awaited first!");
7400                 }
7401                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
7402                 return nativeResponseValue;
7403         }
7404         // 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);
7405         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
7406                 if(!isWasmInitialized) {
7407                         throw new Error("initializeWasm() must be awaited first!");
7408                 }
7409                 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
7410                 return nativeResponseValue;
7411         }
7412         // 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);
7413         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
7414                 if(!isWasmInitialized) {
7415                         throw new Error("initializeWasm() must be awaited first!");
7416                 }
7417                 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
7418                 // debug statements here
7419         }
7420         // 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);
7421         export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
7422                 if(!isWasmInitialized) {
7423                         throw new Error("initializeWasm() must be awaited first!");
7424                 }
7425                 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
7426                 return nativeResponseValue;
7427         }
7428         // 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);
7429         export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
7430                 if(!isWasmInitialized) {
7431                         throw new Error("initializeWasm() must be awaited first!");
7432                 }
7433                 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
7434                 // debug statements here
7435         }
7436         // 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);
7437         export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
7438                 if(!isWasmInitialized) {
7439                         throw new Error("initializeWasm() must be awaited first!");
7440                 }
7441                 const nativeResponseValue = wasm.ChannelMonitor_best_block_updated(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
7442                 return nativeResponseValue;
7443         }
7444         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7445         export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
7446                 if(!isWasmInitialized) {
7447                         throw new Error("initializeWasm() must be awaited first!");
7448                 }
7449                 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
7450                 return nativeResponseValue;
7451         }
7452         // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7453         export function ChannelMonitor_current_best_block(this_arg: number): number {
7454                 if(!isWasmInitialized) {
7455                         throw new Error("initializeWasm() must be awaited first!");
7456                 }
7457                 const nativeResponseValue = wasm.ChannelMonitor_current_best_block(this_arg);
7458                 return nativeResponseValue;
7459         }
7460         // void Persist_free(struct LDKPersist this_ptr);
7461         export function Persist_free(this_ptr: number): void {
7462                 if(!isWasmInitialized) {
7463                         throw new Error("initializeWasm() must be awaited first!");
7464                 }
7465                 const nativeResponseValue = wasm.Persist_free(this_ptr);
7466                 // debug statements here
7467         }
7468         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
7469         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
7470                 if(!isWasmInitialized) {
7471                         throw new Error("initializeWasm() must be awaited first!");
7472                 }
7473                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
7474                 return nativeResponseValue;
7475         }
7476         // void OutPoint_free(struct LDKOutPoint this_obj);
7477         export function OutPoint_free(this_obj: number): void {
7478                 if(!isWasmInitialized) {
7479                         throw new Error("initializeWasm() must be awaited first!");
7480                 }
7481                 const nativeResponseValue = wasm.OutPoint_free(this_obj);
7482                 // debug statements here
7483         }
7484         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
7485         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
7486                 if(!isWasmInitialized) {
7487                         throw new Error("initializeWasm() must be awaited first!");
7488                 }
7489                 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
7490                 return decodeArray(nativeResponseValue);
7491         }
7492         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7493         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
7494                 if(!isWasmInitialized) {
7495                         throw new Error("initializeWasm() must be awaited first!");
7496                 }
7497                 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
7498                 // debug statements here
7499         }
7500         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
7501         export function OutPoint_get_index(this_ptr: number): number {
7502                 if(!isWasmInitialized) {
7503                         throw new Error("initializeWasm() must be awaited first!");
7504                 }
7505                 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
7506                 return nativeResponseValue;
7507         }
7508         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
7509         export function OutPoint_set_index(this_ptr: number, val: number): void {
7510                 if(!isWasmInitialized) {
7511                         throw new Error("initializeWasm() must be awaited first!");
7512                 }
7513                 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
7514                 // debug statements here
7515         }
7516         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
7517         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
7518                 if(!isWasmInitialized) {
7519                         throw new Error("initializeWasm() must be awaited first!");
7520                 }
7521                 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
7522                 return nativeResponseValue;
7523         }
7524         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
7525         export function OutPoint_clone(orig: number): number {
7526                 if(!isWasmInitialized) {
7527                         throw new Error("initializeWasm() must be awaited first!");
7528                 }
7529                 const nativeResponseValue = wasm.OutPoint_clone(orig);
7530                 return nativeResponseValue;
7531         }
7532         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
7533         export function OutPoint_eq(a: number, b: number): boolean {
7534                 if(!isWasmInitialized) {
7535                         throw new Error("initializeWasm() must be awaited first!");
7536                 }
7537                 const nativeResponseValue = wasm.OutPoint_eq(a, b);
7538                 return nativeResponseValue;
7539         }
7540         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
7541         export function OutPoint_hash(o: number): number {
7542                 if(!isWasmInitialized) {
7543                         throw new Error("initializeWasm() must be awaited first!");
7544                 }
7545                 const nativeResponseValue = wasm.OutPoint_hash(o);
7546                 return nativeResponseValue;
7547         }
7548         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
7549         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
7550                 if(!isWasmInitialized) {
7551                         throw new Error("initializeWasm() must be awaited first!");
7552                 }
7553                 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
7554                 return decodeArray(nativeResponseValue);
7555         }
7556         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
7557         export function OutPoint_write(obj: number): Uint8Array {
7558                 if(!isWasmInitialized) {
7559                         throw new Error("initializeWasm() must be awaited first!");
7560                 }
7561                 const nativeResponseValue = wasm.OutPoint_write(obj);
7562                 return decodeArray(nativeResponseValue);
7563         }
7564         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
7565         export function OutPoint_read(ser: Uint8Array): number {
7566                 if(!isWasmInitialized) {
7567                         throw new Error("initializeWasm() must be awaited first!");
7568                 }
7569                 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
7570                 return nativeResponseValue;
7571         }
7572         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
7573         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
7574                 if(!isWasmInitialized) {
7575                         throw new Error("initializeWasm() must be awaited first!");
7576                 }
7577                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
7578                 // debug statements here
7579         }
7580         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7581         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
7582                 if(!isWasmInitialized) {
7583                         throw new Error("initializeWasm() must be awaited first!");
7584                 }
7585                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
7586                 return nativeResponseValue;
7587         }
7588         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
7589         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
7590                 if(!isWasmInitialized) {
7591                         throw new Error("initializeWasm() must be awaited first!");
7592                 }
7593                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
7594                 // debug statements here
7595         }
7596         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7597         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
7598                 if(!isWasmInitialized) {
7599                         throw new Error("initializeWasm() must be awaited first!");
7600                 }
7601                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
7602                 return decodeArray(nativeResponseValue);
7603         }
7604         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7605         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7606                 if(!isWasmInitialized) {
7607                         throw new Error("initializeWasm() must be awaited first!");
7608                 }
7609                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
7610                 // debug statements here
7611         }
7612         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7613         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
7614                 if(!isWasmInitialized) {
7615                         throw new Error("initializeWasm() must be awaited first!");
7616                 }
7617                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
7618                 return nativeResponseValue;
7619         }
7620         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
7621         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
7622                 if(!isWasmInitialized) {
7623                         throw new Error("initializeWasm() must be awaited first!");
7624                 }
7625                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
7626                 // debug statements here
7627         }
7628         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
7629         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
7630                 if(!isWasmInitialized) {
7631                         throw new Error("initializeWasm() must be awaited first!");
7632                 }
7633                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
7634                 // debug statements here
7635         }
7636         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7637         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
7638                 if(!isWasmInitialized) {
7639                         throw new Error("initializeWasm() must be awaited first!");
7640                 }
7641                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
7642                 return decodeArray(nativeResponseValue);
7643         }
7644         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7645         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
7646                 if(!isWasmInitialized) {
7647                         throw new Error("initializeWasm() must be awaited first!");
7648                 }
7649                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
7650                 // debug statements here
7651         }
7652         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
7653         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
7654                 if(!isWasmInitialized) {
7655                         throw new Error("initializeWasm() must be awaited first!");
7656                 }
7657                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
7658                 return decodeArray(nativeResponseValue);
7659         }
7660         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7661         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
7662                 if(!isWasmInitialized) {
7663                         throw new Error("initializeWasm() must be awaited first!");
7664                 }
7665                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
7666                 // debug statements here
7667         }
7668         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7669         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
7670                 if(!isWasmInitialized) {
7671                         throw new Error("initializeWasm() must be awaited first!");
7672                 }
7673                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
7674                 return nativeResponseValue;
7675         }
7676         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
7677         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
7678                 if(!isWasmInitialized) {
7679                         throw new Error("initializeWasm() must be awaited first!");
7680                 }
7681                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
7682                 // debug statements here
7683         }
7684         // 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);
7685         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 {
7686                 if(!isWasmInitialized) {
7687                         throw new Error("initializeWasm() must be awaited first!");
7688                 }
7689                 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);
7690                 return nativeResponseValue;
7691         }
7692         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
7693         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
7694                 if(!isWasmInitialized) {
7695                         throw new Error("initializeWasm() must be awaited first!");
7696                 }
7697                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
7698                 return nativeResponseValue;
7699         }
7700         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
7701         export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
7702                 if(!isWasmInitialized) {
7703                         throw new Error("initializeWasm() must be awaited first!");
7704                 }
7705                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_write(obj);
7706                 return decodeArray(nativeResponseValue);
7707         }
7708         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
7709         export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
7710                 if(!isWasmInitialized) {
7711                         throw new Error("initializeWasm() must be awaited first!");
7712                 }
7713                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_read(encodeArray(ser));
7714                 return nativeResponseValue;
7715         }
7716         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
7717         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
7718                 if(!isWasmInitialized) {
7719                         throw new Error("initializeWasm() must be awaited first!");
7720                 }
7721                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
7722                 // debug statements here
7723         }
7724         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7725         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
7726                 if(!isWasmInitialized) {
7727                         throw new Error("initializeWasm() must be awaited first!");
7728                 }
7729                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
7730                 return nativeResponseValue;
7731         }
7732         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
7733         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
7734                 if(!isWasmInitialized) {
7735                         throw new Error("initializeWasm() must be awaited first!");
7736                 }
7737                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
7738                 // debug statements here
7739         }
7740         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
7741         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
7742                 if(!isWasmInitialized) {
7743                         throw new Error("initializeWasm() must be awaited first!");
7744                 }
7745                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
7746                 // debug statements here
7747         }
7748         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
7749         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
7750                 if(!isWasmInitialized) {
7751                         throw new Error("initializeWasm() must be awaited first!");
7752                 }
7753                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
7754                 return decodeArray(nativeResponseValue);
7755         }
7756         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7757         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
7758                 if(!isWasmInitialized) {
7759                         throw new Error("initializeWasm() must be awaited first!");
7760                 }
7761                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
7762                 // debug statements here
7763         }
7764         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7765         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
7766                 if(!isWasmInitialized) {
7767                         throw new Error("initializeWasm() must be awaited first!");
7768                 }
7769                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
7770                 return nativeResponseValue;
7771         }
7772         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
7773         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
7774                 if(!isWasmInitialized) {
7775                         throw new Error("initializeWasm() must be awaited first!");
7776                 }
7777                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
7778                 // debug statements here
7779         }
7780         // 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);
7781         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
7782                 if(!isWasmInitialized) {
7783                         throw new Error("initializeWasm() must be awaited first!");
7784                 }
7785                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
7786                 return nativeResponseValue;
7787         }
7788         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
7789         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
7790                 if(!isWasmInitialized) {
7791                         throw new Error("initializeWasm() must be awaited first!");
7792                 }
7793                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
7794                 return nativeResponseValue;
7795         }
7796         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
7797         export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
7798                 if(!isWasmInitialized) {
7799                         throw new Error("initializeWasm() must be awaited first!");
7800                 }
7801                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_write(obj);
7802                 return decodeArray(nativeResponseValue);
7803         }
7804         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
7805         export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
7806                 if(!isWasmInitialized) {
7807                         throw new Error("initializeWasm() must be awaited first!");
7808                 }
7809                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_read(encodeArray(ser));
7810                 return nativeResponseValue;
7811         }
7812         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
7813         export function SpendableOutputDescriptor_free(this_ptr: number): void {
7814                 if(!isWasmInitialized) {
7815                         throw new Error("initializeWasm() must be awaited first!");
7816                 }
7817                 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
7818                 // debug statements here
7819         }
7820         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
7821         export function SpendableOutputDescriptor_clone(orig: number): number {
7822                 if(!isWasmInitialized) {
7823                         throw new Error("initializeWasm() must be awaited first!");
7824                 }
7825                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
7826                 return nativeResponseValue;
7827         }
7828         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
7829         export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
7830                 if(!isWasmInitialized) {
7831                         throw new Error("initializeWasm() must be awaited first!");
7832                 }
7833                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_output(outpoint, output);
7834                 return nativeResponseValue;
7835         }
7836         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
7837         export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
7838                 if(!isWasmInitialized) {
7839                         throw new Error("initializeWasm() must be awaited first!");
7840                 }
7841                 const nativeResponseValue = wasm.SpendableOutputDescriptor_delayed_payment_output(a);
7842                 return nativeResponseValue;
7843         }
7844         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
7845         export function SpendableOutputDescriptor_static_payment_output(a: number): number {
7846                 if(!isWasmInitialized) {
7847                         throw new Error("initializeWasm() must be awaited first!");
7848                 }
7849                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_payment_output(a);
7850                 return nativeResponseValue;
7851         }
7852         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
7853         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
7854                 if(!isWasmInitialized) {
7855                         throw new Error("initializeWasm() must be awaited first!");
7856                 }
7857                 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
7858                 return decodeArray(nativeResponseValue);
7859         }
7860         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
7861         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
7862                 if(!isWasmInitialized) {
7863                         throw new Error("initializeWasm() must be awaited first!");
7864                 }
7865                 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
7866                 return nativeResponseValue;
7867         }
7868         // void BaseSign_free(struct LDKBaseSign this_ptr);
7869         export function BaseSign_free(this_ptr: number): void {
7870                 if(!isWasmInitialized) {
7871                         throw new Error("initializeWasm() must be awaited first!");
7872                 }
7873                 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
7874                 // debug statements here
7875         }
7876         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
7877         export function Sign_clone(orig: number): number {
7878                 if(!isWasmInitialized) {
7879                         throw new Error("initializeWasm() must be awaited first!");
7880                 }
7881                 const nativeResponseValue = wasm.Sign_clone(orig);
7882                 return nativeResponseValue;
7883         }
7884         // void Sign_free(struct LDKSign this_ptr);
7885         export function Sign_free(this_ptr: number): void {
7886                 if(!isWasmInitialized) {
7887                         throw new Error("initializeWasm() must be awaited first!");
7888                 }
7889                 const nativeResponseValue = wasm.Sign_free(this_ptr);
7890                 // debug statements here
7891         }
7892         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
7893         export function KeysInterface_free(this_ptr: number): void {
7894                 if(!isWasmInitialized) {
7895                         throw new Error("initializeWasm() must be awaited first!");
7896                 }
7897                 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
7898                 // debug statements here
7899         }
7900         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
7901         export function InMemorySigner_free(this_obj: number): void {
7902                 if(!isWasmInitialized) {
7903                         throw new Error("initializeWasm() must be awaited first!");
7904                 }
7905                 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
7906                 // debug statements here
7907         }
7908         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7909         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
7910                 if(!isWasmInitialized) {
7911                         throw new Error("initializeWasm() must be awaited first!");
7912                 }
7913                 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
7914                 return decodeArray(nativeResponseValue);
7915         }
7916         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7917         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
7918                 if(!isWasmInitialized) {
7919                         throw new Error("initializeWasm() must be awaited first!");
7920                 }
7921                 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
7922                 // debug statements here
7923         }
7924         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7925         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
7926                 if(!isWasmInitialized) {
7927                         throw new Error("initializeWasm() must be awaited first!");
7928                 }
7929                 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
7930                 return decodeArray(nativeResponseValue);
7931         }
7932         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7933         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
7934                 if(!isWasmInitialized) {
7935                         throw new Error("initializeWasm() must be awaited first!");
7936                 }
7937                 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
7938                 // debug statements here
7939         }
7940         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7941         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
7942                 if(!isWasmInitialized) {
7943                         throw new Error("initializeWasm() must be awaited first!");
7944                 }
7945                 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
7946                 return decodeArray(nativeResponseValue);
7947         }
7948         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7949         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
7950                 if(!isWasmInitialized) {
7951                         throw new Error("initializeWasm() must be awaited first!");
7952                 }
7953                 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
7954                 // debug statements here
7955         }
7956         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7957         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
7958                 if(!isWasmInitialized) {
7959                         throw new Error("initializeWasm() must be awaited first!");
7960                 }
7961                 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
7962                 return decodeArray(nativeResponseValue);
7963         }
7964         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7965         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
7966                 if(!isWasmInitialized) {
7967                         throw new Error("initializeWasm() must be awaited first!");
7968                 }
7969                 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
7970                 // debug statements here
7971         }
7972         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7973         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
7974                 if(!isWasmInitialized) {
7975                         throw new Error("initializeWasm() must be awaited first!");
7976                 }
7977                 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
7978                 return decodeArray(nativeResponseValue);
7979         }
7980         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7981         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
7982                 if(!isWasmInitialized) {
7983                         throw new Error("initializeWasm() must be awaited first!");
7984                 }
7985                 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
7986                 // debug statements here
7987         }
7988         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7989         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
7990                 if(!isWasmInitialized) {
7991                         throw new Error("initializeWasm() must be awaited first!");
7992                 }
7993                 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
7994                 return decodeArray(nativeResponseValue);
7995         }
7996         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7997         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
7998                 if(!isWasmInitialized) {
7999                         throw new Error("initializeWasm() must be awaited first!");
8000                 }
8001                 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
8002                 // debug statements here
8003         }
8004         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
8005         export function InMemorySigner_clone(orig: number): number {
8006                 if(!isWasmInitialized) {
8007                         throw new Error("initializeWasm() must be awaited first!");
8008                 }
8009                 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
8010                 return nativeResponseValue;
8011         }
8012         // 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);
8013         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 {
8014                 if(!isWasmInitialized) {
8015                         throw new Error("initializeWasm() must be awaited first!");
8016                 }
8017                 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));
8018                 return nativeResponseValue;
8019         }
8020         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8021         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
8022                 if(!isWasmInitialized) {
8023                         throw new Error("initializeWasm() must be awaited first!");
8024                 }
8025                 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
8026                 return nativeResponseValue;
8027         }
8028         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8029         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
8030                 if(!isWasmInitialized) {
8031                         throw new Error("initializeWasm() must be awaited first!");
8032                 }
8033                 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
8034                 return nativeResponseValue;
8035         }
8036         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8037         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
8038                 if(!isWasmInitialized) {
8039                         throw new Error("initializeWasm() must be awaited first!");
8040                 }
8041                 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
8042                 return nativeResponseValue;
8043         }
8044         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8045         export function InMemorySigner_is_outbound(this_arg: number): boolean {
8046                 if(!isWasmInitialized) {
8047                         throw new Error("initializeWasm() must be awaited first!");
8048                 }
8049                 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
8050                 return nativeResponseValue;
8051         }
8052         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8053         export function InMemorySigner_funding_outpoint(this_arg: number): number {
8054                 if(!isWasmInitialized) {
8055                         throw new Error("initializeWasm() must be awaited first!");
8056                 }
8057                 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
8058                 return nativeResponseValue;
8059         }
8060         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8061         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
8062                 if(!isWasmInitialized) {
8063                         throw new Error("initializeWasm() must be awaited first!");
8064                 }
8065                 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
8066                 return nativeResponseValue;
8067         }
8068         // 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);
8069         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
8070                 if(!isWasmInitialized) {
8071                         throw new Error("initializeWasm() must be awaited first!");
8072                 }
8073                 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
8074                 return nativeResponseValue;
8075         }
8076         // 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);
8077         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
8078                 if(!isWasmInitialized) {
8079                         throw new Error("initializeWasm() must be awaited first!");
8080                 }
8081                 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
8082                 return nativeResponseValue;
8083         }
8084         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8085         export function InMemorySigner_as_BaseSign(this_arg: number): number {
8086                 if(!isWasmInitialized) {
8087                         throw new Error("initializeWasm() must be awaited first!");
8088                 }
8089                 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
8090                 return nativeResponseValue;
8091         }
8092         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8093         export function InMemorySigner_as_Sign(this_arg: number): number {
8094                 if(!isWasmInitialized) {
8095                         throw new Error("initializeWasm() must be awaited first!");
8096                 }
8097                 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
8098                 return nativeResponseValue;
8099         }
8100         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
8101         export function InMemorySigner_write(obj: number): Uint8Array {
8102                 if(!isWasmInitialized) {
8103                         throw new Error("initializeWasm() must be awaited first!");
8104                 }
8105                 const nativeResponseValue = wasm.InMemorySigner_write(obj);
8106                 return decodeArray(nativeResponseValue);
8107         }
8108         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
8109         export function InMemorySigner_read(ser: Uint8Array): number {
8110                 if(!isWasmInitialized) {
8111                         throw new Error("initializeWasm() must be awaited first!");
8112                 }
8113                 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
8114                 return nativeResponseValue;
8115         }
8116         // void KeysManager_free(struct LDKKeysManager this_obj);
8117         export function KeysManager_free(this_obj: number): void {
8118                 if(!isWasmInitialized) {
8119                         throw new Error("initializeWasm() must be awaited first!");
8120                 }
8121                 const nativeResponseValue = wasm.KeysManager_free(this_obj);
8122                 // debug statements here
8123         }
8124         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
8125         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
8126                 if(!isWasmInitialized) {
8127                         throw new Error("initializeWasm() must be awaited first!");
8128                 }
8129                 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
8130                 return nativeResponseValue;
8131         }
8132         // 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]);
8133         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
8134                 if(!isWasmInitialized) {
8135                         throw new Error("initializeWasm() must be awaited first!");
8136                 }
8137                 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
8138                 return nativeResponseValue;
8139         }
8140         // 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);
8141         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
8142                 if(!isWasmInitialized) {
8143                         throw new Error("initializeWasm() must be awaited first!");
8144                 }
8145                 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
8146                 return nativeResponseValue;
8147         }
8148         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
8149         export function KeysManager_as_KeysInterface(this_arg: number): number {
8150                 if(!isWasmInitialized) {
8151                         throw new Error("initializeWasm() must be awaited first!");
8152                 }
8153                 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
8154                 return nativeResponseValue;
8155         }
8156         // void ChannelManager_free(struct LDKChannelManager this_obj);
8157         export function ChannelManager_free(this_obj: number): void {
8158                 if(!isWasmInitialized) {
8159                         throw new Error("initializeWasm() must be awaited first!");
8160                 }
8161                 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
8162                 // debug statements here
8163         }
8164         // void ChainParameters_free(struct LDKChainParameters this_obj);
8165         export function ChainParameters_free(this_obj: number): void {
8166                 if(!isWasmInitialized) {
8167                         throw new Error("initializeWasm() must be awaited first!");
8168                 }
8169                 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
8170                 // debug statements here
8171         }
8172         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
8173         export function ChainParameters_get_network(this_ptr: number): Network {
8174                 if(!isWasmInitialized) {
8175                         throw new Error("initializeWasm() must be awaited first!");
8176                 }
8177                 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
8178                 return nativeResponseValue;
8179         }
8180         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
8181         export function ChainParameters_set_network(this_ptr: number, val: Network): void {
8182                 if(!isWasmInitialized) {
8183                         throw new Error("initializeWasm() must be awaited first!");
8184                 }
8185                 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
8186                 // debug statements here
8187         }
8188         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
8189         export function ChainParameters_get_best_block(this_ptr: number): number {
8190                 if(!isWasmInitialized) {
8191                         throw new Error("initializeWasm() must be awaited first!");
8192                 }
8193                 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
8194                 return nativeResponseValue;
8195         }
8196         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
8197         export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
8198                 if(!isWasmInitialized) {
8199                         throw new Error("initializeWasm() must be awaited first!");
8200                 }
8201                 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
8202                 // debug statements here
8203         }
8204         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
8205         export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
8206                 if(!isWasmInitialized) {
8207                         throw new Error("initializeWasm() must be awaited first!");
8208                 }
8209                 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
8210                 return nativeResponseValue;
8211         }
8212         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
8213         export function ChainParameters_clone(orig: number): number {
8214                 if(!isWasmInitialized) {
8215                         throw new Error("initializeWasm() must be awaited first!");
8216                 }
8217                 const nativeResponseValue = wasm.ChainParameters_clone(orig);
8218                 return nativeResponseValue;
8219         }
8220         // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
8221         export function ChannelCounterparty_free(this_obj: number): void {
8222                 if(!isWasmInitialized) {
8223                         throw new Error("initializeWasm() must be awaited first!");
8224                 }
8225                 const nativeResponseValue = wasm.ChannelCounterparty_free(this_obj);
8226                 // debug statements here
8227         }
8228         // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
8229         export function ChannelCounterparty_get_node_id(this_ptr: number): Uint8Array {
8230                 if(!isWasmInitialized) {
8231                         throw new Error("initializeWasm() must be awaited first!");
8232                 }
8233                 const nativeResponseValue = wasm.ChannelCounterparty_get_node_id(this_ptr);
8234                 return decodeArray(nativeResponseValue);
8235         }
8236         // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8237         export function ChannelCounterparty_set_node_id(this_ptr: number, val: Uint8Array): void {
8238                 if(!isWasmInitialized) {
8239                         throw new Error("initializeWasm() must be awaited first!");
8240                 }
8241                 const nativeResponseValue = wasm.ChannelCounterparty_set_node_id(this_ptr, encodeArray(val));
8242                 // debug statements here
8243         }
8244         // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
8245         export function ChannelCounterparty_get_features(this_ptr: number): number {
8246                 if(!isWasmInitialized) {
8247                         throw new Error("initializeWasm() must be awaited first!");
8248                 }
8249                 const nativeResponseValue = wasm.ChannelCounterparty_get_features(this_ptr);
8250                 return nativeResponseValue;
8251         }
8252         // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
8253         export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
8254                 if(!isWasmInitialized) {
8255                         throw new Error("initializeWasm() must be awaited first!");
8256                 }
8257                 const nativeResponseValue = wasm.ChannelCounterparty_set_features(this_ptr, val);
8258                 // debug statements here
8259         }
8260         // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
8261         export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): number {
8262                 if(!isWasmInitialized) {
8263                         throw new Error("initializeWasm() must be awaited first!");
8264                 }
8265                 const nativeResponseValue = wasm.ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
8266                 return nativeResponseValue;
8267         }
8268         // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
8269         export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
8270                 if(!isWasmInitialized) {
8271                         throw new Error("initializeWasm() must be awaited first!");
8272                 }
8273                 const nativeResponseValue = wasm.ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
8274                 // debug statements here
8275         }
8276         // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
8277         export function ChannelCounterparty_clone(orig: number): number {
8278                 if(!isWasmInitialized) {
8279                         throw new Error("initializeWasm() must be awaited first!");
8280                 }
8281                 const nativeResponseValue = wasm.ChannelCounterparty_clone(orig);
8282                 return nativeResponseValue;
8283         }
8284         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
8285         export function ChannelDetails_free(this_obj: number): void {
8286                 if(!isWasmInitialized) {
8287                         throw new Error("initializeWasm() must be awaited first!");
8288                 }
8289                 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
8290                 // debug statements here
8291         }
8292         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
8293         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
8294                 if(!isWasmInitialized) {
8295                         throw new Error("initializeWasm() must be awaited first!");
8296                 }
8297                 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
8298                 return decodeArray(nativeResponseValue);
8299         }
8300         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8301         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
8302                 if(!isWasmInitialized) {
8303                         throw new Error("initializeWasm() must be awaited first!");
8304                 }
8305                 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
8306                 // debug statements here
8307         }
8308         // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8309         export function ChannelDetails_get_counterparty(this_ptr: number): number {
8310                 if(!isWasmInitialized) {
8311                         throw new Error("initializeWasm() must be awaited first!");
8312                 }
8313                 const nativeResponseValue = wasm.ChannelDetails_get_counterparty(this_ptr);
8314                 return nativeResponseValue;
8315         }
8316         // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
8317         export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
8318                 if(!isWasmInitialized) {
8319                         throw new Error("initializeWasm() must be awaited first!");
8320                 }
8321                 const nativeResponseValue = wasm.ChannelDetails_set_counterparty(this_ptr, val);
8322                 // debug statements here
8323         }
8324         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8325         export function ChannelDetails_get_funding_txo(this_ptr: number): number {
8326                 if(!isWasmInitialized) {
8327                         throw new Error("initializeWasm() must be awaited first!");
8328                 }
8329                 const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
8330                 return nativeResponseValue;
8331         }
8332         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8333         export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
8334                 if(!isWasmInitialized) {
8335                         throw new Error("initializeWasm() must be awaited first!");
8336                 }
8337                 const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
8338                 // debug statements here
8339         }
8340         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8341         export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
8342                 if(!isWasmInitialized) {
8343                         throw new Error("initializeWasm() must be awaited first!");
8344                 }
8345                 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
8346                 return nativeResponseValue;
8347         }
8348         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
8349         export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
8350                 if(!isWasmInitialized) {
8351                         throw new Error("initializeWasm() must be awaited first!");
8352                 }
8353                 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
8354                 // debug statements here
8355         }
8356         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8357         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
8358                 if(!isWasmInitialized) {
8359                         throw new Error("initializeWasm() must be awaited first!");
8360                 }
8361                 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
8362                 return nativeResponseValue;
8363         }
8364         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
8365         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
8366                 if(!isWasmInitialized) {
8367                         throw new Error("initializeWasm() must be awaited first!");
8368                 }
8369                 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
8370                 // debug statements here
8371         }
8372         // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8373         export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
8374                 if(!isWasmInitialized) {
8375                         throw new Error("initializeWasm() must be awaited first!");
8376                 }
8377                 const nativeResponseValue = wasm.ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
8378                 return nativeResponseValue;
8379         }
8380         // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
8381         export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
8382                 if(!isWasmInitialized) {
8383                         throw new Error("initializeWasm() must be awaited first!");
8384                 }
8385                 const nativeResponseValue = wasm.ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
8386                 // debug statements here
8387         }
8388         // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8389         export function ChannelDetails_get_user_id(this_ptr: number): number {
8390                 if(!isWasmInitialized) {
8391                         throw new Error("initializeWasm() must be awaited first!");
8392                 }
8393                 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
8394                 return nativeResponseValue;
8395         }
8396         // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
8397         export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
8398                 if(!isWasmInitialized) {
8399                         throw new Error("initializeWasm() must be awaited first!");
8400                 }
8401                 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
8402                 // debug statements here
8403         }
8404         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8405         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
8406                 if(!isWasmInitialized) {
8407                         throw new Error("initializeWasm() must be awaited first!");
8408                 }
8409                 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
8410                 return nativeResponseValue;
8411         }
8412         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
8413         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
8414                 if(!isWasmInitialized) {
8415                         throw new Error("initializeWasm() must be awaited first!");
8416                 }
8417                 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
8418                 // debug statements here
8419         }
8420         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8421         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
8422                 if(!isWasmInitialized) {
8423                         throw new Error("initializeWasm() must be awaited first!");
8424                 }
8425                 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
8426                 return nativeResponseValue;
8427         }
8428         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
8429         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
8430                 if(!isWasmInitialized) {
8431                         throw new Error("initializeWasm() must be awaited first!");
8432                 }
8433                 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
8434                 // debug statements here
8435         }
8436         // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8437         export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
8438                 if(!isWasmInitialized) {
8439                         throw new Error("initializeWasm() must be awaited first!");
8440                 }
8441                 const nativeResponseValue = wasm.ChannelDetails_get_confirmations_required(this_ptr);
8442                 return nativeResponseValue;
8443         }
8444         // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
8445         export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
8446                 if(!isWasmInitialized) {
8447                         throw new Error("initializeWasm() must be awaited first!");
8448                 }
8449                 const nativeResponseValue = wasm.ChannelDetails_set_confirmations_required(this_ptr, val);
8450                 // debug statements here
8451         }
8452         // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8453         export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
8454                 if(!isWasmInitialized) {
8455                         throw new Error("initializeWasm() must be awaited first!");
8456                 }
8457                 const nativeResponseValue = wasm.ChannelDetails_get_force_close_spend_delay(this_ptr);
8458                 return nativeResponseValue;
8459         }
8460         // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
8461         export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
8462                 if(!isWasmInitialized) {
8463                         throw new Error("initializeWasm() must be awaited first!");
8464                 }
8465                 const nativeResponseValue = wasm.ChannelDetails_set_force_close_spend_delay(this_ptr, val);
8466                 // debug statements here
8467         }
8468         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8469         export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
8470                 if(!isWasmInitialized) {
8471                         throw new Error("initializeWasm() must be awaited first!");
8472                 }
8473                 const nativeResponseValue = wasm.ChannelDetails_get_is_outbound(this_ptr);
8474                 return nativeResponseValue;
8475         }
8476         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
8477         export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
8478                 if(!isWasmInitialized) {
8479                         throw new Error("initializeWasm() must be awaited first!");
8480                 }
8481                 const nativeResponseValue = wasm.ChannelDetails_set_is_outbound(this_ptr, val);
8482                 // debug statements here
8483         }
8484         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8485         export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
8486                 if(!isWasmInitialized) {
8487                         throw new Error("initializeWasm() must be awaited first!");
8488                 }
8489                 const nativeResponseValue = wasm.ChannelDetails_get_is_funding_locked(this_ptr);
8490                 return nativeResponseValue;
8491         }
8492         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
8493         export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
8494                 if(!isWasmInitialized) {
8495                         throw new Error("initializeWasm() must be awaited first!");
8496                 }
8497                 const nativeResponseValue = wasm.ChannelDetails_set_is_funding_locked(this_ptr, val);
8498                 // debug statements here
8499         }
8500         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8501         export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
8502                 if(!isWasmInitialized) {
8503                         throw new Error("initializeWasm() must be awaited first!");
8504                 }
8505                 const nativeResponseValue = wasm.ChannelDetails_get_is_usable(this_ptr);
8506                 return nativeResponseValue;
8507         }
8508         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
8509         export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
8510                 if(!isWasmInitialized) {
8511                         throw new Error("initializeWasm() must be awaited first!");
8512                 }
8513                 const nativeResponseValue = wasm.ChannelDetails_set_is_usable(this_ptr, val);
8514                 // debug statements here
8515         }
8516         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8517         export function ChannelDetails_get_is_public(this_ptr: number): boolean {
8518                 if(!isWasmInitialized) {
8519                         throw new Error("initializeWasm() must be awaited first!");
8520                 }
8521                 const nativeResponseValue = wasm.ChannelDetails_get_is_public(this_ptr);
8522                 return nativeResponseValue;
8523         }
8524         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
8525         export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
8526                 if(!isWasmInitialized) {
8527                         throw new Error("initializeWasm() must be awaited first!");
8528                 }
8529                 const nativeResponseValue = wasm.ChannelDetails_set_is_public(this_ptr, val);
8530                 // debug statements here
8531         }
8532         // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKCOption_u64Z short_channel_id_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, uint64_t user_id_arg, uint64_t outbound_capacity_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_funding_locked_arg, bool is_usable_arg, bool is_public_arg);
8533         export function ChannelDetails_new(channel_id_arg: Uint8Array, counterparty_arg: number, funding_txo_arg: number, short_channel_id_arg: number, channel_value_satoshis_arg: number, unspendable_punishment_reserve_arg: number, user_id_arg: number, outbound_capacity_msat_arg: number, inbound_capacity_msat_arg: number, confirmations_required_arg: number, force_close_spend_delay_arg: number, is_outbound_arg: boolean, is_funding_locked_arg: boolean, is_usable_arg: boolean, is_public_arg: boolean): number {
8534                 if(!isWasmInitialized) {
8535                         throw new Error("initializeWasm() must be awaited first!");
8536                 }
8537                 const nativeResponseValue = wasm.ChannelDetails_new(encodeArray(channel_id_arg), counterparty_arg, funding_txo_arg, short_channel_id_arg, channel_value_satoshis_arg, unspendable_punishment_reserve_arg, user_id_arg, outbound_capacity_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg, force_close_spend_delay_arg, is_outbound_arg, is_funding_locked_arg, is_usable_arg, is_public_arg);
8538                 return nativeResponseValue;
8539         }
8540         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
8541         export function ChannelDetails_clone(orig: number): number {
8542                 if(!isWasmInitialized) {
8543                         throw new Error("initializeWasm() must be awaited first!");
8544                 }
8545                 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
8546                 return nativeResponseValue;
8547         }
8548         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
8549         export function PaymentSendFailure_free(this_ptr: number): void {
8550                 if(!isWasmInitialized) {
8551                         throw new Error("initializeWasm() must be awaited first!");
8552                 }
8553                 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
8554                 // debug statements here
8555         }
8556         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
8557         export function PaymentSendFailure_clone(orig: number): number {
8558                 if(!isWasmInitialized) {
8559                         throw new Error("initializeWasm() must be awaited first!");
8560                 }
8561                 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
8562                 return nativeResponseValue;
8563         }
8564         // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
8565         export function PaymentSendFailure_parameter_error(a: number): number {
8566                 if(!isWasmInitialized) {
8567                         throw new Error("initializeWasm() must be awaited first!");
8568                 }
8569                 const nativeResponseValue = wasm.PaymentSendFailure_parameter_error(a);
8570                 return nativeResponseValue;
8571         }
8572         // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
8573         export function PaymentSendFailure_path_parameter_error(a: number[]): number {
8574                 if(!isWasmInitialized) {
8575                         throw new Error("initializeWasm() must be awaited first!");
8576                 }
8577                 const nativeResponseValue = wasm.PaymentSendFailure_path_parameter_error(a);
8578                 return nativeResponseValue;
8579         }
8580         // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
8581         export function PaymentSendFailure_all_failed_retry_safe(a: number[]): number {
8582                 if(!isWasmInitialized) {
8583                         throw new Error("initializeWasm() must be awaited first!");
8584                 }
8585                 const nativeResponseValue = wasm.PaymentSendFailure_all_failed_retry_safe(a);
8586                 return nativeResponseValue;
8587         }
8588         // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ a);
8589         export function PaymentSendFailure_partial_failure(a: number[]): number {
8590                 if(!isWasmInitialized) {
8591                         throw new Error("initializeWasm() must be awaited first!");
8592                 }
8593                 const nativeResponseValue = wasm.PaymentSendFailure_partial_failure(a);
8594                 return nativeResponseValue;
8595         }
8596         // 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);
8597         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
8598                 if(!isWasmInitialized) {
8599                         throw new Error("initializeWasm() must be awaited first!");
8600                 }
8601                 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
8602                 return nativeResponseValue;
8603         }
8604         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
8605         export function ChannelManager_get_current_default_configuration(this_arg: number): number {
8606                 if(!isWasmInitialized) {
8607                         throw new Error("initializeWasm() must be awaited first!");
8608                 }
8609                 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
8610                 return nativeResponseValue;
8611         }
8612         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, uint64_t user_id, struct LDKUserConfig override_config);
8613         export function ChannelManager_create_channel(this_arg: number, their_network_key: Uint8Array, channel_value_satoshis: number, push_msat: number, user_id: number, override_config: number): number {
8614                 if(!isWasmInitialized) {
8615                         throw new Error("initializeWasm() must be awaited first!");
8616                 }
8617                 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
8618                 return nativeResponseValue;
8619         }
8620         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
8621         export function ChannelManager_list_channels(this_arg: number): number[] {
8622                 if(!isWasmInitialized) {
8623                         throw new Error("initializeWasm() must be awaited first!");
8624                 }
8625                 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
8626                 return nativeResponseValue;
8627         }
8628         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
8629         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
8630                 if(!isWasmInitialized) {
8631                         throw new Error("initializeWasm() must be awaited first!");
8632                 }
8633                 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
8634                 return nativeResponseValue;
8635         }
8636         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
8637         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
8638                 if(!isWasmInitialized) {
8639                         throw new Error("initializeWasm() must be awaited first!");
8640                 }
8641                 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
8642                 return nativeResponseValue;
8643         }
8644         // 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);
8645         export function ChannelManager_close_channel_with_target_feerate(this_arg: number, channel_id: Uint8Array, target_feerate_sats_per_1000_weight: number): number {
8646                 if(!isWasmInitialized) {
8647                         throw new Error("initializeWasm() must be awaited first!");
8648                 }
8649                 const nativeResponseValue = wasm.ChannelManager_close_channel_with_target_feerate(this_arg, encodeArray(channel_id), target_feerate_sats_per_1000_weight);
8650                 return nativeResponseValue;
8651         }
8652         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
8653         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
8654                 if(!isWasmInitialized) {
8655                         throw new Error("initializeWasm() must be awaited first!");
8656                 }
8657                 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
8658                 return nativeResponseValue;
8659         }
8660         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
8661         export function ChannelManager_force_close_all_channels(this_arg: number): void {
8662                 if(!isWasmInitialized) {
8663                         throw new Error("initializeWasm() must be awaited first!");
8664                 }
8665                 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
8666                 // debug statements here
8667         }
8668         // MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
8669         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
8670                 if(!isWasmInitialized) {
8671                         throw new Error("initializeWasm() must be awaited first!");
8672                 }
8673                 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
8674                 return nativeResponseValue;
8675         }
8676         // MUST_USE_RES struct LDKCResult_PaymentHashPaymentSendFailureZ ChannelManager_send_spontaneous_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_preimage);
8677         export function ChannelManager_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: Uint8Array): number {
8678                 if(!isWasmInitialized) {
8679                         throw new Error("initializeWasm() must be awaited first!");
8680                 }
8681                 const nativeResponseValue = wasm.ChannelManager_send_spontaneous_payment(this_arg, route, encodeArray(payment_preimage));
8682                 return nativeResponseValue;
8683         }
8684         // 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);
8685         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
8686                 if(!isWasmInitialized) {
8687                         throw new Error("initializeWasm() must be awaited first!");
8688                 }
8689                 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
8690                 return nativeResponseValue;
8691         }
8692         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
8693         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
8694                 if(!isWasmInitialized) {
8695                         throw new Error("initializeWasm() must be awaited first!");
8696                 }
8697                 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
8698                 // debug statements here
8699         }
8700         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
8701         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
8702                 if(!isWasmInitialized) {
8703                         throw new Error("initializeWasm() must be awaited first!");
8704                 }
8705                 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
8706                 // debug statements here
8707         }
8708         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
8709         export function ChannelManager_timer_tick_occurred(this_arg: number): void {
8710                 if(!isWasmInitialized) {
8711                         throw new Error("initializeWasm() must be awaited first!");
8712                 }
8713                 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
8714                 // debug statements here
8715         }
8716         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
8717         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
8718                 if(!isWasmInitialized) {
8719                         throw new Error("initializeWasm() must be awaited first!");
8720                 }
8721                 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash));
8722                 return nativeResponseValue;
8723         }
8724         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
8725         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
8726                 if(!isWasmInitialized) {
8727                         throw new Error("initializeWasm() must be awaited first!");
8728                 }
8729                 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage));
8730                 return nativeResponseValue;
8731         }
8732         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
8733         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
8734                 if(!isWasmInitialized) {
8735                         throw new Error("initializeWasm() must be awaited first!");
8736                 }
8737                 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
8738                 return decodeArray(nativeResponseValue);
8739         }
8740         // 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);
8741         export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
8742                 if(!isWasmInitialized) {
8743                         throw new Error("initializeWasm() must be awaited first!");
8744                 }
8745                 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
8746                 // debug statements here
8747         }
8748         // 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);
8749         export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
8750                 if(!isWasmInitialized) {
8751                         throw new Error("initializeWasm() must be awaited first!");
8752                 }
8753                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs, user_payment_id);
8754                 return nativeResponseValue;
8755         }
8756         // 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);
8757         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 {
8758                 if(!isWasmInitialized) {
8759                         throw new Error("initializeWasm() must be awaited first!");
8760                 }
8761                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_for_hash(this_arg, encodeArray(payment_hash), min_value_msat, invoice_expiry_delta_secs, user_payment_id);
8762                 return nativeResponseValue;
8763         }
8764         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
8765         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
8766                 if(!isWasmInitialized) {
8767                         throw new Error("initializeWasm() must be awaited first!");
8768                 }
8769                 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
8770                 return nativeResponseValue;
8771         }
8772         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
8773         export function ChannelManager_as_EventsProvider(this_arg: number): number {
8774                 if(!isWasmInitialized) {
8775                         throw new Error("initializeWasm() must be awaited first!");
8776                 }
8777                 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
8778                 return nativeResponseValue;
8779         }
8780         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
8781         export function ChannelManager_as_Listen(this_arg: number): number {
8782                 if(!isWasmInitialized) {
8783                         throw new Error("initializeWasm() must be awaited first!");
8784                 }
8785                 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
8786                 return nativeResponseValue;
8787         }
8788         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
8789         export function ChannelManager_as_Confirm(this_arg: number): number {
8790                 if(!isWasmInitialized) {
8791                         throw new Error("initializeWasm() must be awaited first!");
8792                 }
8793                 const nativeResponseValue = wasm.ChannelManager_as_Confirm(this_arg);
8794                 return nativeResponseValue;
8795         }
8796         // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
8797         export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
8798                 if(!isWasmInitialized) {
8799                         throw new Error("initializeWasm() must be awaited first!");
8800                 }
8801                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
8802                 return nativeResponseValue;
8803         }
8804         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
8805         export function ChannelManager_await_persistable_update(this_arg: number): void {
8806                 if(!isWasmInitialized) {
8807                         throw new Error("initializeWasm() must be awaited first!");
8808                 }
8809                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
8810                 // debug statements here
8811         }
8812         // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
8813         export function ChannelManager_current_best_block(this_arg: number): number {
8814                 if(!isWasmInitialized) {
8815                         throw new Error("initializeWasm() must be awaited first!");
8816                 }
8817                 const nativeResponseValue = wasm.ChannelManager_current_best_block(this_arg);
8818                 return nativeResponseValue;
8819         }
8820         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
8821         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
8822                 if(!isWasmInitialized) {
8823                         throw new Error("initializeWasm() must be awaited first!");
8824                 }
8825                 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
8826                 return nativeResponseValue;
8827         }
8828         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
8829         export function ChannelManager_write(obj: number): Uint8Array {
8830                 if(!isWasmInitialized) {
8831                         throw new Error("initializeWasm() must be awaited first!");
8832                 }
8833                 const nativeResponseValue = wasm.ChannelManager_write(obj);
8834                 return decodeArray(nativeResponseValue);
8835         }
8836         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
8837         export function ChannelManagerReadArgs_free(this_obj: number): void {
8838                 if(!isWasmInitialized) {
8839                         throw new Error("initializeWasm() must be awaited first!");
8840                 }
8841                 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
8842                 // debug statements here
8843         }
8844         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8845         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
8846                 if(!isWasmInitialized) {
8847                         throw new Error("initializeWasm() must be awaited first!");
8848                 }
8849                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
8850                 return nativeResponseValue;
8851         }
8852         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
8853         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
8854                 if(!isWasmInitialized) {
8855                         throw new Error("initializeWasm() must be awaited first!");
8856                 }
8857                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
8858                 // debug statements here
8859         }
8860         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8861         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
8862                 if(!isWasmInitialized) {
8863                         throw new Error("initializeWasm() must be awaited first!");
8864                 }
8865                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
8866                 return nativeResponseValue;
8867         }
8868         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
8869         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
8870                 if(!isWasmInitialized) {
8871                         throw new Error("initializeWasm() must be awaited first!");
8872                 }
8873                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
8874                 // debug statements here
8875         }
8876         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8877         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
8878                 if(!isWasmInitialized) {
8879                         throw new Error("initializeWasm() must be awaited first!");
8880                 }
8881                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
8882                 return nativeResponseValue;
8883         }
8884         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
8885         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
8886                 if(!isWasmInitialized) {
8887                         throw new Error("initializeWasm() must be awaited first!");
8888                 }
8889                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
8890                 // debug statements here
8891         }
8892         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8893         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
8894                 if(!isWasmInitialized) {
8895                         throw new Error("initializeWasm() must be awaited first!");
8896                 }
8897                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
8898                 return nativeResponseValue;
8899         }
8900         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
8901         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
8902                 if(!isWasmInitialized) {
8903                         throw new Error("initializeWasm() must be awaited first!");
8904                 }
8905                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
8906                 // debug statements here
8907         }
8908         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8909         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
8910                 if(!isWasmInitialized) {
8911                         throw new Error("initializeWasm() must be awaited first!");
8912                 }
8913                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
8914                 return nativeResponseValue;
8915         }
8916         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
8917         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
8918                 if(!isWasmInitialized) {
8919                         throw new Error("initializeWasm() must be awaited first!");
8920                 }
8921                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
8922                 // debug statements here
8923         }
8924         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8925         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
8926                 if(!isWasmInitialized) {
8927                         throw new Error("initializeWasm() must be awaited first!");
8928                 }
8929                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
8930                 return nativeResponseValue;
8931         }
8932         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
8933         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
8934                 if(!isWasmInitialized) {
8935                         throw new Error("initializeWasm() must be awaited first!");
8936                 }
8937                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
8938                 // debug statements here
8939         }
8940         // 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);
8941         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 {
8942                 if(!isWasmInitialized) {
8943                         throw new Error("initializeWasm() must be awaited first!");
8944                 }
8945                 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
8946                 return nativeResponseValue;
8947         }
8948         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
8949         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
8950                 if(!isWasmInitialized) {
8951                         throw new Error("initializeWasm() must be awaited first!");
8952                 }
8953                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
8954                 return nativeResponseValue;
8955         }
8956         // void DecodeError_free(struct LDKDecodeError this_obj);
8957         export function DecodeError_free(this_obj: number): void {
8958                 if(!isWasmInitialized) {
8959                         throw new Error("initializeWasm() must be awaited first!");
8960                 }
8961                 const nativeResponseValue = wasm.DecodeError_free(this_obj);
8962                 // debug statements here
8963         }
8964         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
8965         export function DecodeError_clone(orig: number): number {
8966                 if(!isWasmInitialized) {
8967                         throw new Error("initializeWasm() must be awaited first!");
8968                 }
8969                 const nativeResponseValue = wasm.DecodeError_clone(orig);
8970                 return nativeResponseValue;
8971         }
8972         // void Init_free(struct LDKInit this_obj);
8973         export function Init_free(this_obj: number): void {
8974                 if(!isWasmInitialized) {
8975                         throw new Error("initializeWasm() must be awaited first!");
8976                 }
8977                 const nativeResponseValue = wasm.Init_free(this_obj);
8978                 // debug statements here
8979         }
8980         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
8981         export function Init_get_features(this_ptr: number): number {
8982                 if(!isWasmInitialized) {
8983                         throw new Error("initializeWasm() must be awaited first!");
8984                 }
8985                 const nativeResponseValue = wasm.Init_get_features(this_ptr);
8986                 return nativeResponseValue;
8987         }
8988         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
8989         export function Init_set_features(this_ptr: number, val: number): void {
8990                 if(!isWasmInitialized) {
8991                         throw new Error("initializeWasm() must be awaited first!");
8992                 }
8993                 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
8994                 // debug statements here
8995         }
8996         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
8997         export function Init_new(features_arg: number): number {
8998                 if(!isWasmInitialized) {
8999                         throw new Error("initializeWasm() must be awaited first!");
9000                 }
9001                 const nativeResponseValue = wasm.Init_new(features_arg);
9002                 return nativeResponseValue;
9003         }
9004         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
9005         export function Init_clone(orig: number): number {
9006                 if(!isWasmInitialized) {
9007                         throw new Error("initializeWasm() must be awaited first!");
9008                 }
9009                 const nativeResponseValue = wasm.Init_clone(orig);
9010                 return nativeResponseValue;
9011         }
9012         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
9013         export function ErrorMessage_free(this_obj: number): void {
9014                 if(!isWasmInitialized) {
9015                         throw new Error("initializeWasm() must be awaited first!");
9016                 }
9017                 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
9018                 // debug statements here
9019         }
9020         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
9021         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
9022                 if(!isWasmInitialized) {
9023                         throw new Error("initializeWasm() must be awaited first!");
9024                 }
9025                 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
9026                 return decodeArray(nativeResponseValue);
9027         }
9028         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9029         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
9030                 if(!isWasmInitialized) {
9031                         throw new Error("initializeWasm() must be awaited first!");
9032                 }
9033                 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
9034                 // debug statements here
9035         }
9036         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
9037         export function ErrorMessage_get_data(this_ptr: number): String {
9038                 if(!isWasmInitialized) {
9039                         throw new Error("initializeWasm() must be awaited first!");
9040                 }
9041                 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
9042                 return nativeResponseValue;
9043         }
9044         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
9045         export function ErrorMessage_set_data(this_ptr: number, val: String): void {
9046                 if(!isWasmInitialized) {
9047                         throw new Error("initializeWasm() must be awaited first!");
9048                 }
9049                 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, val);
9050                 // debug statements here
9051         }
9052         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
9053         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
9054                 if(!isWasmInitialized) {
9055                         throw new Error("initializeWasm() must be awaited first!");
9056                 }
9057                 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), data_arg);
9058                 return nativeResponseValue;
9059         }
9060         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
9061         export function ErrorMessage_clone(orig: number): number {
9062                 if(!isWasmInitialized) {
9063                         throw new Error("initializeWasm() must be awaited first!");
9064                 }
9065                 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
9066                 return nativeResponseValue;
9067         }
9068         // void Ping_free(struct LDKPing this_obj);
9069         export function Ping_free(this_obj: number): void {
9070                 if(!isWasmInitialized) {
9071                         throw new Error("initializeWasm() must be awaited first!");
9072                 }
9073                 const nativeResponseValue = wasm.Ping_free(this_obj);
9074                 // debug statements here
9075         }
9076         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
9077         export function Ping_get_ponglen(this_ptr: number): number {
9078                 if(!isWasmInitialized) {
9079                         throw new Error("initializeWasm() must be awaited first!");
9080                 }
9081                 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
9082                 return nativeResponseValue;
9083         }
9084         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
9085         export function Ping_set_ponglen(this_ptr: number, val: number): void {
9086                 if(!isWasmInitialized) {
9087                         throw new Error("initializeWasm() must be awaited first!");
9088                 }
9089                 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
9090                 // debug statements here
9091         }
9092         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
9093         export function Ping_get_byteslen(this_ptr: number): number {
9094                 if(!isWasmInitialized) {
9095                         throw new Error("initializeWasm() must be awaited first!");
9096                 }
9097                 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
9098                 return nativeResponseValue;
9099         }
9100         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
9101         export function Ping_set_byteslen(this_ptr: number, val: number): void {
9102                 if(!isWasmInitialized) {
9103                         throw new Error("initializeWasm() must be awaited first!");
9104                 }
9105                 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
9106                 // debug statements here
9107         }
9108         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
9109         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
9110                 if(!isWasmInitialized) {
9111                         throw new Error("initializeWasm() must be awaited first!");
9112                 }
9113                 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
9114                 return nativeResponseValue;
9115         }
9116         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
9117         export function Ping_clone(orig: number): number {
9118                 if(!isWasmInitialized) {
9119                         throw new Error("initializeWasm() must be awaited first!");
9120                 }
9121                 const nativeResponseValue = wasm.Ping_clone(orig);
9122                 return nativeResponseValue;
9123         }
9124         // void Pong_free(struct LDKPong this_obj);
9125         export function Pong_free(this_obj: number): void {
9126                 if(!isWasmInitialized) {
9127                         throw new Error("initializeWasm() must be awaited first!");
9128                 }
9129                 const nativeResponseValue = wasm.Pong_free(this_obj);
9130                 // debug statements here
9131         }
9132         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
9133         export function Pong_get_byteslen(this_ptr: number): number {
9134                 if(!isWasmInitialized) {
9135                         throw new Error("initializeWasm() must be awaited first!");
9136                 }
9137                 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
9138                 return nativeResponseValue;
9139         }
9140         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
9141         export function Pong_set_byteslen(this_ptr: number, val: number): void {
9142                 if(!isWasmInitialized) {
9143                         throw new Error("initializeWasm() must be awaited first!");
9144                 }
9145                 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
9146                 // debug statements here
9147         }
9148         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
9149         export function Pong_new(byteslen_arg: number): number {
9150                 if(!isWasmInitialized) {
9151                         throw new Error("initializeWasm() must be awaited first!");
9152                 }
9153                 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
9154                 return nativeResponseValue;
9155         }
9156         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
9157         export function Pong_clone(orig: number): number {
9158                 if(!isWasmInitialized) {
9159                         throw new Error("initializeWasm() must be awaited first!");
9160                 }
9161                 const nativeResponseValue = wasm.Pong_clone(orig);
9162                 return nativeResponseValue;
9163         }
9164         // void OpenChannel_free(struct LDKOpenChannel this_obj);
9165         export function OpenChannel_free(this_obj: number): void {
9166                 if(!isWasmInitialized) {
9167                         throw new Error("initializeWasm() must be awaited first!");
9168                 }
9169                 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
9170                 // debug statements here
9171         }
9172         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
9173         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
9174                 if(!isWasmInitialized) {
9175                         throw new Error("initializeWasm() must be awaited first!");
9176                 }
9177                 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
9178                 return decodeArray(nativeResponseValue);
9179         }
9180         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9181         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9182                 if(!isWasmInitialized) {
9183                         throw new Error("initializeWasm() must be awaited first!");
9184                 }
9185                 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
9186                 // debug statements here
9187         }
9188         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
9189         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
9190                 if(!isWasmInitialized) {
9191                         throw new Error("initializeWasm() must be awaited first!");
9192                 }
9193                 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
9194                 return decodeArray(nativeResponseValue);
9195         }
9196         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9197         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
9198                 if(!isWasmInitialized) {
9199                         throw new Error("initializeWasm() must be awaited first!");
9200                 }
9201                 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
9202                 // debug statements here
9203         }
9204         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9205         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
9206                 if(!isWasmInitialized) {
9207                         throw new Error("initializeWasm() must be awaited first!");
9208                 }
9209                 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
9210                 return nativeResponseValue;
9211         }
9212         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9213         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
9214                 if(!isWasmInitialized) {
9215                         throw new Error("initializeWasm() must be awaited first!");
9216                 }
9217                 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
9218                 // debug statements here
9219         }
9220         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9221         export function OpenChannel_get_push_msat(this_ptr: number): number {
9222                 if(!isWasmInitialized) {
9223                         throw new Error("initializeWasm() must be awaited first!");
9224                 }
9225                 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
9226                 return nativeResponseValue;
9227         }
9228         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9229         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
9230                 if(!isWasmInitialized) {
9231                         throw new Error("initializeWasm() must be awaited first!");
9232                 }
9233                 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
9234                 // debug statements here
9235         }
9236         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9237         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
9238                 if(!isWasmInitialized) {
9239                         throw new Error("initializeWasm() must be awaited first!");
9240                 }
9241                 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
9242                 return nativeResponseValue;
9243         }
9244         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9245         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
9246                 if(!isWasmInitialized) {
9247                         throw new Error("initializeWasm() must be awaited first!");
9248                 }
9249                 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
9250                 // debug statements here
9251         }
9252         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9253         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
9254                 if(!isWasmInitialized) {
9255                         throw new Error("initializeWasm() must be awaited first!");
9256                 }
9257                 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
9258                 return nativeResponseValue;
9259         }
9260         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9261         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
9262                 if(!isWasmInitialized) {
9263                         throw new Error("initializeWasm() must be awaited first!");
9264                 }
9265                 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
9266                 // debug statements here
9267         }
9268         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9269         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
9270                 if(!isWasmInitialized) {
9271                         throw new Error("initializeWasm() must be awaited first!");
9272                 }
9273                 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
9274                 return nativeResponseValue;
9275         }
9276         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9277         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
9278                 if(!isWasmInitialized) {
9279                         throw new Error("initializeWasm() must be awaited first!");
9280                 }
9281                 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
9282                 // debug statements here
9283         }
9284         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9285         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
9286                 if(!isWasmInitialized) {
9287                         throw new Error("initializeWasm() must be awaited first!");
9288                 }
9289                 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
9290                 return nativeResponseValue;
9291         }
9292         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9293         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
9294                 if(!isWasmInitialized) {
9295                         throw new Error("initializeWasm() must be awaited first!");
9296                 }
9297                 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
9298                 // debug statements here
9299         }
9300         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9301         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
9302                 if(!isWasmInitialized) {
9303                         throw new Error("initializeWasm() must be awaited first!");
9304                 }
9305                 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
9306                 return nativeResponseValue;
9307         }
9308         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
9309         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
9310                 if(!isWasmInitialized) {
9311                         throw new Error("initializeWasm() must be awaited first!");
9312                 }
9313                 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
9314                 // debug statements here
9315         }
9316         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9317         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
9318                 if(!isWasmInitialized) {
9319                         throw new Error("initializeWasm() must be awaited first!");
9320                 }
9321                 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
9322                 return nativeResponseValue;
9323         }
9324         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
9325         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
9326                 if(!isWasmInitialized) {
9327                         throw new Error("initializeWasm() must be awaited first!");
9328                 }
9329                 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
9330                 // debug statements here
9331         }
9332         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9333         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
9334                 if(!isWasmInitialized) {
9335                         throw new Error("initializeWasm() must be awaited first!");
9336                 }
9337                 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
9338                 return nativeResponseValue;
9339         }
9340         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
9341         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
9342                 if(!isWasmInitialized) {
9343                         throw new Error("initializeWasm() must be awaited first!");
9344                 }
9345                 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
9346                 // debug statements here
9347         }
9348         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9349         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
9350                 if(!isWasmInitialized) {
9351                         throw new Error("initializeWasm() must be awaited first!");
9352                 }
9353                 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
9354                 return decodeArray(nativeResponseValue);
9355         }
9356         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9357         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
9358                 if(!isWasmInitialized) {
9359                         throw new Error("initializeWasm() must be awaited first!");
9360                 }
9361                 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
9362                 // debug statements here
9363         }
9364         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9365         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
9366                 if(!isWasmInitialized) {
9367                         throw new Error("initializeWasm() must be awaited first!");
9368                 }
9369                 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
9370                 return decodeArray(nativeResponseValue);
9371         }
9372         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9373         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
9374                 if(!isWasmInitialized) {
9375                         throw new Error("initializeWasm() must be awaited first!");
9376                 }
9377                 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
9378                 // debug statements here
9379         }
9380         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9381         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
9382                 if(!isWasmInitialized) {
9383                         throw new Error("initializeWasm() must be awaited first!");
9384                 }
9385                 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
9386                 return decodeArray(nativeResponseValue);
9387         }
9388         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9389         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
9390                 if(!isWasmInitialized) {
9391                         throw new Error("initializeWasm() must be awaited first!");
9392                 }
9393                 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
9394                 // debug statements here
9395         }
9396         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9397         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
9398                 if(!isWasmInitialized) {
9399                         throw new Error("initializeWasm() must be awaited first!");
9400                 }
9401                 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
9402                 return decodeArray(nativeResponseValue);
9403         }
9404         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9405         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
9406                 if(!isWasmInitialized) {
9407                         throw new Error("initializeWasm() must be awaited first!");
9408                 }
9409                 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
9410                 // debug statements here
9411         }
9412         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9413         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
9414                 if(!isWasmInitialized) {
9415                         throw new Error("initializeWasm() must be awaited first!");
9416                 }
9417                 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
9418                 return decodeArray(nativeResponseValue);
9419         }
9420         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9421         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
9422                 if(!isWasmInitialized) {
9423                         throw new Error("initializeWasm() must be awaited first!");
9424                 }
9425                 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
9426                 // debug statements here
9427         }
9428         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9429         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
9430                 if(!isWasmInitialized) {
9431                         throw new Error("initializeWasm() must be awaited first!");
9432                 }
9433                 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
9434                 return decodeArray(nativeResponseValue);
9435         }
9436         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9437         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9438                 if(!isWasmInitialized) {
9439                         throw new Error("initializeWasm() must be awaited first!");
9440                 }
9441                 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
9442                 // debug statements here
9443         }
9444         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9445         export function OpenChannel_get_channel_flags(this_ptr: number): number {
9446                 if(!isWasmInitialized) {
9447                         throw new Error("initializeWasm() must be awaited first!");
9448                 }
9449                 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
9450                 return nativeResponseValue;
9451         }
9452         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
9453         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
9454                 if(!isWasmInitialized) {
9455                         throw new Error("initializeWasm() must be awaited first!");
9456                 }
9457                 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
9458                 // debug statements here
9459         }
9460         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
9461         export function OpenChannel_clone(orig: number): number {
9462                 if(!isWasmInitialized) {
9463                         throw new Error("initializeWasm() must be awaited first!");
9464                 }
9465                 const nativeResponseValue = wasm.OpenChannel_clone(orig);
9466                 return nativeResponseValue;
9467         }
9468         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
9469         export function AcceptChannel_free(this_obj: number): void {
9470                 if(!isWasmInitialized) {
9471                         throw new Error("initializeWasm() must be awaited first!");
9472                 }
9473                 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
9474                 // debug statements here
9475         }
9476         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
9477         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
9478                 if(!isWasmInitialized) {
9479                         throw new Error("initializeWasm() must be awaited first!");
9480                 }
9481                 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
9482                 return decodeArray(nativeResponseValue);
9483         }
9484         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9485         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
9486                 if(!isWasmInitialized) {
9487                         throw new Error("initializeWasm() must be awaited first!");
9488                 }
9489                 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
9490                 // debug statements here
9491         }
9492         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9493         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
9494                 if(!isWasmInitialized) {
9495                         throw new Error("initializeWasm() must be awaited first!");
9496                 }
9497                 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
9498                 return nativeResponseValue;
9499         }
9500         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
9501         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
9502                 if(!isWasmInitialized) {
9503                         throw new Error("initializeWasm() must be awaited first!");
9504                 }
9505                 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
9506                 // debug statements here
9507         }
9508         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9509         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
9510                 if(!isWasmInitialized) {
9511                         throw new Error("initializeWasm() must be awaited first!");
9512                 }
9513                 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
9514                 return nativeResponseValue;
9515         }
9516         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
9517         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
9518                 if(!isWasmInitialized) {
9519                         throw new Error("initializeWasm() must be awaited first!");
9520                 }
9521                 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
9522                 // debug statements here
9523         }
9524         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9525         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
9526                 if(!isWasmInitialized) {
9527                         throw new Error("initializeWasm() must be awaited first!");
9528                 }
9529                 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
9530                 return nativeResponseValue;
9531         }
9532         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
9533         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
9534                 if(!isWasmInitialized) {
9535                         throw new Error("initializeWasm() must be awaited first!");
9536                 }
9537                 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
9538                 // debug statements here
9539         }
9540         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9541         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
9542                 if(!isWasmInitialized) {
9543                         throw new Error("initializeWasm() must be awaited first!");
9544                 }
9545                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
9546                 return nativeResponseValue;
9547         }
9548         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
9549         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
9550                 if(!isWasmInitialized) {
9551                         throw new Error("initializeWasm() must be awaited first!");
9552                 }
9553                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
9554                 // debug statements here
9555         }
9556         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9557         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
9558                 if(!isWasmInitialized) {
9559                         throw new Error("initializeWasm() must be awaited first!");
9560                 }
9561                 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
9562                 return nativeResponseValue;
9563         }
9564         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
9565         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
9566                 if(!isWasmInitialized) {
9567                         throw new Error("initializeWasm() must be awaited first!");
9568                 }
9569                 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
9570                 // debug statements here
9571         }
9572         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9573         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
9574                 if(!isWasmInitialized) {
9575                         throw new Error("initializeWasm() must be awaited first!");
9576                 }
9577                 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
9578                 return nativeResponseValue;
9579         }
9580         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
9581         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
9582                 if(!isWasmInitialized) {
9583                         throw new Error("initializeWasm() must be awaited first!");
9584                 }
9585                 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
9586                 // debug statements here
9587         }
9588         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9589         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
9590                 if(!isWasmInitialized) {
9591                         throw new Error("initializeWasm() must be awaited first!");
9592                 }
9593                 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
9594                 return nativeResponseValue;
9595         }
9596         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
9597         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
9598                 if(!isWasmInitialized) {
9599                         throw new Error("initializeWasm() must be awaited first!");
9600                 }
9601                 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
9602                 // debug statements here
9603         }
9604         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9605         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
9606                 if(!isWasmInitialized) {
9607                         throw new Error("initializeWasm() must be awaited first!");
9608                 }
9609                 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
9610                 return decodeArray(nativeResponseValue);
9611         }
9612         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9613         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
9614                 if(!isWasmInitialized) {
9615                         throw new Error("initializeWasm() must be awaited first!");
9616                 }
9617                 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
9618                 // debug statements here
9619         }
9620         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9621         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
9622                 if(!isWasmInitialized) {
9623                         throw new Error("initializeWasm() must be awaited first!");
9624                 }
9625                 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
9626                 return decodeArray(nativeResponseValue);
9627         }
9628         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9629         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
9630                 if(!isWasmInitialized) {
9631                         throw new Error("initializeWasm() must be awaited first!");
9632                 }
9633                 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
9634                 // debug statements here
9635         }
9636         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9637         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
9638                 if(!isWasmInitialized) {
9639                         throw new Error("initializeWasm() must be awaited first!");
9640                 }
9641                 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
9642                 return decodeArray(nativeResponseValue);
9643         }
9644         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9645         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
9646                 if(!isWasmInitialized) {
9647                         throw new Error("initializeWasm() must be awaited first!");
9648                 }
9649                 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
9650                 // debug statements here
9651         }
9652         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9653         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
9654                 if(!isWasmInitialized) {
9655                         throw new Error("initializeWasm() must be awaited first!");
9656                 }
9657                 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
9658                 return decodeArray(nativeResponseValue);
9659         }
9660         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9661         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
9662                 if(!isWasmInitialized) {
9663                         throw new Error("initializeWasm() must be awaited first!");
9664                 }
9665                 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
9666                 // debug statements here
9667         }
9668         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9669         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
9670                 if(!isWasmInitialized) {
9671                         throw new Error("initializeWasm() must be awaited first!");
9672                 }
9673                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
9674                 return decodeArray(nativeResponseValue);
9675         }
9676         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9677         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
9678                 if(!isWasmInitialized) {
9679                         throw new Error("initializeWasm() must be awaited first!");
9680                 }
9681                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
9682                 // debug statements here
9683         }
9684         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9685         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
9686                 if(!isWasmInitialized) {
9687                         throw new Error("initializeWasm() must be awaited first!");
9688                 }
9689                 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
9690                 return decodeArray(nativeResponseValue);
9691         }
9692         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9693         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9694                 if(!isWasmInitialized) {
9695                         throw new Error("initializeWasm() must be awaited first!");
9696                 }
9697                 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
9698                 // debug statements here
9699         }
9700         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
9701         export function AcceptChannel_clone(orig: number): number {
9702                 if(!isWasmInitialized) {
9703                         throw new Error("initializeWasm() must be awaited first!");
9704                 }
9705                 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
9706                 return nativeResponseValue;
9707         }
9708         // void FundingCreated_free(struct LDKFundingCreated this_obj);
9709         export function FundingCreated_free(this_obj: number): void {
9710                 if(!isWasmInitialized) {
9711                         throw new Error("initializeWasm() must be awaited first!");
9712                 }
9713                 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
9714                 // debug statements here
9715         }
9716         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
9717         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
9718                 if(!isWasmInitialized) {
9719                         throw new Error("initializeWasm() must be awaited first!");
9720                 }
9721                 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
9722                 return decodeArray(nativeResponseValue);
9723         }
9724         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9725         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
9726                 if(!isWasmInitialized) {
9727                         throw new Error("initializeWasm() must be awaited first!");
9728                 }
9729                 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
9730                 // debug statements here
9731         }
9732         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
9733         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
9734                 if(!isWasmInitialized) {
9735                         throw new Error("initializeWasm() must be awaited first!");
9736                 }
9737                 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
9738                 return decodeArray(nativeResponseValue);
9739         }
9740         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9741         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
9742                 if(!isWasmInitialized) {
9743                         throw new Error("initializeWasm() must be awaited first!");
9744                 }
9745                 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
9746                 // debug statements here
9747         }
9748         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
9749         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
9750                 if(!isWasmInitialized) {
9751                         throw new Error("initializeWasm() must be awaited first!");
9752                 }
9753                 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
9754                 return nativeResponseValue;
9755         }
9756         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
9757         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
9758                 if(!isWasmInitialized) {
9759                         throw new Error("initializeWasm() must be awaited first!");
9760                 }
9761                 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
9762                 // debug statements here
9763         }
9764         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
9765         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
9766                 if(!isWasmInitialized) {
9767                         throw new Error("initializeWasm() must be awaited first!");
9768                 }
9769                 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
9770                 return decodeArray(nativeResponseValue);
9771         }
9772         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
9773         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
9774                 if(!isWasmInitialized) {
9775                         throw new Error("initializeWasm() must be awaited first!");
9776                 }
9777                 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
9778                 // debug statements here
9779         }
9780         // 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);
9781         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
9782                 if(!isWasmInitialized) {
9783                         throw new Error("initializeWasm() must be awaited first!");
9784                 }
9785                 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
9786                 return nativeResponseValue;
9787         }
9788         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
9789         export function FundingCreated_clone(orig: number): number {
9790                 if(!isWasmInitialized) {
9791                         throw new Error("initializeWasm() must be awaited first!");
9792                 }
9793                 const nativeResponseValue = wasm.FundingCreated_clone(orig);
9794                 return nativeResponseValue;
9795         }
9796         // void FundingSigned_free(struct LDKFundingSigned this_obj);
9797         export function FundingSigned_free(this_obj: number): void {
9798                 if(!isWasmInitialized) {
9799                         throw new Error("initializeWasm() must be awaited first!");
9800                 }
9801                 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
9802                 // debug statements here
9803         }
9804         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
9805         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
9806                 if(!isWasmInitialized) {
9807                         throw new Error("initializeWasm() must be awaited first!");
9808                 }
9809                 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
9810                 return decodeArray(nativeResponseValue);
9811         }
9812         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9813         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
9814                 if(!isWasmInitialized) {
9815                         throw new Error("initializeWasm() must be awaited first!");
9816                 }
9817                 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
9818                 // debug statements here
9819         }
9820         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
9821         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
9822                 if(!isWasmInitialized) {
9823                         throw new Error("initializeWasm() must be awaited first!");
9824                 }
9825                 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
9826                 return decodeArray(nativeResponseValue);
9827         }
9828         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
9829         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
9830                 if(!isWasmInitialized) {
9831                         throw new Error("initializeWasm() must be awaited first!");
9832                 }
9833                 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
9834                 // debug statements here
9835         }
9836         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
9837         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
9838                 if(!isWasmInitialized) {
9839                         throw new Error("initializeWasm() must be awaited first!");
9840                 }
9841                 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
9842                 return nativeResponseValue;
9843         }
9844         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
9845         export function FundingSigned_clone(orig: number): number {
9846                 if(!isWasmInitialized) {
9847                         throw new Error("initializeWasm() must be awaited first!");
9848                 }
9849                 const nativeResponseValue = wasm.FundingSigned_clone(orig);
9850                 return nativeResponseValue;
9851         }
9852         // void FundingLocked_free(struct LDKFundingLocked this_obj);
9853         export function FundingLocked_free(this_obj: number): void {
9854                 if(!isWasmInitialized) {
9855                         throw new Error("initializeWasm() must be awaited first!");
9856                 }
9857                 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
9858                 // debug statements here
9859         }
9860         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
9861         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
9862                 if(!isWasmInitialized) {
9863                         throw new Error("initializeWasm() must be awaited first!");
9864                 }
9865                 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
9866                 return decodeArray(nativeResponseValue);
9867         }
9868         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9869         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
9870                 if(!isWasmInitialized) {
9871                         throw new Error("initializeWasm() must be awaited first!");
9872                 }
9873                 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
9874                 // debug statements here
9875         }
9876         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
9877         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
9878                 if(!isWasmInitialized) {
9879                         throw new Error("initializeWasm() must be awaited first!");
9880                 }
9881                 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
9882                 return decodeArray(nativeResponseValue);
9883         }
9884         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9885         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9886                 if(!isWasmInitialized) {
9887                         throw new Error("initializeWasm() must be awaited first!");
9888                 }
9889                 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
9890                 // debug statements here
9891         }
9892         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
9893         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
9894                 if(!isWasmInitialized) {
9895                         throw new Error("initializeWasm() must be awaited first!");
9896                 }
9897                 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
9898                 return nativeResponseValue;
9899         }
9900         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
9901         export function FundingLocked_clone(orig: number): number {
9902                 if(!isWasmInitialized) {
9903                         throw new Error("initializeWasm() must be awaited first!");
9904                 }
9905                 const nativeResponseValue = wasm.FundingLocked_clone(orig);
9906                 return nativeResponseValue;
9907         }
9908         // void Shutdown_free(struct LDKShutdown this_obj);
9909         export function Shutdown_free(this_obj: number): void {
9910                 if(!isWasmInitialized) {
9911                         throw new Error("initializeWasm() must be awaited first!");
9912                 }
9913                 const nativeResponseValue = wasm.Shutdown_free(this_obj);
9914                 // debug statements here
9915         }
9916         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
9917         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
9918                 if(!isWasmInitialized) {
9919                         throw new Error("initializeWasm() must be awaited first!");
9920                 }
9921                 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
9922                 return decodeArray(nativeResponseValue);
9923         }
9924         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9925         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
9926                 if(!isWasmInitialized) {
9927                         throw new Error("initializeWasm() must be awaited first!");
9928                 }
9929                 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
9930                 // debug statements here
9931         }
9932         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
9933         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
9934                 if(!isWasmInitialized) {
9935                         throw new Error("initializeWasm() must be awaited first!");
9936                 }
9937                 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
9938                 return decodeArray(nativeResponseValue);
9939         }
9940         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
9941         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
9942                 if(!isWasmInitialized) {
9943                         throw new Error("initializeWasm() must be awaited first!");
9944                 }
9945                 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
9946                 // debug statements here
9947         }
9948         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
9949         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
9950                 if(!isWasmInitialized) {
9951                         throw new Error("initializeWasm() must be awaited first!");
9952                 }
9953                 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
9954                 return nativeResponseValue;
9955         }
9956         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
9957         export function Shutdown_clone(orig: number): number {
9958                 if(!isWasmInitialized) {
9959                         throw new Error("initializeWasm() must be awaited first!");
9960                 }
9961                 const nativeResponseValue = wasm.Shutdown_clone(orig);
9962                 return nativeResponseValue;
9963         }
9964         // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
9965         export function ClosingSignedFeeRange_free(this_obj: number): void {
9966                 if(!isWasmInitialized) {
9967                         throw new Error("initializeWasm() must be awaited first!");
9968                 }
9969                 const nativeResponseValue = wasm.ClosingSignedFeeRange_free(this_obj);
9970                 // debug statements here
9971         }
9972         // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
9973         export function ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr: number): number {
9974                 if(!isWasmInitialized) {
9975                         throw new Error("initializeWasm() must be awaited first!");
9976                 }
9977                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr);
9978                 return nativeResponseValue;
9979         }
9980         // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
9981         export function ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr: number, val: number): void {
9982                 if(!isWasmInitialized) {
9983                         throw new Error("initializeWasm() must be awaited first!");
9984                 }
9985                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr, val);
9986                 // debug statements here
9987         }
9988         // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
9989         export function ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr: number): number {
9990                 if(!isWasmInitialized) {
9991                         throw new Error("initializeWasm() must be awaited first!");
9992                 }
9993                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr);
9994                 return nativeResponseValue;
9995         }
9996         // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
9997         export function ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr: number, val: number): void {
9998                 if(!isWasmInitialized) {
9999                         throw new Error("initializeWasm() must be awaited first!");
10000                 }
10001                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr, val);
10002                 // debug statements here
10003         }
10004         // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
10005         export function ClosingSignedFeeRange_new(min_fee_satoshis_arg: number, max_fee_satoshis_arg: number): number {
10006                 if(!isWasmInitialized) {
10007                         throw new Error("initializeWasm() must be awaited first!");
10008                 }
10009                 const nativeResponseValue = wasm.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
10010                 return nativeResponseValue;
10011         }
10012         // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
10013         export function ClosingSignedFeeRange_clone(orig: number): number {
10014                 if(!isWasmInitialized) {
10015                         throw new Error("initializeWasm() must be awaited first!");
10016                 }
10017                 const nativeResponseValue = wasm.ClosingSignedFeeRange_clone(orig);
10018                 return nativeResponseValue;
10019         }
10020         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
10021         export function ClosingSigned_free(this_obj: number): void {
10022                 if(!isWasmInitialized) {
10023                         throw new Error("initializeWasm() must be awaited first!");
10024                 }
10025                 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
10026                 // debug statements here
10027         }
10028         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
10029         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
10030                 if(!isWasmInitialized) {
10031                         throw new Error("initializeWasm() must be awaited first!");
10032                 }
10033                 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
10034                 return decodeArray(nativeResponseValue);
10035         }
10036         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10037         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
10038                 if(!isWasmInitialized) {
10039                         throw new Error("initializeWasm() must be awaited first!");
10040                 }
10041                 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
10042                 // debug statements here
10043         }
10044         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
10045         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
10046                 if(!isWasmInitialized) {
10047                         throw new Error("initializeWasm() must be awaited first!");
10048                 }
10049                 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
10050                 return nativeResponseValue;
10051         }
10052         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
10053         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
10054                 if(!isWasmInitialized) {
10055                         throw new Error("initializeWasm() must be awaited first!");
10056                 }
10057                 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
10058                 // debug statements here
10059         }
10060         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
10061         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
10062                 if(!isWasmInitialized) {
10063                         throw new Error("initializeWasm() must be awaited first!");
10064                 }
10065                 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
10066                 return decodeArray(nativeResponseValue);
10067         }
10068         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
10069         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
10070                 if(!isWasmInitialized) {
10071                         throw new Error("initializeWasm() must be awaited first!");
10072                 }
10073                 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
10074                 // debug statements here
10075         }
10076         // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
10077         export function ClosingSigned_get_fee_range(this_ptr: number): number {
10078                 if(!isWasmInitialized) {
10079                         throw new Error("initializeWasm() must be awaited first!");
10080                 }
10081                 const nativeResponseValue = wasm.ClosingSigned_get_fee_range(this_ptr);
10082                 return nativeResponseValue;
10083         }
10084         // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
10085         export function ClosingSigned_set_fee_range(this_ptr: number, val: number): void {
10086                 if(!isWasmInitialized) {
10087                         throw new Error("initializeWasm() must be awaited first!");
10088                 }
10089                 const nativeResponseValue = wasm.ClosingSigned_set_fee_range(this_ptr, val);
10090                 // debug statements here
10091         }
10092         // 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);
10093         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array, fee_range_arg: number): number {
10094                 if(!isWasmInitialized) {
10095                         throw new Error("initializeWasm() must be awaited first!");
10096                 }
10097                 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg), fee_range_arg);
10098                 return nativeResponseValue;
10099         }
10100         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
10101         export function ClosingSigned_clone(orig: number): number {
10102                 if(!isWasmInitialized) {
10103                         throw new Error("initializeWasm() must be awaited first!");
10104                 }
10105                 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
10106                 return nativeResponseValue;
10107         }
10108         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
10109         export function UpdateAddHTLC_free(this_obj: number): void {
10110                 if(!isWasmInitialized) {
10111                         throw new Error("initializeWasm() must be awaited first!");
10112                 }
10113                 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
10114                 // debug statements here
10115         }
10116         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
10117         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
10118                 if(!isWasmInitialized) {
10119                         throw new Error("initializeWasm() must be awaited first!");
10120                 }
10121                 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
10122                 return decodeArray(nativeResponseValue);
10123         }
10124         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10125         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
10126                 if(!isWasmInitialized) {
10127                         throw new Error("initializeWasm() must be awaited first!");
10128                 }
10129                 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
10130                 // debug statements here
10131         }
10132         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
10133         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
10134                 if(!isWasmInitialized) {
10135                         throw new Error("initializeWasm() must be awaited first!");
10136                 }
10137                 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
10138                 return nativeResponseValue;
10139         }
10140         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
10141         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
10142                 if(!isWasmInitialized) {
10143                         throw new Error("initializeWasm() must be awaited first!");
10144                 }
10145                 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
10146                 // debug statements here
10147         }
10148         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
10149         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
10150                 if(!isWasmInitialized) {
10151                         throw new Error("initializeWasm() must be awaited first!");
10152                 }
10153                 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
10154                 return nativeResponseValue;
10155         }
10156         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
10157         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
10158                 if(!isWasmInitialized) {
10159                         throw new Error("initializeWasm() must be awaited first!");
10160                 }
10161                 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
10162                 // debug statements here
10163         }
10164         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
10165         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
10166                 if(!isWasmInitialized) {
10167                         throw new Error("initializeWasm() must be awaited first!");
10168                 }
10169                 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
10170                 return decodeArray(nativeResponseValue);
10171         }
10172         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10173         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
10174                 if(!isWasmInitialized) {
10175                         throw new Error("initializeWasm() must be awaited first!");
10176                 }
10177                 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
10178                 // debug statements here
10179         }
10180         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
10181         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
10182                 if(!isWasmInitialized) {
10183                         throw new Error("initializeWasm() must be awaited first!");
10184                 }
10185                 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
10186                 return nativeResponseValue;
10187         }
10188         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
10189         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
10190                 if(!isWasmInitialized) {
10191                         throw new Error("initializeWasm() must be awaited first!");
10192                 }
10193                 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
10194                 // debug statements here
10195         }
10196         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
10197         export function UpdateAddHTLC_clone(orig: number): number {
10198                 if(!isWasmInitialized) {
10199                         throw new Error("initializeWasm() must be awaited first!");
10200                 }
10201                 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
10202                 return nativeResponseValue;
10203         }
10204         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
10205         export function UpdateFulfillHTLC_free(this_obj: number): void {
10206                 if(!isWasmInitialized) {
10207                         throw new Error("initializeWasm() must be awaited first!");
10208                 }
10209                 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
10210                 // debug statements here
10211         }
10212         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
10213         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
10214                 if(!isWasmInitialized) {
10215                         throw new Error("initializeWasm() must be awaited first!");
10216                 }
10217                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
10218                 return decodeArray(nativeResponseValue);
10219         }
10220         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10221         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
10222                 if(!isWasmInitialized) {
10223                         throw new Error("initializeWasm() must be awaited first!");
10224                 }
10225                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
10226                 // debug statements here
10227         }
10228         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
10229         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
10230                 if(!isWasmInitialized) {
10231                         throw new Error("initializeWasm() must be awaited first!");
10232                 }
10233                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
10234                 return nativeResponseValue;
10235         }
10236         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
10237         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
10238                 if(!isWasmInitialized) {
10239                         throw new Error("initializeWasm() must be awaited first!");
10240                 }
10241                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
10242                 // debug statements here
10243         }
10244         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
10245         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
10246                 if(!isWasmInitialized) {
10247                         throw new Error("initializeWasm() must be awaited first!");
10248                 }
10249                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
10250                 return decodeArray(nativeResponseValue);
10251         }
10252         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10253         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
10254                 if(!isWasmInitialized) {
10255                         throw new Error("initializeWasm() must be awaited first!");
10256                 }
10257                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
10258                 // debug statements here
10259         }
10260         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
10261         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
10262                 if(!isWasmInitialized) {
10263                         throw new Error("initializeWasm() must be awaited first!");
10264                 }
10265                 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
10266                 return nativeResponseValue;
10267         }
10268         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
10269         export function UpdateFulfillHTLC_clone(orig: number): number {
10270                 if(!isWasmInitialized) {
10271                         throw new Error("initializeWasm() must be awaited first!");
10272                 }
10273                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
10274                 return nativeResponseValue;
10275         }
10276         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
10277         export function UpdateFailHTLC_free(this_obj: number): void {
10278                 if(!isWasmInitialized) {
10279                         throw new Error("initializeWasm() must be awaited first!");
10280                 }
10281                 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
10282                 // debug statements here
10283         }
10284         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
10285         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
10286                 if(!isWasmInitialized) {
10287                         throw new Error("initializeWasm() must be awaited first!");
10288                 }
10289                 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
10290                 return decodeArray(nativeResponseValue);
10291         }
10292         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10293         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
10294                 if(!isWasmInitialized) {
10295                         throw new Error("initializeWasm() must be awaited first!");
10296                 }
10297                 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
10298                 // debug statements here
10299         }
10300         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
10301         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
10302                 if(!isWasmInitialized) {
10303                         throw new Error("initializeWasm() must be awaited first!");
10304                 }
10305                 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
10306                 return nativeResponseValue;
10307         }
10308         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
10309         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
10310                 if(!isWasmInitialized) {
10311                         throw new Error("initializeWasm() must be awaited first!");
10312                 }
10313                 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
10314                 // debug statements here
10315         }
10316         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
10317         export function UpdateFailHTLC_clone(orig: number): number {
10318                 if(!isWasmInitialized) {
10319                         throw new Error("initializeWasm() must be awaited first!");
10320                 }
10321                 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
10322                 return nativeResponseValue;
10323         }
10324         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
10325         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
10326                 if(!isWasmInitialized) {
10327                         throw new Error("initializeWasm() must be awaited first!");
10328                 }
10329                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
10330                 // debug statements here
10331         }
10332         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
10333         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
10334                 if(!isWasmInitialized) {
10335                         throw new Error("initializeWasm() must be awaited first!");
10336                 }
10337                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
10338                 return decodeArray(nativeResponseValue);
10339         }
10340         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10341         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
10342                 if(!isWasmInitialized) {
10343                         throw new Error("initializeWasm() must be awaited first!");
10344                 }
10345                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
10346                 // debug statements here
10347         }
10348         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
10349         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
10350                 if(!isWasmInitialized) {
10351                         throw new Error("initializeWasm() must be awaited first!");
10352                 }
10353                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
10354                 return nativeResponseValue;
10355         }
10356         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
10357         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
10358                 if(!isWasmInitialized) {
10359                         throw new Error("initializeWasm() must be awaited first!");
10360                 }
10361                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
10362                 // debug statements here
10363         }
10364         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
10365         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
10366                 if(!isWasmInitialized) {
10367                         throw new Error("initializeWasm() must be awaited first!");
10368                 }
10369                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
10370                 return nativeResponseValue;
10371         }
10372         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
10373         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
10374                 if(!isWasmInitialized) {
10375                         throw new Error("initializeWasm() must be awaited first!");
10376                 }
10377                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
10378                 // debug statements here
10379         }
10380         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
10381         export function UpdateFailMalformedHTLC_clone(orig: number): number {
10382                 if(!isWasmInitialized) {
10383                         throw new Error("initializeWasm() must be awaited first!");
10384                 }
10385                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
10386                 return nativeResponseValue;
10387         }
10388         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
10389         export function CommitmentSigned_free(this_obj: number): void {
10390                 if(!isWasmInitialized) {
10391                         throw new Error("initializeWasm() must be awaited first!");
10392                 }
10393                 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
10394                 // debug statements here
10395         }
10396         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
10397         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
10398                 if(!isWasmInitialized) {
10399                         throw new Error("initializeWasm() must be awaited first!");
10400                 }
10401                 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
10402                 return decodeArray(nativeResponseValue);
10403         }
10404         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10405         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
10406                 if(!isWasmInitialized) {
10407                         throw new Error("initializeWasm() must be awaited first!");
10408                 }
10409                 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
10410                 // debug statements here
10411         }
10412         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
10413         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
10414                 if(!isWasmInitialized) {
10415                         throw new Error("initializeWasm() must be awaited first!");
10416                 }
10417                 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
10418                 return decodeArray(nativeResponseValue);
10419         }
10420         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
10421         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
10422                 if(!isWasmInitialized) {
10423                         throw new Error("initializeWasm() must be awaited first!");
10424                 }
10425                 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
10426                 // debug statements here
10427         }
10428         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
10429         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
10430                 if(!isWasmInitialized) {
10431                         throw new Error("initializeWasm() must be awaited first!");
10432                 }
10433                 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
10434                 // debug statements here
10435         }
10436         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
10437         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
10438                 if(!isWasmInitialized) {
10439                         throw new Error("initializeWasm() must be awaited first!");
10440                 }
10441                 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
10442                 return nativeResponseValue;
10443         }
10444         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
10445         export function CommitmentSigned_clone(orig: number): number {
10446                 if(!isWasmInitialized) {
10447                         throw new Error("initializeWasm() must be awaited first!");
10448                 }
10449                 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
10450                 return nativeResponseValue;
10451         }
10452         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
10453         export function RevokeAndACK_free(this_obj: number): void {
10454                 if(!isWasmInitialized) {
10455                         throw new Error("initializeWasm() must be awaited first!");
10456                 }
10457                 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
10458                 // debug statements here
10459         }
10460         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
10461         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
10462                 if(!isWasmInitialized) {
10463                         throw new Error("initializeWasm() must be awaited first!");
10464                 }
10465                 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
10466                 return decodeArray(nativeResponseValue);
10467         }
10468         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10469         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
10470                 if(!isWasmInitialized) {
10471                         throw new Error("initializeWasm() must be awaited first!");
10472                 }
10473                 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
10474                 // debug statements here
10475         }
10476         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
10477         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
10478                 if(!isWasmInitialized) {
10479                         throw new Error("initializeWasm() must be awaited first!");
10480                 }
10481                 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
10482                 return decodeArray(nativeResponseValue);
10483         }
10484         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10485         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
10486                 if(!isWasmInitialized) {
10487                         throw new Error("initializeWasm() must be awaited first!");
10488                 }
10489                 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
10490                 // debug statements here
10491         }
10492         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
10493         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
10494                 if(!isWasmInitialized) {
10495                         throw new Error("initializeWasm() must be awaited first!");
10496                 }
10497                 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
10498                 return decodeArray(nativeResponseValue);
10499         }
10500         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10501         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10502                 if(!isWasmInitialized) {
10503                         throw new Error("initializeWasm() must be awaited first!");
10504                 }
10505                 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
10506                 // debug statements here
10507         }
10508         // 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);
10509         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
10510                 if(!isWasmInitialized) {
10511                         throw new Error("initializeWasm() must be awaited first!");
10512                 }
10513                 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
10514                 return nativeResponseValue;
10515         }
10516         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
10517         export function RevokeAndACK_clone(orig: number): number {
10518                 if(!isWasmInitialized) {
10519                         throw new Error("initializeWasm() must be awaited first!");
10520                 }
10521                 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
10522                 return nativeResponseValue;
10523         }
10524         // void UpdateFee_free(struct LDKUpdateFee this_obj);
10525         export function UpdateFee_free(this_obj: number): void {
10526                 if(!isWasmInitialized) {
10527                         throw new Error("initializeWasm() must be awaited first!");
10528                 }
10529                 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
10530                 // debug statements here
10531         }
10532         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
10533         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
10534                 if(!isWasmInitialized) {
10535                         throw new Error("initializeWasm() must be awaited first!");
10536                 }
10537                 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
10538                 return decodeArray(nativeResponseValue);
10539         }
10540         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10541         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
10542                 if(!isWasmInitialized) {
10543                         throw new Error("initializeWasm() must be awaited first!");
10544                 }
10545                 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
10546                 // debug statements here
10547         }
10548         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
10549         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
10550                 if(!isWasmInitialized) {
10551                         throw new Error("initializeWasm() must be awaited first!");
10552                 }
10553                 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
10554                 return nativeResponseValue;
10555         }
10556         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
10557         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
10558                 if(!isWasmInitialized) {
10559                         throw new Error("initializeWasm() must be awaited first!");
10560                 }
10561                 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
10562                 // debug statements here
10563         }
10564         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
10565         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
10566                 if(!isWasmInitialized) {
10567                         throw new Error("initializeWasm() must be awaited first!");
10568                 }
10569                 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
10570                 return nativeResponseValue;
10571         }
10572         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
10573         export function UpdateFee_clone(orig: number): number {
10574                 if(!isWasmInitialized) {
10575                         throw new Error("initializeWasm() must be awaited first!");
10576                 }
10577                 const nativeResponseValue = wasm.UpdateFee_clone(orig);
10578                 return nativeResponseValue;
10579         }
10580         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
10581         export function DataLossProtect_free(this_obj: number): void {
10582                 if(!isWasmInitialized) {
10583                         throw new Error("initializeWasm() must be awaited first!");
10584                 }
10585                 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
10586                 // debug statements here
10587         }
10588         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
10589         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
10590                 if(!isWasmInitialized) {
10591                         throw new Error("initializeWasm() must be awaited first!");
10592                 }
10593                 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
10594                 return decodeArray(nativeResponseValue);
10595         }
10596         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10597         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
10598                 if(!isWasmInitialized) {
10599                         throw new Error("initializeWasm() must be awaited first!");
10600                 }
10601                 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
10602                 // debug statements here
10603         }
10604         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
10605         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
10606                 if(!isWasmInitialized) {
10607                         throw new Error("initializeWasm() must be awaited first!");
10608                 }
10609                 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
10610                 return decodeArray(nativeResponseValue);
10611         }
10612         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10613         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10614                 if(!isWasmInitialized) {
10615                         throw new Error("initializeWasm() must be awaited first!");
10616                 }
10617                 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
10618                 // debug statements here
10619         }
10620         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
10621         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
10622                 if(!isWasmInitialized) {
10623                         throw new Error("initializeWasm() must be awaited first!");
10624                 }
10625                 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
10626                 return nativeResponseValue;
10627         }
10628         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
10629         export function DataLossProtect_clone(orig: number): number {
10630                 if(!isWasmInitialized) {
10631                         throw new Error("initializeWasm() must be awaited first!");
10632                 }
10633                 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
10634                 return nativeResponseValue;
10635         }
10636         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
10637         export function ChannelReestablish_free(this_obj: number): void {
10638                 if(!isWasmInitialized) {
10639                         throw new Error("initializeWasm() must be awaited first!");
10640                 }
10641                 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
10642                 // debug statements here
10643         }
10644         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
10645         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
10646                 if(!isWasmInitialized) {
10647                         throw new Error("initializeWasm() must be awaited first!");
10648                 }
10649                 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
10650                 return decodeArray(nativeResponseValue);
10651         }
10652         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10653         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
10654                 if(!isWasmInitialized) {
10655                         throw new Error("initializeWasm() must be awaited first!");
10656                 }
10657                 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
10658                 // debug statements here
10659         }
10660         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
10661         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
10662                 if(!isWasmInitialized) {
10663                         throw new Error("initializeWasm() must be awaited first!");
10664                 }
10665                 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
10666                 return nativeResponseValue;
10667         }
10668         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
10669         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
10670                 if(!isWasmInitialized) {
10671                         throw new Error("initializeWasm() must be awaited first!");
10672                 }
10673                 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
10674                 // debug statements here
10675         }
10676         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
10677         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
10678                 if(!isWasmInitialized) {
10679                         throw new Error("initializeWasm() must be awaited first!");
10680                 }
10681                 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
10682                 return nativeResponseValue;
10683         }
10684         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
10685         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
10686                 if(!isWasmInitialized) {
10687                         throw new Error("initializeWasm() must be awaited first!");
10688                 }
10689                 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
10690                 // debug statements here
10691         }
10692         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
10693         export function ChannelReestablish_clone(orig: number): number {
10694                 if(!isWasmInitialized) {
10695                         throw new Error("initializeWasm() must be awaited first!");
10696                 }
10697                 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
10698                 return nativeResponseValue;
10699         }
10700         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
10701         export function AnnouncementSignatures_free(this_obj: number): void {
10702                 if(!isWasmInitialized) {
10703                         throw new Error("initializeWasm() must be awaited first!");
10704                 }
10705                 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
10706                 // debug statements here
10707         }
10708         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
10709         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
10710                 if(!isWasmInitialized) {
10711                         throw new Error("initializeWasm() must be awaited first!");
10712                 }
10713                 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
10714                 return decodeArray(nativeResponseValue);
10715         }
10716         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10717         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
10718                 if(!isWasmInitialized) {
10719                         throw new Error("initializeWasm() must be awaited first!");
10720                 }
10721                 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
10722                 // debug statements here
10723         }
10724         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
10725         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
10726                 if(!isWasmInitialized) {
10727                         throw new Error("initializeWasm() must be awaited first!");
10728                 }
10729                 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
10730                 return nativeResponseValue;
10731         }
10732         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
10733         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
10734                 if(!isWasmInitialized) {
10735                         throw new Error("initializeWasm() must be awaited first!");
10736                 }
10737                 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
10738                 // debug statements here
10739         }
10740         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
10741         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
10742                 if(!isWasmInitialized) {
10743                         throw new Error("initializeWasm() must be awaited first!");
10744                 }
10745                 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
10746                 return decodeArray(nativeResponseValue);
10747         }
10748         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
10749         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
10750                 if(!isWasmInitialized) {
10751                         throw new Error("initializeWasm() must be awaited first!");
10752                 }
10753                 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
10754                 // debug statements here
10755         }
10756         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
10757         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
10758                 if(!isWasmInitialized) {
10759                         throw new Error("initializeWasm() must be awaited first!");
10760                 }
10761                 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
10762                 return decodeArray(nativeResponseValue);
10763         }
10764         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
10765         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
10766                 if(!isWasmInitialized) {
10767                         throw new Error("initializeWasm() must be awaited first!");
10768                 }
10769                 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
10770                 // debug statements here
10771         }
10772         // 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);
10773         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
10774                 if(!isWasmInitialized) {
10775                         throw new Error("initializeWasm() must be awaited first!");
10776                 }
10777                 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
10778                 return nativeResponseValue;
10779         }
10780         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
10781         export function AnnouncementSignatures_clone(orig: number): number {
10782                 if(!isWasmInitialized) {
10783                         throw new Error("initializeWasm() must be awaited first!");
10784                 }
10785                 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
10786                 return nativeResponseValue;
10787         }
10788         // void NetAddress_free(struct LDKNetAddress this_ptr);
10789         export function NetAddress_free(this_ptr: number): void {
10790                 if(!isWasmInitialized) {
10791                         throw new Error("initializeWasm() must be awaited first!");
10792                 }
10793                 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
10794                 // debug statements here
10795         }
10796         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
10797         export function NetAddress_clone(orig: number): number {
10798                 if(!isWasmInitialized) {
10799                         throw new Error("initializeWasm() must be awaited first!");
10800                 }
10801                 const nativeResponseValue = wasm.NetAddress_clone(orig);
10802                 return nativeResponseValue;
10803         }
10804         // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
10805         export function NetAddress_ipv4(addr: Uint8Array, port: number): number {
10806                 if(!isWasmInitialized) {
10807                         throw new Error("initializeWasm() must be awaited first!");
10808                 }
10809                 const nativeResponseValue = wasm.NetAddress_ipv4(encodeArray(addr), port);
10810                 return nativeResponseValue;
10811         }
10812         // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
10813         export function NetAddress_ipv6(addr: Uint8Array, port: number): number {
10814                 if(!isWasmInitialized) {
10815                         throw new Error("initializeWasm() must be awaited first!");
10816                 }
10817                 const nativeResponseValue = wasm.NetAddress_ipv6(encodeArray(addr), port);
10818                 return nativeResponseValue;
10819         }
10820         // struct LDKNetAddress NetAddress_onion_v2(struct LDKTenBytes addr, uint16_t port);
10821         export function NetAddress_onion_v2(addr: Uint8Array, port: number): number {
10822                 if(!isWasmInitialized) {
10823                         throw new Error("initializeWasm() must be awaited first!");
10824                 }
10825                 const nativeResponseValue = wasm.NetAddress_onion_v2(encodeArray(addr), port);
10826                 return nativeResponseValue;
10827         }
10828         // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
10829         export function NetAddress_onion_v3(ed25519_pubkey: Uint8Array, checksum: number, version: number, port: number): number {
10830                 if(!isWasmInitialized) {
10831                         throw new Error("initializeWasm() must be awaited first!");
10832                 }
10833                 const nativeResponseValue = wasm.NetAddress_onion_v3(encodeArray(ed25519_pubkey), checksum, version, port);
10834                 return nativeResponseValue;
10835         }
10836         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
10837         export function NetAddress_write(obj: number): Uint8Array {
10838                 if(!isWasmInitialized) {
10839                         throw new Error("initializeWasm() must be awaited first!");
10840                 }
10841                 const nativeResponseValue = wasm.NetAddress_write(obj);
10842                 return decodeArray(nativeResponseValue);
10843         }
10844         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
10845         export function Result_read(ser: Uint8Array): number {
10846                 if(!isWasmInitialized) {
10847                         throw new Error("initializeWasm() must be awaited first!");
10848                 }
10849                 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
10850                 return nativeResponseValue;
10851         }
10852         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
10853         export function NetAddress_read(ser: Uint8Array): number {
10854                 if(!isWasmInitialized) {
10855                         throw new Error("initializeWasm() must be awaited first!");
10856                 }
10857                 const nativeResponseValue = wasm.NetAddress_read(encodeArray(ser));
10858                 return nativeResponseValue;
10859         }
10860         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
10861         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
10862                 if(!isWasmInitialized) {
10863                         throw new Error("initializeWasm() must be awaited first!");
10864                 }
10865                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
10866                 // debug statements here
10867         }
10868         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
10869         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
10870                 if(!isWasmInitialized) {
10871                         throw new Error("initializeWasm() must be awaited first!");
10872                 }
10873                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
10874                 return nativeResponseValue;
10875         }
10876         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
10877         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
10878                 if(!isWasmInitialized) {
10879                         throw new Error("initializeWasm() must be awaited first!");
10880                 }
10881                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
10882                 // debug statements here
10883         }
10884         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
10885         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
10886                 if(!isWasmInitialized) {
10887                         throw new Error("initializeWasm() must be awaited first!");
10888                 }
10889                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
10890                 return nativeResponseValue;
10891         }
10892         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
10893         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
10894                 if(!isWasmInitialized) {
10895                         throw new Error("initializeWasm() must be awaited first!");
10896                 }
10897                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
10898                 // debug statements here
10899         }
10900         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
10901         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
10902                 if(!isWasmInitialized) {
10903                         throw new Error("initializeWasm() must be awaited first!");
10904                 }
10905                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
10906                 return decodeArray(nativeResponseValue);
10907         }
10908         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10909         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
10910                 if(!isWasmInitialized) {
10911                         throw new Error("initializeWasm() must be awaited first!");
10912                 }
10913                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
10914                 // debug statements here
10915         }
10916         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
10917         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
10918                 if(!isWasmInitialized) {
10919                         throw new Error("initializeWasm() must be awaited first!");
10920                 }
10921                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
10922                 return decodeArray(nativeResponseValue);
10923         }
10924         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
10925         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
10926                 if(!isWasmInitialized) {
10927                         throw new Error("initializeWasm() must be awaited first!");
10928                 }
10929                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
10930                 // debug statements here
10931         }
10932         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
10933         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
10934                 if(!isWasmInitialized) {
10935                         throw new Error("initializeWasm() must be awaited first!");
10936                 }
10937                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
10938                 return decodeArray(nativeResponseValue);
10939         }
10940         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10941         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
10942                 if(!isWasmInitialized) {
10943                         throw new Error("initializeWasm() must be awaited first!");
10944                 }
10945                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
10946                 // debug statements here
10947         }
10948         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
10949         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
10950                 if(!isWasmInitialized) {
10951                         throw new Error("initializeWasm() must be awaited first!");
10952                 }
10953                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
10954                 // debug statements here
10955         }
10956         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
10957         export function UnsignedNodeAnnouncement_clone(orig: number): number {
10958                 if(!isWasmInitialized) {
10959                         throw new Error("initializeWasm() must be awaited first!");
10960                 }
10961                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
10962                 return nativeResponseValue;
10963         }
10964         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
10965         export function NodeAnnouncement_free(this_obj: number): void {
10966                 if(!isWasmInitialized) {
10967                         throw new Error("initializeWasm() must be awaited first!");
10968                 }
10969                 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
10970                 // debug statements here
10971         }
10972         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
10973         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
10974                 if(!isWasmInitialized) {
10975                         throw new Error("initializeWasm() must be awaited first!");
10976                 }
10977                 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
10978                 return decodeArray(nativeResponseValue);
10979         }
10980         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10981         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
10982                 if(!isWasmInitialized) {
10983                         throw new Error("initializeWasm() must be awaited first!");
10984                 }
10985                 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
10986                 // debug statements here
10987         }
10988         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
10989         export function NodeAnnouncement_get_contents(this_ptr: number): number {
10990                 if(!isWasmInitialized) {
10991                         throw new Error("initializeWasm() must be awaited first!");
10992                 }
10993                 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
10994                 return nativeResponseValue;
10995         }
10996         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
10997         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
10998                 if(!isWasmInitialized) {
10999                         throw new Error("initializeWasm() must be awaited first!");
11000                 }
11001                 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
11002                 // debug statements here
11003         }
11004         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
11005         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
11006                 if(!isWasmInitialized) {
11007                         throw new Error("initializeWasm() must be awaited first!");
11008                 }
11009                 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
11010                 return nativeResponseValue;
11011         }
11012         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
11013         export function NodeAnnouncement_clone(orig: number): number {
11014                 if(!isWasmInitialized) {
11015                         throw new Error("initializeWasm() must be awaited first!");
11016                 }
11017                 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
11018                 return nativeResponseValue;
11019         }
11020         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
11021         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
11022                 if(!isWasmInitialized) {
11023                         throw new Error("initializeWasm() must be awaited first!");
11024                 }
11025                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
11026                 // debug statements here
11027         }
11028         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
11029         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
11030                 if(!isWasmInitialized) {
11031                         throw new Error("initializeWasm() must be awaited first!");
11032                 }
11033                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
11034                 return nativeResponseValue;
11035         }
11036         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11037         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
11038                 if(!isWasmInitialized) {
11039                         throw new Error("initializeWasm() must be awaited first!");
11040                 }
11041                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
11042                 // debug statements here
11043         }
11044         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
11045         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
11046                 if(!isWasmInitialized) {
11047                         throw new Error("initializeWasm() must be awaited first!");
11048                 }
11049                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
11050                 return decodeArray(nativeResponseValue);
11051         }
11052         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11053         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11054                 if(!isWasmInitialized) {
11055                         throw new Error("initializeWasm() must be awaited first!");
11056                 }
11057                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
11058                 // debug statements here
11059         }
11060         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
11061         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
11062                 if(!isWasmInitialized) {
11063                         throw new Error("initializeWasm() must be awaited first!");
11064                 }
11065                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
11066                 return nativeResponseValue;
11067         }
11068         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
11069         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
11070                 if(!isWasmInitialized) {
11071                         throw new Error("initializeWasm() must be awaited first!");
11072                 }
11073                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
11074                 // debug statements here
11075         }
11076         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
11077         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
11078                 if(!isWasmInitialized) {
11079                         throw new Error("initializeWasm() must be awaited first!");
11080                 }
11081                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
11082                 return decodeArray(nativeResponseValue);
11083         }
11084         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11085         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
11086                 if(!isWasmInitialized) {
11087                         throw new Error("initializeWasm() must be awaited first!");
11088                 }
11089                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
11090                 // debug statements here
11091         }
11092         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
11093         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
11094                 if(!isWasmInitialized) {
11095                         throw new Error("initializeWasm() must be awaited first!");
11096                 }
11097                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
11098                 return decodeArray(nativeResponseValue);
11099         }
11100         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11101         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
11102                 if(!isWasmInitialized) {
11103                         throw new Error("initializeWasm() must be awaited first!");
11104                 }
11105                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
11106                 // debug statements here
11107         }
11108         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
11109         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
11110                 if(!isWasmInitialized) {
11111                         throw new Error("initializeWasm() must be awaited first!");
11112                 }
11113                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
11114                 return decodeArray(nativeResponseValue);
11115         }
11116         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11117         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
11118                 if(!isWasmInitialized) {
11119                         throw new Error("initializeWasm() must be awaited first!");
11120                 }
11121                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
11122                 // debug statements here
11123         }
11124         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
11125         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
11126                 if(!isWasmInitialized) {
11127                         throw new Error("initializeWasm() must be awaited first!");
11128                 }
11129                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
11130                 return decodeArray(nativeResponseValue);
11131         }
11132         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11133         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
11134                 if(!isWasmInitialized) {
11135                         throw new Error("initializeWasm() must be awaited first!");
11136                 }
11137                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
11138                 // debug statements here
11139         }
11140         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
11141         export function UnsignedChannelAnnouncement_clone(orig: number): number {
11142                 if(!isWasmInitialized) {
11143                         throw new Error("initializeWasm() must be awaited first!");
11144                 }
11145                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
11146                 return nativeResponseValue;
11147         }
11148         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
11149         export function ChannelAnnouncement_free(this_obj: number): void {
11150                 if(!isWasmInitialized) {
11151                         throw new Error("initializeWasm() must be awaited first!");
11152                 }
11153                 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
11154                 // debug statements here
11155         }
11156         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
11157         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
11158                 if(!isWasmInitialized) {
11159                         throw new Error("initializeWasm() must be awaited first!");
11160                 }
11161                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
11162                 return decodeArray(nativeResponseValue);
11163         }
11164         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
11165         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
11166                 if(!isWasmInitialized) {
11167                         throw new Error("initializeWasm() must be awaited first!");
11168                 }
11169                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
11170                 // debug statements here
11171         }
11172         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
11173         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
11174                 if(!isWasmInitialized) {
11175                         throw new Error("initializeWasm() must be awaited first!");
11176                 }
11177                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
11178                 return decodeArray(nativeResponseValue);
11179         }
11180         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
11181         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
11182                 if(!isWasmInitialized) {
11183                         throw new Error("initializeWasm() must be awaited first!");
11184                 }
11185                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
11186                 // debug statements here
11187         }
11188         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
11189         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
11190                 if(!isWasmInitialized) {
11191                         throw new Error("initializeWasm() must be awaited first!");
11192                 }
11193                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
11194                 return decodeArray(nativeResponseValue);
11195         }
11196         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
11197         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
11198                 if(!isWasmInitialized) {
11199                         throw new Error("initializeWasm() must be awaited first!");
11200                 }
11201                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
11202                 // debug statements here
11203         }
11204         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
11205         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
11206                 if(!isWasmInitialized) {
11207                         throw new Error("initializeWasm() must be awaited first!");
11208                 }
11209                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
11210                 return decodeArray(nativeResponseValue);
11211         }
11212         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
11213         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
11214                 if(!isWasmInitialized) {
11215                         throw new Error("initializeWasm() must be awaited first!");
11216                 }
11217                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
11218                 // debug statements here
11219         }
11220         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
11221         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
11222                 if(!isWasmInitialized) {
11223                         throw new Error("initializeWasm() must be awaited first!");
11224                 }
11225                 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
11226                 return nativeResponseValue;
11227         }
11228         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
11229         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
11230                 if(!isWasmInitialized) {
11231                         throw new Error("initializeWasm() must be awaited first!");
11232                 }
11233                 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
11234                 // debug statements here
11235         }
11236         // 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);
11237         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 {
11238                 if(!isWasmInitialized) {
11239                         throw new Error("initializeWasm() must be awaited first!");
11240                 }
11241                 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);
11242                 return nativeResponseValue;
11243         }
11244         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
11245         export function ChannelAnnouncement_clone(orig: number): number {
11246                 if(!isWasmInitialized) {
11247                         throw new Error("initializeWasm() must be awaited first!");
11248                 }
11249                 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
11250                 return nativeResponseValue;
11251         }
11252         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
11253         export function UnsignedChannelUpdate_free(this_obj: number): void {
11254                 if(!isWasmInitialized) {
11255                         throw new Error("initializeWasm() must be awaited first!");
11256                 }
11257                 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
11258                 // debug statements here
11259         }
11260         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
11261         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
11262                 if(!isWasmInitialized) {
11263                         throw new Error("initializeWasm() must be awaited first!");
11264                 }
11265                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
11266                 return decodeArray(nativeResponseValue);
11267         }
11268         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11269         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11270                 if(!isWasmInitialized) {
11271                         throw new Error("initializeWasm() must be awaited first!");
11272                 }
11273                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
11274                 // debug statements here
11275         }
11276         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
11277         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
11278                 if(!isWasmInitialized) {
11279                         throw new Error("initializeWasm() must be awaited first!");
11280                 }
11281                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
11282                 return nativeResponseValue;
11283         }
11284         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
11285         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
11286                 if(!isWasmInitialized) {
11287                         throw new Error("initializeWasm() must be awaited first!");
11288                 }
11289                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
11290                 // debug statements here
11291         }
11292         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
11293         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
11294                 if(!isWasmInitialized) {
11295                         throw new Error("initializeWasm() must be awaited first!");
11296                 }
11297                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
11298                 return nativeResponseValue;
11299         }
11300         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
11301         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
11302                 if(!isWasmInitialized) {
11303                         throw new Error("initializeWasm() must be awaited first!");
11304                 }
11305                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
11306                 // debug statements here
11307         }
11308         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
11309         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
11310                 if(!isWasmInitialized) {
11311                         throw new Error("initializeWasm() must be awaited first!");
11312                 }
11313                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
11314                 return nativeResponseValue;
11315         }
11316         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
11317         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
11318                 if(!isWasmInitialized) {
11319                         throw new Error("initializeWasm() must be awaited first!");
11320                 }
11321                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
11322                 // debug statements here
11323         }
11324         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
11325         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
11326                 if(!isWasmInitialized) {
11327                         throw new Error("initializeWasm() must be awaited first!");
11328                 }
11329                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
11330                 return nativeResponseValue;
11331         }
11332         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
11333         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11334                 if(!isWasmInitialized) {
11335                         throw new Error("initializeWasm() must be awaited first!");
11336                 }
11337                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
11338                 // debug statements here
11339         }
11340         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
11341         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
11342                 if(!isWasmInitialized) {
11343                         throw new Error("initializeWasm() must be awaited first!");
11344                 }
11345                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
11346                 return nativeResponseValue;
11347         }
11348         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
11349         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
11350                 if(!isWasmInitialized) {
11351                         throw new Error("initializeWasm() must be awaited first!");
11352                 }
11353                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
11354                 // debug statements here
11355         }
11356         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
11357         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
11358                 if(!isWasmInitialized) {
11359                         throw new Error("initializeWasm() must be awaited first!");
11360                 }
11361                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
11362                 return nativeResponseValue;
11363         }
11364         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
11365         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
11366                 if(!isWasmInitialized) {
11367                         throw new Error("initializeWasm() must be awaited first!");
11368                 }
11369                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
11370                 // debug statements here
11371         }
11372         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
11373         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
11374                 if(!isWasmInitialized) {
11375                         throw new Error("initializeWasm() must be awaited first!");
11376                 }
11377                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
11378                 return nativeResponseValue;
11379         }
11380         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
11381         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
11382                 if(!isWasmInitialized) {
11383                         throw new Error("initializeWasm() must be awaited first!");
11384                 }
11385                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
11386                 // debug statements here
11387         }
11388         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
11389         export function UnsignedChannelUpdate_clone(orig: number): number {
11390                 if(!isWasmInitialized) {
11391                         throw new Error("initializeWasm() must be awaited first!");
11392                 }
11393                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
11394                 return nativeResponseValue;
11395         }
11396         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
11397         export function ChannelUpdate_free(this_obj: number): void {
11398                 if(!isWasmInitialized) {
11399                         throw new Error("initializeWasm() must be awaited first!");
11400                 }
11401                 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
11402                 // debug statements here
11403         }
11404         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
11405         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
11406                 if(!isWasmInitialized) {
11407                         throw new Error("initializeWasm() must be awaited first!");
11408                 }
11409                 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
11410                 return decodeArray(nativeResponseValue);
11411         }
11412         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
11413         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
11414                 if(!isWasmInitialized) {
11415                         throw new Error("initializeWasm() must be awaited first!");
11416                 }
11417                 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
11418                 // debug statements here
11419         }
11420         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
11421         export function ChannelUpdate_get_contents(this_ptr: number): number {
11422                 if(!isWasmInitialized) {
11423                         throw new Error("initializeWasm() must be awaited first!");
11424                 }
11425                 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
11426                 return nativeResponseValue;
11427         }
11428         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
11429         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
11430                 if(!isWasmInitialized) {
11431                         throw new Error("initializeWasm() must be awaited first!");
11432                 }
11433                 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
11434                 // debug statements here
11435         }
11436         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
11437         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
11438                 if(!isWasmInitialized) {
11439                         throw new Error("initializeWasm() must be awaited first!");
11440                 }
11441                 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
11442                 return nativeResponseValue;
11443         }
11444         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
11445         export function ChannelUpdate_clone(orig: number): number {
11446                 if(!isWasmInitialized) {
11447                         throw new Error("initializeWasm() must be awaited first!");
11448                 }
11449                 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
11450                 return nativeResponseValue;
11451         }
11452         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
11453         export function QueryChannelRange_free(this_obj: number): void {
11454                 if(!isWasmInitialized) {
11455                         throw new Error("initializeWasm() must be awaited first!");
11456                 }
11457                 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
11458                 // debug statements here
11459         }
11460         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
11461         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
11462                 if(!isWasmInitialized) {
11463                         throw new Error("initializeWasm() must be awaited first!");
11464                 }
11465                 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
11466                 return decodeArray(nativeResponseValue);
11467         }
11468         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11469         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11470                 if(!isWasmInitialized) {
11471                         throw new Error("initializeWasm() must be awaited first!");
11472                 }
11473                 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
11474                 // debug statements here
11475         }
11476         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
11477         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
11478                 if(!isWasmInitialized) {
11479                         throw new Error("initializeWasm() must be awaited first!");
11480                 }
11481                 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
11482                 return nativeResponseValue;
11483         }
11484         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
11485         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
11486                 if(!isWasmInitialized) {
11487                         throw new Error("initializeWasm() must be awaited first!");
11488                 }
11489                 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
11490                 // debug statements here
11491         }
11492         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
11493         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
11494                 if(!isWasmInitialized) {
11495                         throw new Error("initializeWasm() must be awaited first!");
11496                 }
11497                 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
11498                 return nativeResponseValue;
11499         }
11500         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
11501         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
11502                 if(!isWasmInitialized) {
11503                         throw new Error("initializeWasm() must be awaited first!");
11504                 }
11505                 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
11506                 // debug statements here
11507         }
11508         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
11509         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
11510                 if(!isWasmInitialized) {
11511                         throw new Error("initializeWasm() must be awaited first!");
11512                 }
11513                 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
11514                 return nativeResponseValue;
11515         }
11516         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
11517         export function QueryChannelRange_clone(orig: number): number {
11518                 if(!isWasmInitialized) {
11519                         throw new Error("initializeWasm() must be awaited first!");
11520                 }
11521                 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
11522                 return nativeResponseValue;
11523         }
11524         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
11525         export function ReplyChannelRange_free(this_obj: number): void {
11526                 if(!isWasmInitialized) {
11527                         throw new Error("initializeWasm() must be awaited first!");
11528                 }
11529                 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
11530                 // debug statements here
11531         }
11532         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
11533         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
11534                 if(!isWasmInitialized) {
11535                         throw new Error("initializeWasm() must be awaited first!");
11536                 }
11537                 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
11538                 return decodeArray(nativeResponseValue);
11539         }
11540         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11541         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11542                 if(!isWasmInitialized) {
11543                         throw new Error("initializeWasm() must be awaited first!");
11544                 }
11545                 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
11546                 // debug statements here
11547         }
11548         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
11549         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
11550                 if(!isWasmInitialized) {
11551                         throw new Error("initializeWasm() must be awaited first!");
11552                 }
11553                 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
11554                 return nativeResponseValue;
11555         }
11556         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
11557         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
11558                 if(!isWasmInitialized) {
11559                         throw new Error("initializeWasm() must be awaited first!");
11560                 }
11561                 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
11562                 // debug statements here
11563         }
11564         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
11565         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
11566                 if(!isWasmInitialized) {
11567                         throw new Error("initializeWasm() must be awaited first!");
11568                 }
11569                 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
11570                 return nativeResponseValue;
11571         }
11572         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
11573         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
11574                 if(!isWasmInitialized) {
11575                         throw new Error("initializeWasm() must be awaited first!");
11576                 }
11577                 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
11578                 // debug statements here
11579         }
11580         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
11581         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
11582                 if(!isWasmInitialized) {
11583                         throw new Error("initializeWasm() must be awaited first!");
11584                 }
11585                 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
11586                 return nativeResponseValue;
11587         }
11588         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
11589         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
11590                 if(!isWasmInitialized) {
11591                         throw new Error("initializeWasm() must be awaited first!");
11592                 }
11593                 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
11594                 // debug statements here
11595         }
11596         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
11597         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
11598                 if(!isWasmInitialized) {
11599                         throw new Error("initializeWasm() must be awaited first!");
11600                 }
11601                 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
11602                 // debug statements here
11603         }
11604         // 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);
11605         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 {
11606                 if(!isWasmInitialized) {
11607                         throw new Error("initializeWasm() must be awaited first!");
11608                 }
11609                 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
11610                 return nativeResponseValue;
11611         }
11612         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
11613         export function ReplyChannelRange_clone(orig: number): number {
11614                 if(!isWasmInitialized) {
11615                         throw new Error("initializeWasm() must be awaited first!");
11616                 }
11617                 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
11618                 return nativeResponseValue;
11619         }
11620         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
11621         export function QueryShortChannelIds_free(this_obj: number): void {
11622                 if(!isWasmInitialized) {
11623                         throw new Error("initializeWasm() must be awaited first!");
11624                 }
11625                 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
11626                 // debug statements here
11627         }
11628         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
11629         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
11630                 if(!isWasmInitialized) {
11631                         throw new Error("initializeWasm() must be awaited first!");
11632                 }
11633                 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
11634                 return decodeArray(nativeResponseValue);
11635         }
11636         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11637         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11638                 if(!isWasmInitialized) {
11639                         throw new Error("initializeWasm() must be awaited first!");
11640                 }
11641                 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
11642                 // debug statements here
11643         }
11644         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
11645         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
11646                 if(!isWasmInitialized) {
11647                         throw new Error("initializeWasm() must be awaited first!");
11648                 }
11649                 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
11650                 // debug statements here
11651         }
11652         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
11653         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
11654                 if(!isWasmInitialized) {
11655                         throw new Error("initializeWasm() must be awaited first!");
11656                 }
11657                 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
11658                 return nativeResponseValue;
11659         }
11660         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
11661         export function QueryShortChannelIds_clone(orig: number): number {
11662                 if(!isWasmInitialized) {
11663                         throw new Error("initializeWasm() must be awaited first!");
11664                 }
11665                 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
11666                 return nativeResponseValue;
11667         }
11668         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
11669         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
11670                 if(!isWasmInitialized) {
11671                         throw new Error("initializeWasm() must be awaited first!");
11672                 }
11673                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
11674                 // debug statements here
11675         }
11676         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
11677         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
11678                 if(!isWasmInitialized) {
11679                         throw new Error("initializeWasm() must be awaited first!");
11680                 }
11681                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
11682                 return decodeArray(nativeResponseValue);
11683         }
11684         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11685         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11686                 if(!isWasmInitialized) {
11687                         throw new Error("initializeWasm() must be awaited first!");
11688                 }
11689                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
11690                 // debug statements here
11691         }
11692         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
11693         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
11694                 if(!isWasmInitialized) {
11695                         throw new Error("initializeWasm() must be awaited first!");
11696                 }
11697                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
11698                 return nativeResponseValue;
11699         }
11700         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
11701         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
11702                 if(!isWasmInitialized) {
11703                         throw new Error("initializeWasm() must be awaited first!");
11704                 }
11705                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
11706                 // debug statements here
11707         }
11708         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
11709         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
11710                 if(!isWasmInitialized) {
11711                         throw new Error("initializeWasm() must be awaited first!");
11712                 }
11713                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
11714                 return nativeResponseValue;
11715         }
11716         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
11717         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
11718                 if(!isWasmInitialized) {
11719                         throw new Error("initializeWasm() must be awaited first!");
11720                 }
11721                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
11722                 return nativeResponseValue;
11723         }
11724         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
11725         export function GossipTimestampFilter_free(this_obj: number): void {
11726                 if(!isWasmInitialized) {
11727                         throw new Error("initializeWasm() must be awaited first!");
11728                 }
11729                 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
11730                 // debug statements here
11731         }
11732         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
11733         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
11734                 if(!isWasmInitialized) {
11735                         throw new Error("initializeWasm() must be awaited first!");
11736                 }
11737                 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
11738                 return decodeArray(nativeResponseValue);
11739         }
11740         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11741         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11742                 if(!isWasmInitialized) {
11743                         throw new Error("initializeWasm() must be awaited first!");
11744                 }
11745                 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
11746                 // debug statements here
11747         }
11748         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
11749         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
11750                 if(!isWasmInitialized) {
11751                         throw new Error("initializeWasm() must be awaited first!");
11752                 }
11753                 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
11754                 return nativeResponseValue;
11755         }
11756         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
11757         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
11758                 if(!isWasmInitialized) {
11759                         throw new Error("initializeWasm() must be awaited first!");
11760                 }
11761                 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
11762                 // debug statements here
11763         }
11764         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
11765         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
11766                 if(!isWasmInitialized) {
11767                         throw new Error("initializeWasm() must be awaited first!");
11768                 }
11769                 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
11770                 return nativeResponseValue;
11771         }
11772         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
11773         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
11774                 if(!isWasmInitialized) {
11775                         throw new Error("initializeWasm() must be awaited first!");
11776                 }
11777                 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
11778                 // debug statements here
11779         }
11780         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
11781         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
11782                 if(!isWasmInitialized) {
11783                         throw new Error("initializeWasm() must be awaited first!");
11784                 }
11785                 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
11786                 return nativeResponseValue;
11787         }
11788         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
11789         export function GossipTimestampFilter_clone(orig: number): number {
11790                 if(!isWasmInitialized) {
11791                         throw new Error("initializeWasm() must be awaited first!");
11792                 }
11793                 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
11794                 return nativeResponseValue;
11795         }
11796         // void ErrorAction_free(struct LDKErrorAction this_ptr);
11797         export function ErrorAction_free(this_ptr: number): void {
11798                 if(!isWasmInitialized) {
11799                         throw new Error("initializeWasm() must be awaited first!");
11800                 }
11801                 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
11802                 // debug statements here
11803         }
11804         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
11805         export function ErrorAction_clone(orig: number): number {
11806                 if(!isWasmInitialized) {
11807                         throw new Error("initializeWasm() must be awaited first!");
11808                 }
11809                 const nativeResponseValue = wasm.ErrorAction_clone(orig);
11810                 return nativeResponseValue;
11811         }
11812         // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
11813         export function ErrorAction_disconnect_peer(msg: number): number {
11814                 if(!isWasmInitialized) {
11815                         throw new Error("initializeWasm() must be awaited first!");
11816                 }
11817                 const nativeResponseValue = wasm.ErrorAction_disconnect_peer(msg);
11818                 return nativeResponseValue;
11819         }
11820         // struct LDKErrorAction ErrorAction_ignore_error(void);
11821         export function ErrorAction_ignore_error(): number {
11822                 if(!isWasmInitialized) {
11823                         throw new Error("initializeWasm() must be awaited first!");
11824                 }
11825                 const nativeResponseValue = wasm.ErrorAction_ignore_error();
11826                 return nativeResponseValue;
11827         }
11828         // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
11829         export function ErrorAction_ignore_and_log(a: Level): number {
11830                 if(!isWasmInitialized) {
11831                         throw new Error("initializeWasm() must be awaited first!");
11832                 }
11833                 const nativeResponseValue = wasm.ErrorAction_ignore_and_log(a);
11834                 return nativeResponseValue;
11835         }
11836         // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
11837         export function ErrorAction_send_error_message(msg: number): number {
11838                 if(!isWasmInitialized) {
11839                         throw new Error("initializeWasm() must be awaited first!");
11840                 }
11841                 const nativeResponseValue = wasm.ErrorAction_send_error_message(msg);
11842                 return nativeResponseValue;
11843         }
11844         // void LightningError_free(struct LDKLightningError this_obj);
11845         export function LightningError_free(this_obj: number): void {
11846                 if(!isWasmInitialized) {
11847                         throw new Error("initializeWasm() must be awaited first!");
11848                 }
11849                 const nativeResponseValue = wasm.LightningError_free(this_obj);
11850                 // debug statements here
11851         }
11852         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
11853         export function LightningError_get_err(this_ptr: number): String {
11854                 if(!isWasmInitialized) {
11855                         throw new Error("initializeWasm() must be awaited first!");
11856                 }
11857                 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
11858                 return nativeResponseValue;
11859         }
11860         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
11861         export function LightningError_set_err(this_ptr: number, val: String): void {
11862                 if(!isWasmInitialized) {
11863                         throw new Error("initializeWasm() must be awaited first!");
11864                 }
11865                 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, val);
11866                 // debug statements here
11867         }
11868         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
11869         export function LightningError_get_action(this_ptr: number): number {
11870                 if(!isWasmInitialized) {
11871                         throw new Error("initializeWasm() must be awaited first!");
11872                 }
11873                 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
11874                 return nativeResponseValue;
11875         }
11876         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
11877         export function LightningError_set_action(this_ptr: number, val: number): void {
11878                 if(!isWasmInitialized) {
11879                         throw new Error("initializeWasm() must be awaited first!");
11880                 }
11881                 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
11882                 // debug statements here
11883         }
11884         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
11885         export function LightningError_new(err_arg: String, action_arg: number): number {
11886                 if(!isWasmInitialized) {
11887                         throw new Error("initializeWasm() must be awaited first!");
11888                 }
11889                 const nativeResponseValue = wasm.LightningError_new(err_arg, action_arg);
11890                 return nativeResponseValue;
11891         }
11892         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
11893         export function LightningError_clone(orig: number): number {
11894                 if(!isWasmInitialized) {
11895                         throw new Error("initializeWasm() must be awaited first!");
11896                 }
11897                 const nativeResponseValue = wasm.LightningError_clone(orig);
11898                 return nativeResponseValue;
11899         }
11900         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
11901         export function CommitmentUpdate_free(this_obj: number): void {
11902                 if(!isWasmInitialized) {
11903                         throw new Error("initializeWasm() must be awaited first!");
11904                 }
11905                 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
11906                 // debug statements here
11907         }
11908         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
11909         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
11910                 if(!isWasmInitialized) {
11911                         throw new Error("initializeWasm() must be awaited first!");
11912                 }
11913                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
11914                 // debug statements here
11915         }
11916         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
11917         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
11918                 if(!isWasmInitialized) {
11919                         throw new Error("initializeWasm() must be awaited first!");
11920                 }
11921                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
11922                 // debug statements here
11923         }
11924         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
11925         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
11926                 if(!isWasmInitialized) {
11927                         throw new Error("initializeWasm() must be awaited first!");
11928                 }
11929                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
11930                 // debug statements here
11931         }
11932         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
11933         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
11934                 if(!isWasmInitialized) {
11935                         throw new Error("initializeWasm() must be awaited first!");
11936                 }
11937                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
11938                 // debug statements here
11939         }
11940         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
11941         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
11942                 if(!isWasmInitialized) {
11943                         throw new Error("initializeWasm() must be awaited first!");
11944                 }
11945                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
11946                 return nativeResponseValue;
11947         }
11948         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
11949         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
11950                 if(!isWasmInitialized) {
11951                         throw new Error("initializeWasm() must be awaited first!");
11952                 }
11953                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
11954                 // debug statements here
11955         }
11956         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
11957         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
11958                 if(!isWasmInitialized) {
11959                         throw new Error("initializeWasm() must be awaited first!");
11960                 }
11961                 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
11962                 return nativeResponseValue;
11963         }
11964         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
11965         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
11966                 if(!isWasmInitialized) {
11967                         throw new Error("initializeWasm() must be awaited first!");
11968                 }
11969                 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
11970                 // debug statements here
11971         }
11972         // 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);
11973         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 {
11974                 if(!isWasmInitialized) {
11975                         throw new Error("initializeWasm() must be awaited first!");
11976                 }
11977                 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);
11978                 return nativeResponseValue;
11979         }
11980         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
11981         export function CommitmentUpdate_clone(orig: number): number {
11982                 if(!isWasmInitialized) {
11983                         throw new Error("initializeWasm() must be awaited first!");
11984                 }
11985                 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
11986                 return nativeResponseValue;
11987         }
11988         // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
11989         export function HTLCFailChannelUpdate_free(this_ptr: number): void {
11990                 if(!isWasmInitialized) {
11991                         throw new Error("initializeWasm() must be awaited first!");
11992                 }
11993                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
11994                 // debug statements here
11995         }
11996         // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
11997         export function HTLCFailChannelUpdate_clone(orig: number): number {
11998                 if(!isWasmInitialized) {
11999                         throw new Error("initializeWasm() must be awaited first!");
12000                 }
12001                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
12002                 return nativeResponseValue;
12003         }
12004         // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_channel_update_message(struct LDKChannelUpdate msg);
12005         export function HTLCFailChannelUpdate_channel_update_message(msg: number): number {
12006                 if(!isWasmInitialized) {
12007                         throw new Error("initializeWasm() must be awaited first!");
12008                 }
12009                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_channel_update_message(msg);
12010                 return nativeResponseValue;
12011         }
12012         // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
12013         export function HTLCFailChannelUpdate_channel_closed(short_channel_id: number, is_permanent: boolean): number {
12014                 if(!isWasmInitialized) {
12015                         throw new Error("initializeWasm() must be awaited first!");
12016                 }
12017                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_channel_closed(short_channel_id, is_permanent);
12018                 return nativeResponseValue;
12019         }
12020         // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
12021         export function HTLCFailChannelUpdate_node_failure(node_id: Uint8Array, is_permanent: boolean): number {
12022                 if(!isWasmInitialized) {
12023                         throw new Error("initializeWasm() must be awaited first!");
12024                 }
12025                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_node_failure(encodeArray(node_id), is_permanent);
12026                 return nativeResponseValue;
12027         }
12028         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
12029         export function ChannelMessageHandler_free(this_ptr: number): void {
12030                 if(!isWasmInitialized) {
12031                         throw new Error("initializeWasm() must be awaited first!");
12032                 }
12033                 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
12034                 // debug statements here
12035         }
12036         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
12037         export function RoutingMessageHandler_free(this_ptr: number): void {
12038                 if(!isWasmInitialized) {
12039                         throw new Error("initializeWasm() must be awaited first!");
12040                 }
12041                 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
12042                 // debug statements here
12043         }
12044         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
12045         export function AcceptChannel_write(obj: number): Uint8Array {
12046                 if(!isWasmInitialized) {
12047                         throw new Error("initializeWasm() must be awaited first!");
12048                 }
12049                 const nativeResponseValue = wasm.AcceptChannel_write(obj);
12050                 return decodeArray(nativeResponseValue);
12051         }
12052         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
12053         export function AcceptChannel_read(ser: Uint8Array): number {
12054                 if(!isWasmInitialized) {
12055                         throw new Error("initializeWasm() must be awaited first!");
12056                 }
12057                 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
12058                 return nativeResponseValue;
12059         }
12060         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
12061         export function AnnouncementSignatures_write(obj: number): Uint8Array {
12062                 if(!isWasmInitialized) {
12063                         throw new Error("initializeWasm() must be awaited first!");
12064                 }
12065                 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
12066                 return decodeArray(nativeResponseValue);
12067         }
12068         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
12069         export function AnnouncementSignatures_read(ser: Uint8Array): number {
12070                 if(!isWasmInitialized) {
12071                         throw new Error("initializeWasm() must be awaited first!");
12072                 }
12073                 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
12074                 return nativeResponseValue;
12075         }
12076         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
12077         export function ChannelReestablish_write(obj: number): Uint8Array {
12078                 if(!isWasmInitialized) {
12079                         throw new Error("initializeWasm() must be awaited first!");
12080                 }
12081                 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
12082                 return decodeArray(nativeResponseValue);
12083         }
12084         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
12085         export function ChannelReestablish_read(ser: Uint8Array): number {
12086                 if(!isWasmInitialized) {
12087                         throw new Error("initializeWasm() must be awaited first!");
12088                 }
12089                 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
12090                 return nativeResponseValue;
12091         }
12092         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
12093         export function ClosingSigned_write(obj: number): Uint8Array {
12094                 if(!isWasmInitialized) {
12095                         throw new Error("initializeWasm() must be awaited first!");
12096                 }
12097                 const nativeResponseValue = wasm.ClosingSigned_write(obj);
12098                 return decodeArray(nativeResponseValue);
12099         }
12100         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
12101         export function ClosingSigned_read(ser: Uint8Array): number {
12102                 if(!isWasmInitialized) {
12103                         throw new Error("initializeWasm() must be awaited first!");
12104                 }
12105                 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
12106                 return nativeResponseValue;
12107         }
12108         // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
12109         export function ClosingSignedFeeRange_write(obj: number): Uint8Array {
12110                 if(!isWasmInitialized) {
12111                         throw new Error("initializeWasm() must be awaited first!");
12112                 }
12113                 const nativeResponseValue = wasm.ClosingSignedFeeRange_write(obj);
12114                 return decodeArray(nativeResponseValue);
12115         }
12116         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
12117         export function ClosingSignedFeeRange_read(ser: Uint8Array): number {
12118                 if(!isWasmInitialized) {
12119                         throw new Error("initializeWasm() must be awaited first!");
12120                 }
12121                 const nativeResponseValue = wasm.ClosingSignedFeeRange_read(encodeArray(ser));
12122                 return nativeResponseValue;
12123         }
12124         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
12125         export function CommitmentSigned_write(obj: number): Uint8Array {
12126                 if(!isWasmInitialized) {
12127                         throw new Error("initializeWasm() must be awaited first!");
12128                 }
12129                 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
12130                 return decodeArray(nativeResponseValue);
12131         }
12132         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
12133         export function CommitmentSigned_read(ser: Uint8Array): number {
12134                 if(!isWasmInitialized) {
12135                         throw new Error("initializeWasm() must be awaited first!");
12136                 }
12137                 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
12138                 return nativeResponseValue;
12139         }
12140         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
12141         export function FundingCreated_write(obj: number): Uint8Array {
12142                 if(!isWasmInitialized) {
12143                         throw new Error("initializeWasm() must be awaited first!");
12144                 }
12145                 const nativeResponseValue = wasm.FundingCreated_write(obj);
12146                 return decodeArray(nativeResponseValue);
12147         }
12148         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
12149         export function FundingCreated_read(ser: Uint8Array): number {
12150                 if(!isWasmInitialized) {
12151                         throw new Error("initializeWasm() must be awaited first!");
12152                 }
12153                 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
12154                 return nativeResponseValue;
12155         }
12156         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
12157         export function FundingSigned_write(obj: number): Uint8Array {
12158                 if(!isWasmInitialized) {
12159                         throw new Error("initializeWasm() must be awaited first!");
12160                 }
12161                 const nativeResponseValue = wasm.FundingSigned_write(obj);
12162                 return decodeArray(nativeResponseValue);
12163         }
12164         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
12165         export function FundingSigned_read(ser: Uint8Array): number {
12166                 if(!isWasmInitialized) {
12167                         throw new Error("initializeWasm() must be awaited first!");
12168                 }
12169                 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
12170                 return nativeResponseValue;
12171         }
12172         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
12173         export function FundingLocked_write(obj: number): Uint8Array {
12174                 if(!isWasmInitialized) {
12175                         throw new Error("initializeWasm() must be awaited first!");
12176                 }
12177                 const nativeResponseValue = wasm.FundingLocked_write(obj);
12178                 return decodeArray(nativeResponseValue);
12179         }
12180         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
12181         export function FundingLocked_read(ser: Uint8Array): number {
12182                 if(!isWasmInitialized) {
12183                         throw new Error("initializeWasm() must be awaited first!");
12184                 }
12185                 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
12186                 return nativeResponseValue;
12187         }
12188         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
12189         export function Init_write(obj: number): Uint8Array {
12190                 if(!isWasmInitialized) {
12191                         throw new Error("initializeWasm() must be awaited first!");
12192                 }
12193                 const nativeResponseValue = wasm.Init_write(obj);
12194                 return decodeArray(nativeResponseValue);
12195         }
12196         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
12197         export function Init_read(ser: Uint8Array): number {
12198                 if(!isWasmInitialized) {
12199                         throw new Error("initializeWasm() must be awaited first!");
12200                 }
12201                 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
12202                 return nativeResponseValue;
12203         }
12204         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
12205         export function OpenChannel_write(obj: number): Uint8Array {
12206                 if(!isWasmInitialized) {
12207                         throw new Error("initializeWasm() must be awaited first!");
12208                 }
12209                 const nativeResponseValue = wasm.OpenChannel_write(obj);
12210                 return decodeArray(nativeResponseValue);
12211         }
12212         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
12213         export function OpenChannel_read(ser: Uint8Array): number {
12214                 if(!isWasmInitialized) {
12215                         throw new Error("initializeWasm() must be awaited first!");
12216                 }
12217                 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
12218                 return nativeResponseValue;
12219         }
12220         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
12221         export function RevokeAndACK_write(obj: number): Uint8Array {
12222                 if(!isWasmInitialized) {
12223                         throw new Error("initializeWasm() must be awaited first!");
12224                 }
12225                 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
12226                 return decodeArray(nativeResponseValue);
12227         }
12228         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
12229         export function RevokeAndACK_read(ser: Uint8Array): number {
12230                 if(!isWasmInitialized) {
12231                         throw new Error("initializeWasm() must be awaited first!");
12232                 }
12233                 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
12234                 return nativeResponseValue;
12235         }
12236         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
12237         export function Shutdown_write(obj: number): Uint8Array {
12238                 if(!isWasmInitialized) {
12239                         throw new Error("initializeWasm() must be awaited first!");
12240                 }
12241                 const nativeResponseValue = wasm.Shutdown_write(obj);
12242                 return decodeArray(nativeResponseValue);
12243         }
12244         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
12245         export function Shutdown_read(ser: Uint8Array): number {
12246                 if(!isWasmInitialized) {
12247                         throw new Error("initializeWasm() must be awaited first!");
12248                 }
12249                 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
12250                 return nativeResponseValue;
12251         }
12252         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
12253         export function UpdateFailHTLC_write(obj: number): Uint8Array {
12254                 if(!isWasmInitialized) {
12255                         throw new Error("initializeWasm() must be awaited first!");
12256                 }
12257                 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
12258                 return decodeArray(nativeResponseValue);
12259         }
12260         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
12261         export function UpdateFailHTLC_read(ser: Uint8Array): number {
12262                 if(!isWasmInitialized) {
12263                         throw new Error("initializeWasm() must be awaited first!");
12264                 }
12265                 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
12266                 return nativeResponseValue;
12267         }
12268         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
12269         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
12270                 if(!isWasmInitialized) {
12271                         throw new Error("initializeWasm() must be awaited first!");
12272                 }
12273                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
12274                 return decodeArray(nativeResponseValue);
12275         }
12276         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
12277         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
12278                 if(!isWasmInitialized) {
12279                         throw new Error("initializeWasm() must be awaited first!");
12280                 }
12281                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
12282                 return nativeResponseValue;
12283         }
12284         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
12285         export function UpdateFee_write(obj: number): Uint8Array {
12286                 if(!isWasmInitialized) {
12287                         throw new Error("initializeWasm() must be awaited first!");
12288                 }
12289                 const nativeResponseValue = wasm.UpdateFee_write(obj);
12290                 return decodeArray(nativeResponseValue);
12291         }
12292         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
12293         export function UpdateFee_read(ser: Uint8Array): number {
12294                 if(!isWasmInitialized) {
12295                         throw new Error("initializeWasm() must be awaited first!");
12296                 }
12297                 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
12298                 return nativeResponseValue;
12299         }
12300         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
12301         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
12302                 if(!isWasmInitialized) {
12303                         throw new Error("initializeWasm() must be awaited first!");
12304                 }
12305                 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
12306                 return decodeArray(nativeResponseValue);
12307         }
12308         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
12309         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
12310                 if(!isWasmInitialized) {
12311                         throw new Error("initializeWasm() must be awaited first!");
12312                 }
12313                 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
12314                 return nativeResponseValue;
12315         }
12316         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
12317         export function UpdateAddHTLC_write(obj: number): Uint8Array {
12318                 if(!isWasmInitialized) {
12319                         throw new Error("initializeWasm() must be awaited first!");
12320                 }
12321                 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
12322                 return decodeArray(nativeResponseValue);
12323         }
12324         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
12325         export function UpdateAddHTLC_read(ser: Uint8Array): number {
12326                 if(!isWasmInitialized) {
12327                         throw new Error("initializeWasm() must be awaited first!");
12328                 }
12329                 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
12330                 return nativeResponseValue;
12331         }
12332         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
12333         export function Ping_write(obj: number): Uint8Array {
12334                 if(!isWasmInitialized) {
12335                         throw new Error("initializeWasm() must be awaited first!");
12336                 }
12337                 const nativeResponseValue = wasm.Ping_write(obj);
12338                 return decodeArray(nativeResponseValue);
12339         }
12340         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
12341         export function Ping_read(ser: Uint8Array): number {
12342                 if(!isWasmInitialized) {
12343                         throw new Error("initializeWasm() must be awaited first!");
12344                 }
12345                 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
12346                 return nativeResponseValue;
12347         }
12348         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
12349         export function Pong_write(obj: number): Uint8Array {
12350                 if(!isWasmInitialized) {
12351                         throw new Error("initializeWasm() must be awaited first!");
12352                 }
12353                 const nativeResponseValue = wasm.Pong_write(obj);
12354                 return decodeArray(nativeResponseValue);
12355         }
12356         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
12357         export function Pong_read(ser: Uint8Array): number {
12358                 if(!isWasmInitialized) {
12359                         throw new Error("initializeWasm() must be awaited first!");
12360                 }
12361                 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
12362                 return nativeResponseValue;
12363         }
12364         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
12365         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
12366                 if(!isWasmInitialized) {
12367                         throw new Error("initializeWasm() must be awaited first!");
12368                 }
12369                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
12370                 return decodeArray(nativeResponseValue);
12371         }
12372         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
12373         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
12374                 if(!isWasmInitialized) {
12375                         throw new Error("initializeWasm() must be awaited first!");
12376                 }
12377                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
12378                 return nativeResponseValue;
12379         }
12380         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
12381         export function ChannelAnnouncement_write(obj: number): Uint8Array {
12382                 if(!isWasmInitialized) {
12383                         throw new Error("initializeWasm() must be awaited first!");
12384                 }
12385                 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
12386                 return decodeArray(nativeResponseValue);
12387         }
12388         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
12389         export function ChannelAnnouncement_read(ser: Uint8Array): number {
12390                 if(!isWasmInitialized) {
12391                         throw new Error("initializeWasm() must be awaited first!");
12392                 }
12393                 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
12394                 return nativeResponseValue;
12395         }
12396         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
12397         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
12398                 if(!isWasmInitialized) {
12399                         throw new Error("initializeWasm() must be awaited first!");
12400                 }
12401                 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
12402                 return decodeArray(nativeResponseValue);
12403         }
12404         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
12405         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
12406                 if(!isWasmInitialized) {
12407                         throw new Error("initializeWasm() must be awaited first!");
12408                 }
12409                 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
12410                 return nativeResponseValue;
12411         }
12412         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
12413         export function ChannelUpdate_write(obj: number): Uint8Array {
12414                 if(!isWasmInitialized) {
12415                         throw new Error("initializeWasm() must be awaited first!");
12416                 }
12417                 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
12418                 return decodeArray(nativeResponseValue);
12419         }
12420         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
12421         export function ChannelUpdate_read(ser: Uint8Array): number {
12422                 if(!isWasmInitialized) {
12423                         throw new Error("initializeWasm() must be awaited first!");
12424                 }
12425                 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
12426                 return nativeResponseValue;
12427         }
12428         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
12429         export function ErrorMessage_write(obj: number): Uint8Array {
12430                 if(!isWasmInitialized) {
12431                         throw new Error("initializeWasm() must be awaited first!");
12432                 }
12433                 const nativeResponseValue = wasm.ErrorMessage_write(obj);
12434                 return decodeArray(nativeResponseValue);
12435         }
12436         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
12437         export function ErrorMessage_read(ser: Uint8Array): number {
12438                 if(!isWasmInitialized) {
12439                         throw new Error("initializeWasm() must be awaited first!");
12440                 }
12441                 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
12442                 return nativeResponseValue;
12443         }
12444         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
12445         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
12446                 if(!isWasmInitialized) {
12447                         throw new Error("initializeWasm() must be awaited first!");
12448                 }
12449                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
12450                 return decodeArray(nativeResponseValue);
12451         }
12452         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
12453         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
12454                 if(!isWasmInitialized) {
12455                         throw new Error("initializeWasm() must be awaited first!");
12456                 }
12457                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
12458                 return nativeResponseValue;
12459         }
12460         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
12461         export function NodeAnnouncement_write(obj: number): Uint8Array {
12462                 if(!isWasmInitialized) {
12463                         throw new Error("initializeWasm() must be awaited first!");
12464                 }
12465                 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
12466                 return decodeArray(nativeResponseValue);
12467         }
12468         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
12469         export function NodeAnnouncement_read(ser: Uint8Array): number {
12470                 if(!isWasmInitialized) {
12471                         throw new Error("initializeWasm() must be awaited first!");
12472                 }
12473                 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
12474                 return nativeResponseValue;
12475         }
12476         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
12477         export function QueryShortChannelIds_read(ser: Uint8Array): number {
12478                 if(!isWasmInitialized) {
12479                         throw new Error("initializeWasm() must be awaited first!");
12480                 }
12481                 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
12482                 return nativeResponseValue;
12483         }
12484         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
12485         export function QueryShortChannelIds_write(obj: number): Uint8Array {
12486                 if(!isWasmInitialized) {
12487                         throw new Error("initializeWasm() must be awaited first!");
12488                 }
12489                 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
12490                 return decodeArray(nativeResponseValue);
12491         }
12492         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
12493         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
12494                 if(!isWasmInitialized) {
12495                         throw new Error("initializeWasm() must be awaited first!");
12496                 }
12497                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
12498                 return nativeResponseValue;
12499         }
12500         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
12501         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
12502                 if(!isWasmInitialized) {
12503                         throw new Error("initializeWasm() must be awaited first!");
12504                 }
12505                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
12506                 return decodeArray(nativeResponseValue);
12507         }
12508         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
12509         export function QueryChannelRange_end_blocknum(this_arg: number): number {
12510                 if(!isWasmInitialized) {
12511                         throw new Error("initializeWasm() must be awaited first!");
12512                 }
12513                 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
12514                 return nativeResponseValue;
12515         }
12516         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
12517         export function QueryChannelRange_read(ser: Uint8Array): number {
12518                 if(!isWasmInitialized) {
12519                         throw new Error("initializeWasm() must be awaited first!");
12520                 }
12521                 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
12522                 return nativeResponseValue;
12523         }
12524         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
12525         export function QueryChannelRange_write(obj: number): Uint8Array {
12526                 if(!isWasmInitialized) {
12527                         throw new Error("initializeWasm() must be awaited first!");
12528                 }
12529                 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
12530                 return decodeArray(nativeResponseValue);
12531         }
12532         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
12533         export function ReplyChannelRange_read(ser: Uint8Array): number {
12534                 if(!isWasmInitialized) {
12535                         throw new Error("initializeWasm() must be awaited first!");
12536                 }
12537                 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
12538                 return nativeResponseValue;
12539         }
12540         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
12541         export function ReplyChannelRange_write(obj: number): Uint8Array {
12542                 if(!isWasmInitialized) {
12543                         throw new Error("initializeWasm() must be awaited first!");
12544                 }
12545                 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
12546                 return decodeArray(nativeResponseValue);
12547         }
12548         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
12549         export function GossipTimestampFilter_read(ser: Uint8Array): number {
12550                 if(!isWasmInitialized) {
12551                         throw new Error("initializeWasm() must be awaited first!");
12552                 }
12553                 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
12554                 return nativeResponseValue;
12555         }
12556         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
12557         export function GossipTimestampFilter_write(obj: number): Uint8Array {
12558                 if(!isWasmInitialized) {
12559                         throw new Error("initializeWasm() must be awaited first!");
12560                 }
12561                 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
12562                 return decodeArray(nativeResponseValue);
12563         }
12564         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
12565         export function IgnoringMessageHandler_free(this_obj: number): void {
12566                 if(!isWasmInitialized) {
12567                         throw new Error("initializeWasm() must be awaited first!");
12568                 }
12569                 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
12570                 // debug statements here
12571         }
12572         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
12573         export function IgnoringMessageHandler_new(): number {
12574                 if(!isWasmInitialized) {
12575                         throw new Error("initializeWasm() must be awaited first!");
12576                 }
12577                 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
12578                 return nativeResponseValue;
12579         }
12580         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
12581         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
12582                 if(!isWasmInitialized) {
12583                         throw new Error("initializeWasm() must be awaited first!");
12584                 }
12585                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
12586                 return nativeResponseValue;
12587         }
12588         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
12589         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
12590                 if(!isWasmInitialized) {
12591                         throw new Error("initializeWasm() must be awaited first!");
12592                 }
12593                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
12594                 return nativeResponseValue;
12595         }
12596         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
12597         export function ErroringMessageHandler_free(this_obj: number): void {
12598                 if(!isWasmInitialized) {
12599                         throw new Error("initializeWasm() must be awaited first!");
12600                 }
12601                 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
12602                 // debug statements here
12603         }
12604         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
12605         export function ErroringMessageHandler_new(): number {
12606                 if(!isWasmInitialized) {
12607                         throw new Error("initializeWasm() must be awaited first!");
12608                 }
12609                 const nativeResponseValue = wasm.ErroringMessageHandler_new();
12610                 return nativeResponseValue;
12611         }
12612         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
12613         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
12614                 if(!isWasmInitialized) {
12615                         throw new Error("initializeWasm() must be awaited first!");
12616                 }
12617                 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
12618                 return nativeResponseValue;
12619         }
12620         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
12621         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
12622                 if(!isWasmInitialized) {
12623                         throw new Error("initializeWasm() must be awaited first!");
12624                 }
12625                 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
12626                 return nativeResponseValue;
12627         }
12628         // void MessageHandler_free(struct LDKMessageHandler this_obj);
12629         export function MessageHandler_free(this_obj: number): void {
12630                 if(!isWasmInitialized) {
12631                         throw new Error("initializeWasm() must be awaited first!");
12632                 }
12633                 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
12634                 // debug statements here
12635         }
12636         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
12637         export function MessageHandler_get_chan_handler(this_ptr: number): number {
12638                 if(!isWasmInitialized) {
12639                         throw new Error("initializeWasm() must be awaited first!");
12640                 }
12641                 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
12642                 return nativeResponseValue;
12643         }
12644         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
12645         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
12646                 if(!isWasmInitialized) {
12647                         throw new Error("initializeWasm() must be awaited first!");
12648                 }
12649                 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
12650                 // debug statements here
12651         }
12652         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
12653         export function MessageHandler_get_route_handler(this_ptr: number): number {
12654                 if(!isWasmInitialized) {
12655                         throw new Error("initializeWasm() must be awaited first!");
12656                 }
12657                 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
12658                 return nativeResponseValue;
12659         }
12660         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
12661         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
12662                 if(!isWasmInitialized) {
12663                         throw new Error("initializeWasm() must be awaited first!");
12664                 }
12665                 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
12666                 // debug statements here
12667         }
12668         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
12669         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
12670                 if(!isWasmInitialized) {
12671                         throw new Error("initializeWasm() must be awaited first!");
12672                 }
12673                 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
12674                 return nativeResponseValue;
12675         }
12676         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
12677         export function SocketDescriptor_clone(orig: number): number {
12678                 if(!isWasmInitialized) {
12679                         throw new Error("initializeWasm() must be awaited first!");
12680                 }
12681                 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
12682                 return nativeResponseValue;
12683         }
12684         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
12685         export function SocketDescriptor_free(this_ptr: number): void {
12686                 if(!isWasmInitialized) {
12687                         throw new Error("initializeWasm() must be awaited first!");
12688                 }
12689                 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
12690                 // debug statements here
12691         }
12692         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
12693         export function PeerHandleError_free(this_obj: number): void {
12694                 if(!isWasmInitialized) {
12695                         throw new Error("initializeWasm() must be awaited first!");
12696                 }
12697                 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
12698                 // debug statements here
12699         }
12700         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
12701         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
12702                 if(!isWasmInitialized) {
12703                         throw new Error("initializeWasm() must be awaited first!");
12704                 }
12705                 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
12706                 return nativeResponseValue;
12707         }
12708         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
12709         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
12710                 if(!isWasmInitialized) {
12711                         throw new Error("initializeWasm() must be awaited first!");
12712                 }
12713                 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
12714                 // debug statements here
12715         }
12716         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
12717         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
12718                 if(!isWasmInitialized) {
12719                         throw new Error("initializeWasm() must be awaited first!");
12720                 }
12721                 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
12722                 return nativeResponseValue;
12723         }
12724         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
12725         export function PeerHandleError_clone(orig: number): number {
12726                 if(!isWasmInitialized) {
12727                         throw new Error("initializeWasm() must be awaited first!");
12728                 }
12729                 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
12730                 return nativeResponseValue;
12731         }
12732         // void PeerManager_free(struct LDKPeerManager this_obj);
12733         export function PeerManager_free(this_obj: number): void {
12734                 if(!isWasmInitialized) {
12735                         throw new Error("initializeWasm() must be awaited first!");
12736                 }
12737                 const nativeResponseValue = wasm.PeerManager_free(this_obj);
12738                 // debug statements here
12739         }
12740         // 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);
12741         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
12742                 if(!isWasmInitialized) {
12743                         throw new Error("initializeWasm() must be awaited first!");
12744                 }
12745                 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
12746                 return nativeResponseValue;
12747         }
12748         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
12749         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
12750                 if(!isWasmInitialized) {
12751                         throw new Error("initializeWasm() must be awaited first!");
12752                 }
12753                 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
12754                 return nativeResponseValue;
12755         }
12756         // 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);
12757         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
12758                 if(!isWasmInitialized) {
12759                         throw new Error("initializeWasm() must be awaited first!");
12760                 }
12761                 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
12762                 return nativeResponseValue;
12763         }
12764         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
12765         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
12766                 if(!isWasmInitialized) {
12767                         throw new Error("initializeWasm() must be awaited first!");
12768                 }
12769                 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
12770                 return nativeResponseValue;
12771         }
12772         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
12773         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
12774                 if(!isWasmInitialized) {
12775                         throw new Error("initializeWasm() must be awaited first!");
12776                 }
12777                 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
12778                 return nativeResponseValue;
12779         }
12780         // 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);
12781         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
12782                 if(!isWasmInitialized) {
12783                         throw new Error("initializeWasm() must be awaited first!");
12784                 }
12785                 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
12786                 return nativeResponseValue;
12787         }
12788         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
12789         export function PeerManager_process_events(this_arg: number): void {
12790                 if(!isWasmInitialized) {
12791                         throw new Error("initializeWasm() must be awaited first!");
12792                 }
12793                 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
12794                 // debug statements here
12795         }
12796         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
12797         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
12798                 if(!isWasmInitialized) {
12799                         throw new Error("initializeWasm() must be awaited first!");
12800                 }
12801                 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
12802                 // debug statements here
12803         }
12804         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
12805         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
12806                 if(!isWasmInitialized) {
12807                         throw new Error("initializeWasm() must be awaited first!");
12808                 }
12809                 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
12810                 // debug statements here
12811         }
12812         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
12813         export function PeerManager_timer_tick_occurred(this_arg: number): void {
12814                 if(!isWasmInitialized) {
12815                         throw new Error("initializeWasm() must be awaited first!");
12816                 }
12817                 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
12818                 // debug statements here
12819         }
12820         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
12821         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
12822                 if(!isWasmInitialized) {
12823                         throw new Error("initializeWasm() must be awaited first!");
12824                 }
12825                 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
12826                 return decodeArray(nativeResponseValue);
12827         }
12828         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
12829         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
12830                 if(!isWasmInitialized) {
12831                         throw new Error("initializeWasm() must be awaited first!");
12832                 }
12833                 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
12834                 return nativeResponseValue;
12835         }
12836         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
12837         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
12838                 if(!isWasmInitialized) {
12839                         throw new Error("initializeWasm() must be awaited first!");
12840                 }
12841                 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
12842                 return nativeResponseValue;
12843         }
12844         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
12845         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
12846                 if(!isWasmInitialized) {
12847                         throw new Error("initializeWasm() must be awaited first!");
12848                 }
12849                 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
12850                 return nativeResponseValue;
12851         }
12852         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
12853         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
12854                 if(!isWasmInitialized) {
12855                         throw new Error("initializeWasm() must be awaited first!");
12856                 }
12857                 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
12858                 return nativeResponseValue;
12859         }
12860         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
12861         export function TxCreationKeys_free(this_obj: number): void {
12862                 if(!isWasmInitialized) {
12863                         throw new Error("initializeWasm() must be awaited first!");
12864                 }
12865                 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
12866                 // debug statements here
12867         }
12868         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12869         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
12870                 if(!isWasmInitialized) {
12871                         throw new Error("initializeWasm() must be awaited first!");
12872                 }
12873                 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
12874                 return decodeArray(nativeResponseValue);
12875         }
12876         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12877         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
12878                 if(!isWasmInitialized) {
12879                         throw new Error("initializeWasm() must be awaited first!");
12880                 }
12881                 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
12882                 // debug statements here
12883         }
12884         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12885         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
12886                 if(!isWasmInitialized) {
12887                         throw new Error("initializeWasm() must be awaited first!");
12888                 }
12889                 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
12890                 return decodeArray(nativeResponseValue);
12891         }
12892         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12893         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
12894                 if(!isWasmInitialized) {
12895                         throw new Error("initializeWasm() must be awaited first!");
12896                 }
12897                 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
12898                 // debug statements here
12899         }
12900         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12901         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
12902                 if(!isWasmInitialized) {
12903                         throw new Error("initializeWasm() must be awaited first!");
12904                 }
12905                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
12906                 return decodeArray(nativeResponseValue);
12907         }
12908         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12909         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
12910                 if(!isWasmInitialized) {
12911                         throw new Error("initializeWasm() must be awaited first!");
12912                 }
12913                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
12914                 // debug statements here
12915         }
12916         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12917         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
12918                 if(!isWasmInitialized) {
12919                         throw new Error("initializeWasm() must be awaited first!");
12920                 }
12921                 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
12922                 return decodeArray(nativeResponseValue);
12923         }
12924         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12925         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
12926                 if(!isWasmInitialized) {
12927                         throw new Error("initializeWasm() must be awaited first!");
12928                 }
12929                 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
12930                 // debug statements here
12931         }
12932         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12933         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
12934                 if(!isWasmInitialized) {
12935                         throw new Error("initializeWasm() must be awaited first!");
12936                 }
12937                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
12938                 return decodeArray(nativeResponseValue);
12939         }
12940         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12941         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
12942                 if(!isWasmInitialized) {
12943                         throw new Error("initializeWasm() must be awaited first!");
12944                 }
12945                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
12946                 // debug statements here
12947         }
12948         // 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);
12949         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 {
12950                 if(!isWasmInitialized) {
12951                         throw new Error("initializeWasm() must be awaited first!");
12952                 }
12953                 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));
12954                 return nativeResponseValue;
12955         }
12956         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
12957         export function TxCreationKeys_clone(orig: number): number {
12958                 if(!isWasmInitialized) {
12959                         throw new Error("initializeWasm() must be awaited first!");
12960                 }
12961                 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
12962                 return nativeResponseValue;
12963         }
12964         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
12965         export function TxCreationKeys_write(obj: number): Uint8Array {
12966                 if(!isWasmInitialized) {
12967                         throw new Error("initializeWasm() must be awaited first!");
12968                 }
12969                 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
12970                 return decodeArray(nativeResponseValue);
12971         }
12972         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
12973         export function TxCreationKeys_read(ser: Uint8Array): number {
12974                 if(!isWasmInitialized) {
12975                         throw new Error("initializeWasm() must be awaited first!");
12976                 }
12977                 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
12978                 return nativeResponseValue;
12979         }
12980         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
12981         export function ChannelPublicKeys_free(this_obj: number): void {
12982                 if(!isWasmInitialized) {
12983                         throw new Error("initializeWasm() must be awaited first!");
12984                 }
12985                 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
12986                 // debug statements here
12987         }
12988         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
12989         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
12990                 if(!isWasmInitialized) {
12991                         throw new Error("initializeWasm() must be awaited first!");
12992                 }
12993                 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
12994                 return decodeArray(nativeResponseValue);
12995         }
12996         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12997         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
12998                 if(!isWasmInitialized) {
12999                         throw new Error("initializeWasm() must be awaited first!");
13000                 }
13001                 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
13002                 // debug statements here
13003         }
13004         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
13005         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
13006                 if(!isWasmInitialized) {
13007                         throw new Error("initializeWasm() must be awaited first!");
13008                 }
13009                 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
13010                 return decodeArray(nativeResponseValue);
13011         }
13012         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13013         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
13014                 if(!isWasmInitialized) {
13015                         throw new Error("initializeWasm() must be awaited first!");
13016                 }
13017                 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
13018                 // debug statements here
13019         }
13020         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
13021         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
13022                 if(!isWasmInitialized) {
13023                         throw new Error("initializeWasm() must be awaited first!");
13024                 }
13025                 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
13026                 return decodeArray(nativeResponseValue);
13027         }
13028         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13029         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
13030                 if(!isWasmInitialized) {
13031                         throw new Error("initializeWasm() must be awaited first!");
13032                 }
13033                 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
13034                 // debug statements here
13035         }
13036         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
13037         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
13038                 if(!isWasmInitialized) {
13039                         throw new Error("initializeWasm() must be awaited first!");
13040                 }
13041                 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
13042                 return decodeArray(nativeResponseValue);
13043         }
13044         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13045         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
13046                 if(!isWasmInitialized) {
13047                         throw new Error("initializeWasm() must be awaited first!");
13048                 }
13049                 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
13050                 // debug statements here
13051         }
13052         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
13053         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
13054                 if(!isWasmInitialized) {
13055                         throw new Error("initializeWasm() must be awaited first!");
13056                 }
13057                 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
13058                 return decodeArray(nativeResponseValue);
13059         }
13060         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13061         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
13062                 if(!isWasmInitialized) {
13063                         throw new Error("initializeWasm() must be awaited first!");
13064                 }
13065                 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
13066                 // debug statements here
13067         }
13068         // 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);
13069         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 {
13070                 if(!isWasmInitialized) {
13071                         throw new Error("initializeWasm() must be awaited first!");
13072                 }
13073                 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));
13074                 return nativeResponseValue;
13075         }
13076         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
13077         export function ChannelPublicKeys_clone(orig: number): number {
13078                 if(!isWasmInitialized) {
13079                         throw new Error("initializeWasm() must be awaited first!");
13080                 }
13081                 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
13082                 return nativeResponseValue;
13083         }
13084         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
13085         export function ChannelPublicKeys_write(obj: number): Uint8Array {
13086                 if(!isWasmInitialized) {
13087                         throw new Error("initializeWasm() must be awaited first!");
13088                 }
13089                 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
13090                 return decodeArray(nativeResponseValue);
13091         }
13092         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
13093         export function ChannelPublicKeys_read(ser: Uint8Array): number {
13094                 if(!isWasmInitialized) {
13095                         throw new Error("initializeWasm() must be awaited first!");
13096                 }
13097                 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
13098                 return nativeResponseValue;
13099         }
13100         // 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);
13101         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 {
13102                 if(!isWasmInitialized) {
13103                         throw new Error("initializeWasm() must be awaited first!");
13104                 }
13105                 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));
13106                 return nativeResponseValue;
13107         }
13108         // 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);
13109         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
13110                 if(!isWasmInitialized) {
13111                         throw new Error("initializeWasm() must be awaited first!");
13112                 }
13113                 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
13114                 return nativeResponseValue;
13115         }
13116         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
13117         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
13118                 if(!isWasmInitialized) {
13119                         throw new Error("initializeWasm() must be awaited first!");
13120                 }
13121                 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
13122                 return decodeArray(nativeResponseValue);
13123         }
13124         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
13125         export function HTLCOutputInCommitment_free(this_obj: number): void {
13126                 if(!isWasmInitialized) {
13127                         throw new Error("initializeWasm() must be awaited first!");
13128                 }
13129                 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
13130                 // debug statements here
13131         }
13132         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
13133         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
13134                 if(!isWasmInitialized) {
13135                         throw new Error("initializeWasm() must be awaited first!");
13136                 }
13137                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
13138                 return nativeResponseValue;
13139         }
13140         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
13141         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
13142                 if(!isWasmInitialized) {
13143                         throw new Error("initializeWasm() must be awaited first!");
13144                 }
13145                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
13146                 // debug statements here
13147         }
13148         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
13149         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
13150                 if(!isWasmInitialized) {
13151                         throw new Error("initializeWasm() must be awaited first!");
13152                 }
13153                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
13154                 return nativeResponseValue;
13155         }
13156         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
13157         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
13158                 if(!isWasmInitialized) {
13159                         throw new Error("initializeWasm() must be awaited first!");
13160                 }
13161                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
13162                 // debug statements here
13163         }
13164         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
13165         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
13166                 if(!isWasmInitialized) {
13167                         throw new Error("initializeWasm() must be awaited first!");
13168                 }
13169                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
13170                 return nativeResponseValue;
13171         }
13172         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
13173         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
13174                 if(!isWasmInitialized) {
13175                         throw new Error("initializeWasm() must be awaited first!");
13176                 }
13177                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
13178                 // debug statements here
13179         }
13180         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
13181         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
13182                 if(!isWasmInitialized) {
13183                         throw new Error("initializeWasm() must be awaited first!");
13184                 }
13185                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
13186                 return decodeArray(nativeResponseValue);
13187         }
13188         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13189         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
13190                 if(!isWasmInitialized) {
13191                         throw new Error("initializeWasm() must be awaited first!");
13192                 }
13193                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
13194                 // debug statements here
13195         }
13196         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
13197         export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
13198                 if(!isWasmInitialized) {
13199                         throw new Error("initializeWasm() must be awaited first!");
13200                 }
13201                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
13202                 return nativeResponseValue;
13203         }
13204         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
13205         export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
13206                 if(!isWasmInitialized) {
13207                         throw new Error("initializeWasm() must be awaited first!");
13208                 }
13209                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
13210                 // debug statements here
13211         }
13212         // 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);
13213         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 {
13214                 if(!isWasmInitialized) {
13215                         throw new Error("initializeWasm() must be awaited first!");
13216                 }
13217                 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
13218                 return nativeResponseValue;
13219         }
13220         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
13221         export function HTLCOutputInCommitment_clone(orig: number): number {
13222                 if(!isWasmInitialized) {
13223                         throw new Error("initializeWasm() must be awaited first!");
13224                 }
13225                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
13226                 return nativeResponseValue;
13227         }
13228         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
13229         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
13230                 if(!isWasmInitialized) {
13231                         throw new Error("initializeWasm() must be awaited first!");
13232                 }
13233                 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
13234                 return decodeArray(nativeResponseValue);
13235         }
13236         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
13237         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
13238                 if(!isWasmInitialized) {
13239                         throw new Error("initializeWasm() must be awaited first!");
13240                 }
13241                 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
13242                 return nativeResponseValue;
13243         }
13244         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
13245         export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
13246                 if(!isWasmInitialized) {
13247                         throw new Error("initializeWasm() must be awaited first!");
13248                 }
13249                 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
13250                 return decodeArray(nativeResponseValue);
13251         }
13252         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
13253         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
13254                 if(!isWasmInitialized) {
13255                         throw new Error("initializeWasm() must be awaited first!");
13256                 }
13257                 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
13258                 return decodeArray(nativeResponseValue);
13259         }
13260         // 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);
13261         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 {
13262                 if(!isWasmInitialized) {
13263                         throw new Error("initializeWasm() must be awaited first!");
13264                 }
13265                 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(commitment_txid), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
13266                 return decodeArray(nativeResponseValue);
13267         }
13268         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
13269         export function ChannelTransactionParameters_free(this_obj: number): void {
13270                 if(!isWasmInitialized) {
13271                         throw new Error("initializeWasm() must be awaited first!");
13272                 }
13273                 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
13274                 // debug statements here
13275         }
13276         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
13277         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
13278                 if(!isWasmInitialized) {
13279                         throw new Error("initializeWasm() must be awaited first!");
13280                 }
13281                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
13282                 return nativeResponseValue;
13283         }
13284         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
13285         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
13286                 if(!isWasmInitialized) {
13287                         throw new Error("initializeWasm() must be awaited first!");
13288                 }
13289                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
13290                 // debug statements here
13291         }
13292         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
13293         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
13294                 if(!isWasmInitialized) {
13295                         throw new Error("initializeWasm() must be awaited first!");
13296                 }
13297                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
13298                 return nativeResponseValue;
13299         }
13300         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
13301         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
13302                 if(!isWasmInitialized) {
13303                         throw new Error("initializeWasm() must be awaited first!");
13304                 }
13305                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
13306                 // debug statements here
13307         }
13308         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
13309         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
13310                 if(!isWasmInitialized) {
13311                         throw new Error("initializeWasm() must be awaited first!");
13312                 }
13313                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
13314                 return nativeResponseValue;
13315         }
13316         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
13317         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
13318                 if(!isWasmInitialized) {
13319                         throw new Error("initializeWasm() must be awaited first!");
13320                 }
13321                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
13322                 // debug statements here
13323         }
13324         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
13325         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
13326                 if(!isWasmInitialized) {
13327                         throw new Error("initializeWasm() must be awaited first!");
13328                 }
13329                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
13330                 return nativeResponseValue;
13331         }
13332         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
13333         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
13334                 if(!isWasmInitialized) {
13335                         throw new Error("initializeWasm() must be awaited first!");
13336                 }
13337                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
13338                 // debug statements here
13339         }
13340         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
13341         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
13342                 if(!isWasmInitialized) {
13343                         throw new Error("initializeWasm() must be awaited first!");
13344                 }
13345                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
13346                 return nativeResponseValue;
13347         }
13348         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
13349         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
13350                 if(!isWasmInitialized) {
13351                         throw new Error("initializeWasm() must be awaited first!");
13352                 }
13353                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
13354                 // debug statements here
13355         }
13356         // 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);
13357         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 {
13358                 if(!isWasmInitialized) {
13359                         throw new Error("initializeWasm() must be awaited first!");
13360                 }
13361                 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
13362                 return nativeResponseValue;
13363         }
13364         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
13365         export function ChannelTransactionParameters_clone(orig: number): number {
13366                 if(!isWasmInitialized) {
13367                         throw new Error("initializeWasm() must be awaited first!");
13368                 }
13369                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
13370                 return nativeResponseValue;
13371         }
13372         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
13373         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
13374                 if(!isWasmInitialized) {
13375                         throw new Error("initializeWasm() must be awaited first!");
13376                 }
13377                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
13378                 // debug statements here
13379         }
13380         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
13381         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
13382                 if(!isWasmInitialized) {
13383                         throw new Error("initializeWasm() must be awaited first!");
13384                 }
13385                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
13386                 return nativeResponseValue;
13387         }
13388         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
13389         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
13390                 if(!isWasmInitialized) {
13391                         throw new Error("initializeWasm() must be awaited first!");
13392                 }
13393                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
13394                 // debug statements here
13395         }
13396         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
13397         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
13398                 if(!isWasmInitialized) {
13399                         throw new Error("initializeWasm() must be awaited first!");
13400                 }
13401                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
13402                 return nativeResponseValue;
13403         }
13404         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
13405         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
13406                 if(!isWasmInitialized) {
13407                         throw new Error("initializeWasm() must be awaited first!");
13408                 }
13409                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
13410                 // debug statements here
13411         }
13412         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
13413         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
13414                 if(!isWasmInitialized) {
13415                         throw new Error("initializeWasm() must be awaited first!");
13416                 }
13417                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
13418                 return nativeResponseValue;
13419         }
13420         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
13421         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
13422                 if(!isWasmInitialized) {
13423                         throw new Error("initializeWasm() must be awaited first!");
13424                 }
13425                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
13426                 return nativeResponseValue;
13427         }
13428         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
13429         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
13430                 if(!isWasmInitialized) {
13431                         throw new Error("initializeWasm() must be awaited first!");
13432                 }
13433                 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
13434                 return nativeResponseValue;
13435         }
13436         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
13437         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
13438                 if(!isWasmInitialized) {
13439                         throw new Error("initializeWasm() must be awaited first!");
13440                 }
13441                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
13442                 return nativeResponseValue;
13443         }
13444         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
13445         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
13446                 if(!isWasmInitialized) {
13447                         throw new Error("initializeWasm() must be awaited first!");
13448                 }
13449                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
13450                 return nativeResponseValue;
13451         }
13452         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
13453         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
13454                 if(!isWasmInitialized) {
13455                         throw new Error("initializeWasm() must be awaited first!");
13456                 }
13457                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
13458                 return decodeArray(nativeResponseValue);
13459         }
13460         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
13461         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
13462                 if(!isWasmInitialized) {
13463                         throw new Error("initializeWasm() must be awaited first!");
13464                 }
13465                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
13466                 return nativeResponseValue;
13467         }
13468         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
13469         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
13470                 if(!isWasmInitialized) {
13471                         throw new Error("initializeWasm() must be awaited first!");
13472                 }
13473                 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
13474                 return decodeArray(nativeResponseValue);
13475         }
13476         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
13477         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
13478                 if(!isWasmInitialized) {
13479                         throw new Error("initializeWasm() must be awaited first!");
13480                 }
13481                 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
13482                 return nativeResponseValue;
13483         }
13484         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
13485         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
13486                 if(!isWasmInitialized) {
13487                         throw new Error("initializeWasm() must be awaited first!");
13488                 }
13489                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
13490                 // debug statements here
13491         }
13492         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
13493         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
13494                 if(!isWasmInitialized) {
13495                         throw new Error("initializeWasm() must be awaited first!");
13496                 }
13497                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
13498                 return nativeResponseValue;
13499         }
13500         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
13501         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
13502                 if(!isWasmInitialized) {
13503                         throw new Error("initializeWasm() must be awaited first!");
13504                 }
13505                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
13506                 return nativeResponseValue;
13507         }
13508         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
13509         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
13510                 if(!isWasmInitialized) {
13511                         throw new Error("initializeWasm() must be awaited first!");
13512                 }
13513                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
13514                 return nativeResponseValue;
13515         }
13516         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
13517         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
13518                 if(!isWasmInitialized) {
13519                         throw new Error("initializeWasm() must be awaited first!");
13520                 }
13521                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
13522                 return nativeResponseValue;
13523         }
13524         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
13525         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
13526                 if(!isWasmInitialized) {
13527                         throw new Error("initializeWasm() must be awaited first!");
13528                 }
13529                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
13530                 return nativeResponseValue;
13531         }
13532         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
13533         export function HolderCommitmentTransaction_free(this_obj: number): void {
13534                 if(!isWasmInitialized) {
13535                         throw new Error("initializeWasm() must be awaited first!");
13536                 }
13537                 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
13538                 // debug statements here
13539         }
13540         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
13541         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
13542                 if(!isWasmInitialized) {
13543                         throw new Error("initializeWasm() must be awaited first!");
13544                 }
13545                 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
13546                 return decodeArray(nativeResponseValue);
13547         }
13548         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
13549         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
13550                 if(!isWasmInitialized) {
13551                         throw new Error("initializeWasm() must be awaited first!");
13552                 }
13553                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
13554                 // debug statements here
13555         }
13556         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
13557         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
13558                 if(!isWasmInitialized) {
13559                         throw new Error("initializeWasm() must be awaited first!");
13560                 }
13561                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
13562                 // debug statements here
13563         }
13564         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
13565         export function HolderCommitmentTransaction_clone(orig: number): number {
13566                 if(!isWasmInitialized) {
13567                         throw new Error("initializeWasm() must be awaited first!");
13568                 }
13569                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
13570                 return nativeResponseValue;
13571         }
13572         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
13573         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
13574                 if(!isWasmInitialized) {
13575                         throw new Error("initializeWasm() must be awaited first!");
13576                 }
13577                 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
13578                 return decodeArray(nativeResponseValue);
13579         }
13580         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
13581         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
13582                 if(!isWasmInitialized) {
13583                         throw new Error("initializeWasm() must be awaited first!");
13584                 }
13585                 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
13586                 return nativeResponseValue;
13587         }
13588         // 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);
13589         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
13590                 if(!isWasmInitialized) {
13591                         throw new Error("initializeWasm() must be awaited first!");
13592                 }
13593                 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
13594                 return nativeResponseValue;
13595         }
13596         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
13597         export function BuiltCommitmentTransaction_free(this_obj: number): void {
13598                 if(!isWasmInitialized) {
13599                         throw new Error("initializeWasm() must be awaited first!");
13600                 }
13601                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
13602                 // debug statements here
13603         }
13604         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
13605         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
13606                 if(!isWasmInitialized) {
13607                         throw new Error("initializeWasm() must be awaited first!");
13608                 }
13609                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
13610                 return decodeArray(nativeResponseValue);
13611         }
13612         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
13613         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
13614                 if(!isWasmInitialized) {
13615                         throw new Error("initializeWasm() must be awaited first!");
13616                 }
13617                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
13618                 // debug statements here
13619         }
13620         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
13621         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
13622                 if(!isWasmInitialized) {
13623                         throw new Error("initializeWasm() must be awaited first!");
13624                 }
13625                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
13626                 return decodeArray(nativeResponseValue);
13627         }
13628         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13629         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
13630                 if(!isWasmInitialized) {
13631                         throw new Error("initializeWasm() must be awaited first!");
13632                 }
13633                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
13634                 // debug statements here
13635         }
13636         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
13637         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
13638                 if(!isWasmInitialized) {
13639                         throw new Error("initializeWasm() must be awaited first!");
13640                 }
13641                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
13642                 return nativeResponseValue;
13643         }
13644         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
13645         export function BuiltCommitmentTransaction_clone(orig: number): number {
13646                 if(!isWasmInitialized) {
13647                         throw new Error("initializeWasm() must be awaited first!");
13648                 }
13649                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
13650                 return nativeResponseValue;
13651         }
13652         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
13653         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
13654                 if(!isWasmInitialized) {
13655                         throw new Error("initializeWasm() must be awaited first!");
13656                 }
13657                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
13658                 return decodeArray(nativeResponseValue);
13659         }
13660         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
13661         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
13662                 if(!isWasmInitialized) {
13663                         throw new Error("initializeWasm() must be awaited first!");
13664                 }
13665                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
13666                 return nativeResponseValue;
13667         }
13668         // 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);
13669         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
13670                 if(!isWasmInitialized) {
13671                         throw new Error("initializeWasm() must be awaited first!");
13672                 }
13673                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
13674                 return decodeArray(nativeResponseValue);
13675         }
13676         // 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);
13677         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
13678                 if(!isWasmInitialized) {
13679                         throw new Error("initializeWasm() must be awaited first!");
13680                 }
13681                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
13682                 return decodeArray(nativeResponseValue);
13683         }
13684         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
13685         export function CommitmentTransaction_free(this_obj: number): void {
13686                 if(!isWasmInitialized) {
13687                         throw new Error("initializeWasm() must be awaited first!");
13688                 }
13689                 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
13690                 // debug statements here
13691         }
13692         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
13693         export function CommitmentTransaction_clone(orig: number): number {
13694                 if(!isWasmInitialized) {
13695                         throw new Error("initializeWasm() must be awaited first!");
13696                 }
13697                 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
13698                 return nativeResponseValue;
13699         }
13700         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
13701         export function CommitmentTransaction_write(obj: number): Uint8Array {
13702                 if(!isWasmInitialized) {
13703                         throw new Error("initializeWasm() must be awaited first!");
13704                 }
13705                 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
13706                 return decodeArray(nativeResponseValue);
13707         }
13708         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
13709         export function CommitmentTransaction_read(ser: Uint8Array): number {
13710                 if(!isWasmInitialized) {
13711                         throw new Error("initializeWasm() must be awaited first!");
13712                 }
13713                 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
13714                 return nativeResponseValue;
13715         }
13716         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
13717         export function CommitmentTransaction_commitment_number(this_arg: number): number {
13718                 if(!isWasmInitialized) {
13719                         throw new Error("initializeWasm() must be awaited first!");
13720                 }
13721                 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
13722                 return nativeResponseValue;
13723         }
13724         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
13725         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
13726                 if(!isWasmInitialized) {
13727                         throw new Error("initializeWasm() must be awaited first!");
13728                 }
13729                 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
13730                 return nativeResponseValue;
13731         }
13732         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
13733         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
13734                 if(!isWasmInitialized) {
13735                         throw new Error("initializeWasm() must be awaited first!");
13736                 }
13737                 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
13738                 return nativeResponseValue;
13739         }
13740         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
13741         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
13742                 if(!isWasmInitialized) {
13743                         throw new Error("initializeWasm() must be awaited first!");
13744                 }
13745                 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
13746                 return nativeResponseValue;
13747         }
13748         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
13749         export function CommitmentTransaction_trust(this_arg: number): number {
13750                 if(!isWasmInitialized) {
13751                         throw new Error("initializeWasm() must be awaited first!");
13752                 }
13753                 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
13754                 return nativeResponseValue;
13755         }
13756         // 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);
13757         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
13758                 if(!isWasmInitialized) {
13759                         throw new Error("initializeWasm() must be awaited first!");
13760                 }
13761                 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
13762                 return nativeResponseValue;
13763         }
13764         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
13765         export function TrustedCommitmentTransaction_free(this_obj: number): void {
13766                 if(!isWasmInitialized) {
13767                         throw new Error("initializeWasm() must be awaited first!");
13768                 }
13769                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
13770                 // debug statements here
13771         }
13772         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
13773         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
13774                 if(!isWasmInitialized) {
13775                         throw new Error("initializeWasm() must be awaited first!");
13776                 }
13777                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
13778                 return decodeArray(nativeResponseValue);
13779         }
13780         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
13781         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
13782                 if(!isWasmInitialized) {
13783                         throw new Error("initializeWasm() must be awaited first!");
13784                 }
13785                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
13786                 return nativeResponseValue;
13787         }
13788         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
13789         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
13790                 if(!isWasmInitialized) {
13791                         throw new Error("initializeWasm() must be awaited first!");
13792                 }
13793                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
13794                 return nativeResponseValue;
13795         }
13796         // 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);
13797         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
13798                 if(!isWasmInitialized) {
13799                         throw new Error("initializeWasm() must be awaited first!");
13800                 }
13801                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
13802                 return nativeResponseValue;
13803         }
13804         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
13805         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
13806                 if(!isWasmInitialized) {
13807                         throw new Error("initializeWasm() must be awaited first!");
13808                 }
13809                 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
13810                 return nativeResponseValue;
13811         }
13812         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
13813         export function InitFeatures_eq(a: number, b: number): boolean {
13814                 if(!isWasmInitialized) {
13815                         throw new Error("initializeWasm() must be awaited first!");
13816                 }
13817                 const nativeResponseValue = wasm.InitFeatures_eq(a, b);
13818                 return nativeResponseValue;
13819         }
13820         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
13821         export function NodeFeatures_eq(a: number, b: number): boolean {
13822                 if(!isWasmInitialized) {
13823                         throw new Error("initializeWasm() must be awaited first!");
13824                 }
13825                 const nativeResponseValue = wasm.NodeFeatures_eq(a, b);
13826                 return nativeResponseValue;
13827         }
13828         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
13829         export function ChannelFeatures_eq(a: number, b: number): boolean {
13830                 if(!isWasmInitialized) {
13831                         throw new Error("initializeWasm() must be awaited first!");
13832                 }
13833                 const nativeResponseValue = wasm.ChannelFeatures_eq(a, b);
13834                 return nativeResponseValue;
13835         }
13836         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
13837         export function InvoiceFeatures_eq(a: number, b: number): boolean {
13838                 if(!isWasmInitialized) {
13839                         throw new Error("initializeWasm() must be awaited first!");
13840                 }
13841                 const nativeResponseValue = wasm.InvoiceFeatures_eq(a, b);
13842                 return nativeResponseValue;
13843         }
13844         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
13845         export function InitFeatures_clone(orig: number): number {
13846                 if(!isWasmInitialized) {
13847                         throw new Error("initializeWasm() must be awaited first!");
13848                 }
13849                 const nativeResponseValue = wasm.InitFeatures_clone(orig);
13850                 return nativeResponseValue;
13851         }
13852         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
13853         export function NodeFeatures_clone(orig: number): number {
13854                 if(!isWasmInitialized) {
13855                         throw new Error("initializeWasm() must be awaited first!");
13856                 }
13857                 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
13858                 return nativeResponseValue;
13859         }
13860         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
13861         export function ChannelFeatures_clone(orig: number): number {
13862                 if(!isWasmInitialized) {
13863                         throw new Error("initializeWasm() must be awaited first!");
13864                 }
13865                 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
13866                 return nativeResponseValue;
13867         }
13868         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
13869         export function InvoiceFeatures_clone(orig: number): number {
13870                 if(!isWasmInitialized) {
13871                         throw new Error("initializeWasm() must be awaited first!");
13872                 }
13873                 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
13874                 return nativeResponseValue;
13875         }
13876         // void InitFeatures_free(struct LDKInitFeatures this_obj);
13877         export function InitFeatures_free(this_obj: number): void {
13878                 if(!isWasmInitialized) {
13879                         throw new Error("initializeWasm() must be awaited first!");
13880                 }
13881                 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
13882                 // debug statements here
13883         }
13884         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
13885         export function NodeFeatures_free(this_obj: number): void {
13886                 if(!isWasmInitialized) {
13887                         throw new Error("initializeWasm() must be awaited first!");
13888                 }
13889                 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
13890                 // debug statements here
13891         }
13892         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
13893         export function ChannelFeatures_free(this_obj: number): void {
13894                 if(!isWasmInitialized) {
13895                         throw new Error("initializeWasm() must be awaited first!");
13896                 }
13897                 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
13898                 // debug statements here
13899         }
13900         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
13901         export function InvoiceFeatures_free(this_obj: number): void {
13902                 if(!isWasmInitialized) {
13903                         throw new Error("initializeWasm() must be awaited first!");
13904                 }
13905                 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
13906                 // debug statements here
13907         }
13908         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
13909         export function InitFeatures_empty(): number {
13910                 if(!isWasmInitialized) {
13911                         throw new Error("initializeWasm() must be awaited first!");
13912                 }
13913                 const nativeResponseValue = wasm.InitFeatures_empty();
13914                 return nativeResponseValue;
13915         }
13916         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
13917         export function InitFeatures_known(): number {
13918                 if(!isWasmInitialized) {
13919                         throw new Error("initializeWasm() must be awaited first!");
13920                 }
13921                 const nativeResponseValue = wasm.InitFeatures_known();
13922                 return nativeResponseValue;
13923         }
13924         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
13925         export function NodeFeatures_empty(): number {
13926                 if(!isWasmInitialized) {
13927                         throw new Error("initializeWasm() must be awaited first!");
13928                 }
13929                 const nativeResponseValue = wasm.NodeFeatures_empty();
13930                 return nativeResponseValue;
13931         }
13932         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
13933         export function NodeFeatures_known(): number {
13934                 if(!isWasmInitialized) {
13935                         throw new Error("initializeWasm() must be awaited first!");
13936                 }
13937                 const nativeResponseValue = wasm.NodeFeatures_known();
13938                 return nativeResponseValue;
13939         }
13940         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
13941         export function ChannelFeatures_empty(): number {
13942                 if(!isWasmInitialized) {
13943                         throw new Error("initializeWasm() must be awaited first!");
13944                 }
13945                 const nativeResponseValue = wasm.ChannelFeatures_empty();
13946                 return nativeResponseValue;
13947         }
13948         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
13949         export function ChannelFeatures_known(): number {
13950                 if(!isWasmInitialized) {
13951                         throw new Error("initializeWasm() must be awaited first!");
13952                 }
13953                 const nativeResponseValue = wasm.ChannelFeatures_known();
13954                 return nativeResponseValue;
13955         }
13956         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
13957         export function InvoiceFeatures_empty(): number {
13958                 if(!isWasmInitialized) {
13959                         throw new Error("initializeWasm() must be awaited first!");
13960                 }
13961                 const nativeResponseValue = wasm.InvoiceFeatures_empty();
13962                 return nativeResponseValue;
13963         }
13964         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
13965         export function InvoiceFeatures_known(): number {
13966                 if(!isWasmInitialized) {
13967                         throw new Error("initializeWasm() must be awaited first!");
13968                 }
13969                 const nativeResponseValue = wasm.InvoiceFeatures_known();
13970                 return nativeResponseValue;
13971         }
13972         // MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg);
13973         export function InitFeatures_supports_payment_secret(this_arg: number): boolean {
13974                 if(!isWasmInitialized) {
13975                         throw new Error("initializeWasm() must be awaited first!");
13976                 }
13977                 const nativeResponseValue = wasm.InitFeatures_supports_payment_secret(this_arg);
13978                 return nativeResponseValue;
13979         }
13980         // MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
13981         export function NodeFeatures_supports_payment_secret(this_arg: number): boolean {
13982                 if(!isWasmInitialized) {
13983                         throw new Error("initializeWasm() must be awaited first!");
13984                 }
13985                 const nativeResponseValue = wasm.NodeFeatures_supports_payment_secret(this_arg);
13986                 return nativeResponseValue;
13987         }
13988         // MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
13989         export function InvoiceFeatures_supports_payment_secret(this_arg: number): boolean {
13990                 if(!isWasmInitialized) {
13991                         throw new Error("initializeWasm() must be awaited first!");
13992                 }
13993                 const nativeResponseValue = wasm.InvoiceFeatures_supports_payment_secret(this_arg);
13994                 return nativeResponseValue;
13995         }
13996         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
13997         export function InitFeatures_write(obj: number): Uint8Array {
13998                 if(!isWasmInitialized) {
13999                         throw new Error("initializeWasm() must be awaited first!");
14000                 }
14001                 const nativeResponseValue = wasm.InitFeatures_write(obj);
14002                 return decodeArray(nativeResponseValue);
14003         }
14004         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
14005         export function NodeFeatures_write(obj: number): Uint8Array {
14006                 if(!isWasmInitialized) {
14007                         throw new Error("initializeWasm() must be awaited first!");
14008                 }
14009                 const nativeResponseValue = wasm.NodeFeatures_write(obj);
14010                 return decodeArray(nativeResponseValue);
14011         }
14012         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
14013         export function ChannelFeatures_write(obj: number): Uint8Array {
14014                 if(!isWasmInitialized) {
14015                         throw new Error("initializeWasm() must be awaited first!");
14016                 }
14017                 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
14018                 return decodeArray(nativeResponseValue);
14019         }
14020         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
14021         export function InvoiceFeatures_write(obj: number): Uint8Array {
14022                 if(!isWasmInitialized) {
14023                         throw new Error("initializeWasm() must be awaited first!");
14024                 }
14025                 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
14026                 return decodeArray(nativeResponseValue);
14027         }
14028         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
14029         export function InitFeatures_read(ser: Uint8Array): number {
14030                 if(!isWasmInitialized) {
14031                         throw new Error("initializeWasm() must be awaited first!");
14032                 }
14033                 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
14034                 return nativeResponseValue;
14035         }
14036         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
14037         export function NodeFeatures_read(ser: Uint8Array): number {
14038                 if(!isWasmInitialized) {
14039                         throw new Error("initializeWasm() must be awaited first!");
14040                 }
14041                 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
14042                 return nativeResponseValue;
14043         }
14044         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
14045         export function ChannelFeatures_read(ser: Uint8Array): number {
14046                 if(!isWasmInitialized) {
14047                         throw new Error("initializeWasm() must be awaited first!");
14048                 }
14049                 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
14050                 return nativeResponseValue;
14051         }
14052         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
14053         export function InvoiceFeatures_read(ser: Uint8Array): number {
14054                 if(!isWasmInitialized) {
14055                         throw new Error("initializeWasm() must be awaited first!");
14056                 }
14057                 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
14058                 return nativeResponseValue;
14059         }
14060         // void ShutdownScript_free(struct LDKShutdownScript this_obj);
14061         export function ShutdownScript_free(this_obj: number): void {
14062                 if(!isWasmInitialized) {
14063                         throw new Error("initializeWasm() must be awaited first!");
14064                 }
14065                 const nativeResponseValue = wasm.ShutdownScript_free(this_obj);
14066                 // debug statements here
14067         }
14068         // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
14069         export function ShutdownScript_clone(orig: number): number {
14070                 if(!isWasmInitialized) {
14071                         throw new Error("initializeWasm() must be awaited first!");
14072                 }
14073                 const nativeResponseValue = wasm.ShutdownScript_clone(orig);
14074                 return nativeResponseValue;
14075         }
14076         // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
14077         export function InvalidShutdownScript_free(this_obj: number): void {
14078                 if(!isWasmInitialized) {
14079                         throw new Error("initializeWasm() must be awaited first!");
14080                 }
14081                 const nativeResponseValue = wasm.InvalidShutdownScript_free(this_obj);
14082                 // debug statements here
14083         }
14084         // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
14085         export function InvalidShutdownScript_get_script(this_ptr: number): Uint8Array {
14086                 if(!isWasmInitialized) {
14087                         throw new Error("initializeWasm() must be awaited first!");
14088                 }
14089                 const nativeResponseValue = wasm.InvalidShutdownScript_get_script(this_ptr);
14090                 return decodeArray(nativeResponseValue);
14091         }
14092         // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
14093         export function InvalidShutdownScript_set_script(this_ptr: number, val: Uint8Array): void {
14094                 if(!isWasmInitialized) {
14095                         throw new Error("initializeWasm() must be awaited first!");
14096                 }
14097                 const nativeResponseValue = wasm.InvalidShutdownScript_set_script(this_ptr, encodeArray(val));
14098                 // debug statements here
14099         }
14100         // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
14101         export function InvalidShutdownScript_new(script_arg: Uint8Array): number {
14102                 if(!isWasmInitialized) {
14103                         throw new Error("initializeWasm() must be awaited first!");
14104                 }
14105                 const nativeResponseValue = wasm.InvalidShutdownScript_new(encodeArray(script_arg));
14106                 return nativeResponseValue;
14107         }
14108         // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
14109         export function ShutdownScript_write(obj: number): Uint8Array {
14110                 if(!isWasmInitialized) {
14111                         throw new Error("initializeWasm() must be awaited first!");
14112                 }
14113                 const nativeResponseValue = wasm.ShutdownScript_write(obj);
14114                 return decodeArray(nativeResponseValue);
14115         }
14116         // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
14117         export function ShutdownScript_read(ser: Uint8Array): number {
14118                 if(!isWasmInitialized) {
14119                         throw new Error("initializeWasm() must be awaited first!");
14120                 }
14121                 const nativeResponseValue = wasm.ShutdownScript_read(encodeArray(ser));
14122                 return nativeResponseValue;
14123         }
14124         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2pkh(const uint8_t (*pubkey_hash)[20]);
14125         export function ShutdownScript_new_p2pkh(pubkey_hash: Uint8Array): number {
14126                 if(!isWasmInitialized) {
14127                         throw new Error("initializeWasm() must be awaited first!");
14128                 }
14129                 const nativeResponseValue = wasm.ShutdownScript_new_p2pkh(encodeArray(pubkey_hash));
14130                 return nativeResponseValue;
14131         }
14132         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2sh(const uint8_t (*script_hash)[20]);
14133         export function ShutdownScript_new_p2sh(script_hash: Uint8Array): number {
14134                 if(!isWasmInitialized) {
14135                         throw new Error("initializeWasm() must be awaited first!");
14136                 }
14137                 const nativeResponseValue = wasm.ShutdownScript_new_p2sh(encodeArray(script_hash));
14138                 return nativeResponseValue;
14139         }
14140         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
14141         export function ShutdownScript_new_p2wpkh(pubkey_hash: Uint8Array): number {
14142                 if(!isWasmInitialized) {
14143                         throw new Error("initializeWasm() must be awaited first!");
14144                 }
14145                 const nativeResponseValue = wasm.ShutdownScript_new_p2wpkh(encodeArray(pubkey_hash));
14146                 return nativeResponseValue;
14147         }
14148         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
14149         export function ShutdownScript_new_p2wsh(script_hash: Uint8Array): number {
14150                 if(!isWasmInitialized) {
14151                         throw new Error("initializeWasm() must be awaited first!");
14152                 }
14153                 const nativeResponseValue = wasm.ShutdownScript_new_p2wsh(encodeArray(script_hash));
14154                 return nativeResponseValue;
14155         }
14156         // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
14157         export function ShutdownScript_new_witness_program(version: number, program: Uint8Array): number {
14158                 if(!isWasmInitialized) {
14159                         throw new Error("initializeWasm() must be awaited first!");
14160                 }
14161                 const nativeResponseValue = wasm.ShutdownScript_new_witness_program(version, encodeArray(program));
14162                 return nativeResponseValue;
14163         }
14164         // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
14165         export function ShutdownScript_into_inner(this_arg: number): Uint8Array {
14166                 if(!isWasmInitialized) {
14167                         throw new Error("initializeWasm() must be awaited first!");
14168                 }
14169                 const nativeResponseValue = wasm.ShutdownScript_into_inner(this_arg);
14170                 return decodeArray(nativeResponseValue);
14171         }
14172         // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
14173         export function ShutdownScript_as_legacy_pubkey(this_arg: number): Uint8Array {
14174                 if(!isWasmInitialized) {
14175                         throw new Error("initializeWasm() must be awaited first!");
14176                 }
14177                 const nativeResponseValue = wasm.ShutdownScript_as_legacy_pubkey(this_arg);
14178                 return decodeArray(nativeResponseValue);
14179         }
14180         // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
14181         export function ShutdownScript_is_compatible(this_arg: number, features: number): boolean {
14182                 if(!isWasmInitialized) {
14183                         throw new Error("initializeWasm() must be awaited first!");
14184                 }
14185                 const nativeResponseValue = wasm.ShutdownScript_is_compatible(this_arg, features);
14186                 return nativeResponseValue;
14187         }
14188         // void RouteHop_free(struct LDKRouteHop this_obj);
14189         export function RouteHop_free(this_obj: number): void {
14190                 if(!isWasmInitialized) {
14191                         throw new Error("initializeWasm() must be awaited first!");
14192                 }
14193                 const nativeResponseValue = wasm.RouteHop_free(this_obj);
14194                 // debug statements here
14195         }
14196         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
14197         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
14198                 if(!isWasmInitialized) {
14199                         throw new Error("initializeWasm() must be awaited first!");
14200                 }
14201                 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
14202                 return decodeArray(nativeResponseValue);
14203         }
14204         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14205         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
14206                 if(!isWasmInitialized) {
14207                         throw new Error("initializeWasm() must be awaited first!");
14208                 }
14209                 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
14210                 // debug statements here
14211         }
14212         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
14213         export function RouteHop_get_node_features(this_ptr: number): number {
14214                 if(!isWasmInitialized) {
14215                         throw new Error("initializeWasm() must be awaited first!");
14216                 }
14217                 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
14218                 return nativeResponseValue;
14219         }
14220         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
14221         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
14222                 if(!isWasmInitialized) {
14223                         throw new Error("initializeWasm() must be awaited first!");
14224                 }
14225                 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
14226                 // debug statements here
14227         }
14228         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
14229         export function RouteHop_get_short_channel_id(this_ptr: number): number {
14230                 if(!isWasmInitialized) {
14231                         throw new Error("initializeWasm() must be awaited first!");
14232                 }
14233                 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
14234                 return nativeResponseValue;
14235         }
14236         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
14237         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
14238                 if(!isWasmInitialized) {
14239                         throw new Error("initializeWasm() must be awaited first!");
14240                 }
14241                 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
14242                 // debug statements here
14243         }
14244         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
14245         export function RouteHop_get_channel_features(this_ptr: number): number {
14246                 if(!isWasmInitialized) {
14247                         throw new Error("initializeWasm() must be awaited first!");
14248                 }
14249                 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
14250                 return nativeResponseValue;
14251         }
14252         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
14253         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
14254                 if(!isWasmInitialized) {
14255                         throw new Error("initializeWasm() must be awaited first!");
14256                 }
14257                 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
14258                 // debug statements here
14259         }
14260         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
14261         export function RouteHop_get_fee_msat(this_ptr: number): number {
14262                 if(!isWasmInitialized) {
14263                         throw new Error("initializeWasm() must be awaited first!");
14264                 }
14265                 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
14266                 return nativeResponseValue;
14267         }
14268         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
14269         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
14270                 if(!isWasmInitialized) {
14271                         throw new Error("initializeWasm() must be awaited first!");
14272                 }
14273                 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
14274                 // debug statements here
14275         }
14276         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
14277         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
14278                 if(!isWasmInitialized) {
14279                         throw new Error("initializeWasm() must be awaited first!");
14280                 }
14281                 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
14282                 return nativeResponseValue;
14283         }
14284         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
14285         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
14286                 if(!isWasmInitialized) {
14287                         throw new Error("initializeWasm() must be awaited first!");
14288                 }
14289                 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
14290                 // debug statements here
14291         }
14292         // 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);
14293         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 {
14294                 if(!isWasmInitialized) {
14295                         throw new Error("initializeWasm() must be awaited first!");
14296                 }
14297                 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);
14298                 return nativeResponseValue;
14299         }
14300         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
14301         export function RouteHop_clone(orig: number): number {
14302                 if(!isWasmInitialized) {
14303                         throw new Error("initializeWasm() must be awaited first!");
14304                 }
14305                 const nativeResponseValue = wasm.RouteHop_clone(orig);
14306                 return nativeResponseValue;
14307         }
14308         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
14309         export function RouteHop_write(obj: number): Uint8Array {
14310                 if(!isWasmInitialized) {
14311                         throw new Error("initializeWasm() must be awaited first!");
14312                 }
14313                 const nativeResponseValue = wasm.RouteHop_write(obj);
14314                 return decodeArray(nativeResponseValue);
14315         }
14316         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
14317         export function RouteHop_read(ser: Uint8Array): number {
14318                 if(!isWasmInitialized) {
14319                         throw new Error("initializeWasm() must be awaited first!");
14320                 }
14321                 const nativeResponseValue = wasm.RouteHop_read(encodeArray(ser));
14322                 return nativeResponseValue;
14323         }
14324         // void Route_free(struct LDKRoute this_obj);
14325         export function Route_free(this_obj: number): void {
14326                 if(!isWasmInitialized) {
14327                         throw new Error("initializeWasm() must be awaited first!");
14328                 }
14329                 const nativeResponseValue = wasm.Route_free(this_obj);
14330                 // debug statements here
14331         }
14332         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
14333         export function Route_set_paths(this_ptr: number, val: number[][]): void {
14334                 if(!isWasmInitialized) {
14335                         throw new Error("initializeWasm() must be awaited first!");
14336                 }
14337                 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
14338                 // debug statements here
14339         }
14340         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
14341         export function Route_new(paths_arg: number[][]): number {
14342                 if(!isWasmInitialized) {
14343                         throw new Error("initializeWasm() must be awaited first!");
14344                 }
14345                 const nativeResponseValue = wasm.Route_new(paths_arg);
14346                 return nativeResponseValue;
14347         }
14348         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
14349         export function Route_clone(orig: number): number {
14350                 if(!isWasmInitialized) {
14351                         throw new Error("initializeWasm() must be awaited first!");
14352                 }
14353                 const nativeResponseValue = wasm.Route_clone(orig);
14354                 return nativeResponseValue;
14355         }
14356         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
14357         export function Route_write(obj: number): Uint8Array {
14358                 if(!isWasmInitialized) {
14359                         throw new Error("initializeWasm() must be awaited first!");
14360                 }
14361                 const nativeResponseValue = wasm.Route_write(obj);
14362                 return decodeArray(nativeResponseValue);
14363         }
14364         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
14365         export function Route_read(ser: Uint8Array): number {
14366                 if(!isWasmInitialized) {
14367                         throw new Error("initializeWasm() must be awaited first!");
14368                 }
14369                 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
14370                 return nativeResponseValue;
14371         }
14372         // void RouteHint_free(struct LDKRouteHint this_obj);
14373         export function RouteHint_free(this_obj: number): void {
14374                 if(!isWasmInitialized) {
14375                         throw new Error("initializeWasm() must be awaited first!");
14376                 }
14377                 const nativeResponseValue = wasm.RouteHint_free(this_obj);
14378                 // debug statements here
14379         }
14380         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
14381         export function RouteHint_eq(a: number, b: number): boolean {
14382                 if(!isWasmInitialized) {
14383                         throw new Error("initializeWasm() must be awaited first!");
14384                 }
14385                 const nativeResponseValue = wasm.RouteHint_eq(a, b);
14386                 return nativeResponseValue;
14387         }
14388         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
14389         export function RouteHint_clone(orig: number): number {
14390                 if(!isWasmInitialized) {
14391                         throw new Error("initializeWasm() must be awaited first!");
14392                 }
14393                 const nativeResponseValue = wasm.RouteHint_clone(orig);
14394                 return nativeResponseValue;
14395         }
14396         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
14397         export function RouteHintHop_free(this_obj: number): void {
14398                 if(!isWasmInitialized) {
14399                         throw new Error("initializeWasm() must be awaited first!");
14400                 }
14401                 const nativeResponseValue = wasm.RouteHintHop_free(this_obj);
14402                 // debug statements here
14403         }
14404         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
14405         export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
14406                 if(!isWasmInitialized) {
14407                         throw new Error("initializeWasm() must be awaited first!");
14408                 }
14409                 const nativeResponseValue = wasm.RouteHintHop_get_src_node_id(this_ptr);
14410                 return decodeArray(nativeResponseValue);
14411         }
14412         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14413         export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
14414                 if(!isWasmInitialized) {
14415                         throw new Error("initializeWasm() must be awaited first!");
14416                 }
14417                 const nativeResponseValue = wasm.RouteHintHop_set_src_node_id(this_ptr, encodeArray(val));
14418                 // debug statements here
14419         }
14420         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
14421         export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
14422                 if(!isWasmInitialized) {
14423                         throw new Error("initializeWasm() must be awaited first!");
14424                 }
14425                 const nativeResponseValue = wasm.RouteHintHop_get_short_channel_id(this_ptr);
14426                 return nativeResponseValue;
14427         }
14428         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
14429         export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
14430                 if(!isWasmInitialized) {
14431                         throw new Error("initializeWasm() must be awaited first!");
14432                 }
14433                 const nativeResponseValue = wasm.RouteHintHop_set_short_channel_id(this_ptr, val);
14434                 // debug statements here
14435         }
14436         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
14437         export function RouteHintHop_get_fees(this_ptr: number): number {
14438                 if(!isWasmInitialized) {
14439                         throw new Error("initializeWasm() must be awaited first!");
14440                 }
14441                 const nativeResponseValue = wasm.RouteHintHop_get_fees(this_ptr);
14442                 return nativeResponseValue;
14443         }
14444         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
14445         export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
14446                 if(!isWasmInitialized) {
14447                         throw new Error("initializeWasm() must be awaited first!");
14448                 }
14449                 const nativeResponseValue = wasm.RouteHintHop_set_fees(this_ptr, val);
14450                 // debug statements here
14451         }
14452         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
14453         export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
14454                 if(!isWasmInitialized) {
14455                         throw new Error("initializeWasm() must be awaited first!");
14456                 }
14457                 const nativeResponseValue = wasm.RouteHintHop_get_cltv_expiry_delta(this_ptr);
14458                 return nativeResponseValue;
14459         }
14460         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
14461         export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
14462                 if(!isWasmInitialized) {
14463                         throw new Error("initializeWasm() must be awaited first!");
14464                 }
14465                 const nativeResponseValue = wasm.RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
14466                 // debug statements here
14467         }
14468         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
14469         export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
14470                 if(!isWasmInitialized) {
14471                         throw new Error("initializeWasm() must be awaited first!");
14472                 }
14473                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_minimum_msat(this_ptr);
14474                 return nativeResponseValue;
14475         }
14476         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
14477         export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
14478                 if(!isWasmInitialized) {
14479                         throw new Error("initializeWasm() must be awaited first!");
14480                 }
14481                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
14482                 // debug statements here
14483         }
14484         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
14485         export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
14486                 if(!isWasmInitialized) {
14487                         throw new Error("initializeWasm() must be awaited first!");
14488                 }
14489                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_maximum_msat(this_ptr);
14490                 return nativeResponseValue;
14491         }
14492         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
14493         export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
14494                 if(!isWasmInitialized) {
14495                         throw new Error("initializeWasm() must be awaited first!");
14496                 }
14497                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
14498                 // debug statements here
14499         }
14500         // 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);
14501         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 {
14502                 if(!isWasmInitialized) {
14503                         throw new Error("initializeWasm() must be awaited first!");
14504                 }
14505                 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);
14506                 return nativeResponseValue;
14507         }
14508         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
14509         export function RouteHintHop_eq(a: number, b: number): boolean {
14510                 if(!isWasmInitialized) {
14511                         throw new Error("initializeWasm() must be awaited first!");
14512                 }
14513                 const nativeResponseValue = wasm.RouteHintHop_eq(a, b);
14514                 return nativeResponseValue;
14515         }
14516         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
14517         export function RouteHintHop_clone(orig: number): number {
14518                 if(!isWasmInitialized) {
14519                         throw new Error("initializeWasm() must be awaited first!");
14520                 }
14521                 const nativeResponseValue = wasm.RouteHintHop_clone(orig);
14522                 return nativeResponseValue;
14523         }
14524         // struct LDKCResult_RouteLightningErrorZ get_keysend_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
14525         export function get_keysend_route(our_node_id: Uint8Array, network: number, payee: Uint8Array, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
14526                 if(!isWasmInitialized) {
14527                         throw new Error("initializeWasm() must be awaited first!");
14528                 }
14529                 const nativeResponseValue = wasm.get_keysend_route(encodeArray(our_node_id), network, encodeArray(payee), first_hops, last_hops, final_value_msat, final_cltv, logger);
14530                 return nativeResponseValue;
14531         }
14532         // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
14533         export function get_route(our_node_id: Uint8Array, network: number, payee: Uint8Array, payee_features: number, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
14534                 if(!isWasmInitialized) {
14535                         throw new Error("initializeWasm() must be awaited first!");
14536                 }
14537                 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger);
14538                 return nativeResponseValue;
14539         }
14540         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
14541         export function NetworkGraph_free(this_obj: number): void {
14542                 if(!isWasmInitialized) {
14543                         throw new Error("initializeWasm() must be awaited first!");
14544                 }
14545                 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
14546                 // debug statements here
14547         }
14548         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
14549         export function NetworkGraph_clone(orig: number): number {
14550                 if(!isWasmInitialized) {
14551                         throw new Error("initializeWasm() must be awaited first!");
14552                 }
14553                 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
14554                 return nativeResponseValue;
14555         }
14556         // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_obj);
14557         export function LockedNetworkGraph_free(this_obj: number): void {
14558                 if(!isWasmInitialized) {
14559                         throw new Error("initializeWasm() must be awaited first!");
14560                 }
14561                 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_obj);
14562                 // debug statements here
14563         }
14564         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
14565         export function NetGraphMsgHandler_free(this_obj: number): void {
14566                 if(!isWasmInitialized) {
14567                         throw new Error("initializeWasm() must be awaited first!");
14568                 }
14569                 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
14570                 // debug statements here
14571         }
14572         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
14573         export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
14574                 if(!isWasmInitialized) {
14575                         throw new Error("initializeWasm() must be awaited first!");
14576                 }
14577                 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
14578                 return nativeResponseValue;
14579         }
14580         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
14581         export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
14582                 if(!isWasmInitialized) {
14583                         throw new Error("initializeWasm() must be awaited first!");
14584                 }
14585                 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
14586                 return nativeResponseValue;
14587         }
14588         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
14589         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
14590                 if(!isWasmInitialized) {
14591                         throw new Error("initializeWasm() must be awaited first!");
14592                 }
14593                 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
14594                 // debug statements here
14595         }
14596         // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
14597         export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
14598                 if(!isWasmInitialized) {
14599                         throw new Error("initializeWasm() must be awaited first!");
14600                 }
14601                 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
14602                 return nativeResponseValue;
14603         }
14604         // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
14605         export function LockedNetworkGraph_graph(this_arg: number): number {
14606                 if(!isWasmInitialized) {
14607                         throw new Error("initializeWasm() must be awaited first!");
14608                 }
14609                 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
14610                 return nativeResponseValue;
14611         }
14612         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
14613         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
14614                 if(!isWasmInitialized) {
14615                         throw new Error("initializeWasm() must be awaited first!");
14616                 }
14617                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
14618                 return nativeResponseValue;
14619         }
14620         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
14621         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
14622                 if(!isWasmInitialized) {
14623                         throw new Error("initializeWasm() must be awaited first!");
14624                 }
14625                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
14626                 return nativeResponseValue;
14627         }
14628         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
14629         export function DirectionalChannelInfo_free(this_obj: number): void {
14630                 if(!isWasmInitialized) {
14631                         throw new Error("initializeWasm() must be awaited first!");
14632                 }
14633                 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
14634                 // debug statements here
14635         }
14636         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14637         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
14638                 if(!isWasmInitialized) {
14639                         throw new Error("initializeWasm() must be awaited first!");
14640                 }
14641                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
14642                 return nativeResponseValue;
14643         }
14644         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
14645         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
14646                 if(!isWasmInitialized) {
14647                         throw new Error("initializeWasm() must be awaited first!");
14648                 }
14649                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
14650                 // debug statements here
14651         }
14652         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14653         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
14654                 if(!isWasmInitialized) {
14655                         throw new Error("initializeWasm() must be awaited first!");
14656                 }
14657                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
14658                 return nativeResponseValue;
14659         }
14660         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
14661         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
14662                 if(!isWasmInitialized) {
14663                         throw new Error("initializeWasm() must be awaited first!");
14664                 }
14665                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
14666                 // debug statements here
14667         }
14668         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14669         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
14670                 if(!isWasmInitialized) {
14671                         throw new Error("initializeWasm() must be awaited first!");
14672                 }
14673                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
14674                 return nativeResponseValue;
14675         }
14676         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
14677         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
14678                 if(!isWasmInitialized) {
14679                         throw new Error("initializeWasm() must be awaited first!");
14680                 }
14681                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
14682                 // debug statements here
14683         }
14684         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14685         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
14686                 if(!isWasmInitialized) {
14687                         throw new Error("initializeWasm() must be awaited first!");
14688                 }
14689                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
14690                 return nativeResponseValue;
14691         }
14692         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
14693         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
14694                 if(!isWasmInitialized) {
14695                         throw new Error("initializeWasm() must be awaited first!");
14696                 }
14697                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
14698                 // debug statements here
14699         }
14700         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14701         export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
14702                 if(!isWasmInitialized) {
14703                         throw new Error("initializeWasm() must be awaited first!");
14704                 }
14705                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
14706                 return nativeResponseValue;
14707         }
14708         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
14709         export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
14710                 if(!isWasmInitialized) {
14711                         throw new Error("initializeWasm() must be awaited first!");
14712                 }
14713                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
14714                 // debug statements here
14715         }
14716         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14717         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
14718                 if(!isWasmInitialized) {
14719                         throw new Error("initializeWasm() must be awaited first!");
14720                 }
14721                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
14722                 return nativeResponseValue;
14723         }
14724         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
14725         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
14726                 if(!isWasmInitialized) {
14727                         throw new Error("initializeWasm() must be awaited first!");
14728                 }
14729                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
14730                 // debug statements here
14731         }
14732         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14733         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
14734                 if(!isWasmInitialized) {
14735                         throw new Error("initializeWasm() must be awaited first!");
14736                 }
14737                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
14738                 return nativeResponseValue;
14739         }
14740         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
14741         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
14742                 if(!isWasmInitialized) {
14743                         throw new Error("initializeWasm() must be awaited first!");
14744                 }
14745                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
14746                 // debug statements here
14747         }
14748         // 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);
14749         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 {
14750                 if(!isWasmInitialized) {
14751                         throw new Error("initializeWasm() must be awaited first!");
14752                 }
14753                 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);
14754                 return nativeResponseValue;
14755         }
14756         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
14757         export function DirectionalChannelInfo_clone(orig: number): number {
14758                 if(!isWasmInitialized) {
14759                         throw new Error("initializeWasm() must be awaited first!");
14760                 }
14761                 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
14762                 return nativeResponseValue;
14763         }
14764         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
14765         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
14766                 if(!isWasmInitialized) {
14767                         throw new Error("initializeWasm() must be awaited first!");
14768                 }
14769                 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
14770                 return decodeArray(nativeResponseValue);
14771         }
14772         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
14773         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
14774                 if(!isWasmInitialized) {
14775                         throw new Error("initializeWasm() must be awaited first!");
14776                 }
14777                 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
14778                 return nativeResponseValue;
14779         }
14780         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
14781         export function ChannelInfo_free(this_obj: number): void {
14782                 if(!isWasmInitialized) {
14783                         throw new Error("initializeWasm() must be awaited first!");
14784                 }
14785                 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
14786                 // debug statements here
14787         }
14788         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14789         export function ChannelInfo_get_features(this_ptr: number): number {
14790                 if(!isWasmInitialized) {
14791                         throw new Error("initializeWasm() must be awaited first!");
14792                 }
14793                 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
14794                 return nativeResponseValue;
14795         }
14796         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
14797         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
14798                 if(!isWasmInitialized) {
14799                         throw new Error("initializeWasm() must be awaited first!");
14800                 }
14801                 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
14802                 // debug statements here
14803         }
14804         // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14805         export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
14806                 if(!isWasmInitialized) {
14807                         throw new Error("initializeWasm() must be awaited first!");
14808                 }
14809                 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
14810                 return decodeArray(nativeResponseValue);
14811         }
14812         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14813         export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
14814                 if(!isWasmInitialized) {
14815                         throw new Error("initializeWasm() must be awaited first!");
14816                 }
14817                 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
14818                 // debug statements here
14819         }
14820         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14821         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
14822                 if(!isWasmInitialized) {
14823                         throw new Error("initializeWasm() must be awaited first!");
14824                 }
14825                 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
14826                 return nativeResponseValue;
14827         }
14828         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
14829         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
14830                 if(!isWasmInitialized) {
14831                         throw new Error("initializeWasm() must be awaited first!");
14832                 }
14833                 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
14834                 // debug statements here
14835         }
14836         // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14837         export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
14838                 if(!isWasmInitialized) {
14839                         throw new Error("initializeWasm() must be awaited first!");
14840                 }
14841                 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
14842                 return decodeArray(nativeResponseValue);
14843         }
14844         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14845         export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
14846                 if(!isWasmInitialized) {
14847                         throw new Error("initializeWasm() must be awaited first!");
14848                 }
14849                 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
14850                 // debug statements here
14851         }
14852         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14853         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
14854                 if(!isWasmInitialized) {
14855                         throw new Error("initializeWasm() must be awaited first!");
14856                 }
14857                 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
14858                 return nativeResponseValue;
14859         }
14860         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
14861         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
14862                 if(!isWasmInitialized) {
14863                         throw new Error("initializeWasm() must be awaited first!");
14864                 }
14865                 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
14866                 // debug statements here
14867         }
14868         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14869         export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
14870                 if(!isWasmInitialized) {
14871                         throw new Error("initializeWasm() must be awaited first!");
14872                 }
14873                 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
14874                 return nativeResponseValue;
14875         }
14876         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
14877         export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
14878                 if(!isWasmInitialized) {
14879                         throw new Error("initializeWasm() must be awaited first!");
14880                 }
14881                 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
14882                 // debug statements here
14883         }
14884         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14885         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
14886                 if(!isWasmInitialized) {
14887                         throw new Error("initializeWasm() must be awaited first!");
14888                 }
14889                 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
14890                 return nativeResponseValue;
14891         }
14892         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
14893         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
14894                 if(!isWasmInitialized) {
14895                         throw new Error("initializeWasm() must be awaited first!");
14896                 }
14897                 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
14898                 // debug statements here
14899         }
14900         // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKPublicKey node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKPublicKey node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
14901         export function ChannelInfo_new(features_arg: number, node_one_arg: Uint8Array, one_to_two_arg: number, node_two_arg: Uint8Array, two_to_one_arg: number, capacity_sats_arg: number, announcement_message_arg: number): number {
14902                 if(!isWasmInitialized) {
14903                         throw new Error("initializeWasm() must be awaited first!");
14904                 }
14905                 const nativeResponseValue = wasm.ChannelInfo_new(features_arg, encodeArray(node_one_arg), one_to_two_arg, encodeArray(node_two_arg), two_to_one_arg, capacity_sats_arg, announcement_message_arg);
14906                 return nativeResponseValue;
14907         }
14908         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
14909         export function ChannelInfo_clone(orig: number): number {
14910                 if(!isWasmInitialized) {
14911                         throw new Error("initializeWasm() must be awaited first!");
14912                 }
14913                 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
14914                 return nativeResponseValue;
14915         }
14916         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
14917         export function ChannelInfo_write(obj: number): Uint8Array {
14918                 if(!isWasmInitialized) {
14919                         throw new Error("initializeWasm() must be awaited first!");
14920                 }
14921                 const nativeResponseValue = wasm.ChannelInfo_write(obj);
14922                 return decodeArray(nativeResponseValue);
14923         }
14924         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
14925         export function ChannelInfo_read(ser: Uint8Array): number {
14926                 if(!isWasmInitialized) {
14927                         throw new Error("initializeWasm() must be awaited first!");
14928                 }
14929                 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
14930                 return nativeResponseValue;
14931         }
14932         // void RoutingFees_free(struct LDKRoutingFees this_obj);
14933         export function RoutingFees_free(this_obj: number): void {
14934                 if(!isWasmInitialized) {
14935                         throw new Error("initializeWasm() must be awaited first!");
14936                 }
14937                 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
14938                 // debug statements here
14939         }
14940         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
14941         export function RoutingFees_get_base_msat(this_ptr: number): number {
14942                 if(!isWasmInitialized) {
14943                         throw new Error("initializeWasm() must be awaited first!");
14944                 }
14945                 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
14946                 return nativeResponseValue;
14947         }
14948         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
14949         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
14950                 if(!isWasmInitialized) {
14951                         throw new Error("initializeWasm() must be awaited first!");
14952                 }
14953                 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
14954                 // debug statements here
14955         }
14956         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
14957         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
14958                 if(!isWasmInitialized) {
14959                         throw new Error("initializeWasm() must be awaited first!");
14960                 }
14961                 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
14962                 return nativeResponseValue;
14963         }
14964         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
14965         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
14966                 if(!isWasmInitialized) {
14967                         throw new Error("initializeWasm() must be awaited first!");
14968                 }
14969                 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
14970                 // debug statements here
14971         }
14972         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
14973         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
14974                 if(!isWasmInitialized) {
14975                         throw new Error("initializeWasm() must be awaited first!");
14976                 }
14977                 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
14978                 return nativeResponseValue;
14979         }
14980         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
14981         export function RoutingFees_eq(a: number, b: number): boolean {
14982                 if(!isWasmInitialized) {
14983                         throw new Error("initializeWasm() must be awaited first!");
14984                 }
14985                 const nativeResponseValue = wasm.RoutingFees_eq(a, b);
14986                 return nativeResponseValue;
14987         }
14988         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
14989         export function RoutingFees_clone(orig: number): number {
14990                 if(!isWasmInitialized) {
14991                         throw new Error("initializeWasm() must be awaited first!");
14992                 }
14993                 const nativeResponseValue = wasm.RoutingFees_clone(orig);
14994                 return nativeResponseValue;
14995         }
14996         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
14997         export function RoutingFees_write(obj: number): Uint8Array {
14998                 if(!isWasmInitialized) {
14999                         throw new Error("initializeWasm() must be awaited first!");
15000                 }
15001                 const nativeResponseValue = wasm.RoutingFees_write(obj);
15002                 return decodeArray(nativeResponseValue);
15003         }
15004         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
15005         export function RoutingFees_read(ser: Uint8Array): number {
15006                 if(!isWasmInitialized) {
15007                         throw new Error("initializeWasm() must be awaited first!");
15008                 }
15009                 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
15010                 return nativeResponseValue;
15011         }
15012         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
15013         export function NodeAnnouncementInfo_free(this_obj: number): void {
15014                 if(!isWasmInitialized) {
15015                         throw new Error("initializeWasm() must be awaited first!");
15016                 }
15017                 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
15018                 // debug statements here
15019         }
15020         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
15021         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
15022                 if(!isWasmInitialized) {
15023                         throw new Error("initializeWasm() must be awaited first!");
15024                 }
15025                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
15026                 return nativeResponseValue;
15027         }
15028         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
15029         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
15030                 if(!isWasmInitialized) {
15031                         throw new Error("initializeWasm() must be awaited first!");
15032                 }
15033                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
15034                 // debug statements here
15035         }
15036         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
15037         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
15038                 if(!isWasmInitialized) {
15039                         throw new Error("initializeWasm() must be awaited first!");
15040                 }
15041                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
15042                 return nativeResponseValue;
15043         }
15044         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
15045         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
15046                 if(!isWasmInitialized) {
15047                         throw new Error("initializeWasm() must be awaited first!");
15048                 }
15049                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
15050                 // debug statements here
15051         }
15052         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
15053         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
15054                 if(!isWasmInitialized) {
15055                         throw new Error("initializeWasm() must be awaited first!");
15056                 }
15057                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
15058                 return decodeArray(nativeResponseValue);
15059         }
15060         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
15061         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
15062                 if(!isWasmInitialized) {
15063                         throw new Error("initializeWasm() must be awaited first!");
15064                 }
15065                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
15066                 // debug statements here
15067         }
15068         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
15069         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
15070                 if(!isWasmInitialized) {
15071                         throw new Error("initializeWasm() must be awaited first!");
15072                 }
15073                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
15074                 return decodeArray(nativeResponseValue);
15075         }
15076         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15077         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
15078                 if(!isWasmInitialized) {
15079                         throw new Error("initializeWasm() must be awaited first!");
15080                 }
15081                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
15082                 // debug statements here
15083         }
15084         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
15085         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
15086                 if(!isWasmInitialized) {
15087                         throw new Error("initializeWasm() must be awaited first!");
15088                 }
15089                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
15090                 // debug statements here
15091         }
15092         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
15093         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
15094                 if(!isWasmInitialized) {
15095                         throw new Error("initializeWasm() must be awaited first!");
15096                 }
15097                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
15098                 return nativeResponseValue;
15099         }
15100         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
15101         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
15102                 if(!isWasmInitialized) {
15103                         throw new Error("initializeWasm() must be awaited first!");
15104                 }
15105                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
15106                 // debug statements here
15107         }
15108         // 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);
15109         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 {
15110                 if(!isWasmInitialized) {
15111                         throw new Error("initializeWasm() must be awaited first!");
15112                 }
15113                 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
15114                 return nativeResponseValue;
15115         }
15116         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
15117         export function NodeAnnouncementInfo_clone(orig: number): number {
15118                 if(!isWasmInitialized) {
15119                         throw new Error("initializeWasm() must be awaited first!");
15120                 }
15121                 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
15122                 return nativeResponseValue;
15123         }
15124         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
15125         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
15126                 if(!isWasmInitialized) {
15127                         throw new Error("initializeWasm() must be awaited first!");
15128                 }
15129                 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
15130                 return decodeArray(nativeResponseValue);
15131         }
15132         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
15133         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
15134                 if(!isWasmInitialized) {
15135                         throw new Error("initializeWasm() must be awaited first!");
15136                 }
15137                 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
15138                 return nativeResponseValue;
15139         }
15140         // void NodeInfo_free(struct LDKNodeInfo this_obj);
15141         export function NodeInfo_free(this_obj: number): void {
15142                 if(!isWasmInitialized) {
15143                         throw new Error("initializeWasm() must be awaited first!");
15144                 }
15145                 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
15146                 // debug statements here
15147         }
15148         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
15149         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
15150                 if(!isWasmInitialized) {
15151                         throw new Error("initializeWasm() must be awaited first!");
15152                 }
15153                 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
15154                 // debug statements here
15155         }
15156         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
15157         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
15158                 if(!isWasmInitialized) {
15159                         throw new Error("initializeWasm() must be awaited first!");
15160                 }
15161                 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
15162                 return nativeResponseValue;
15163         }
15164         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
15165         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
15166                 if(!isWasmInitialized) {
15167                         throw new Error("initializeWasm() must be awaited first!");
15168                 }
15169                 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
15170                 // debug statements here
15171         }
15172         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
15173         export function NodeInfo_get_announcement_info(this_ptr: number): number {
15174                 if(!isWasmInitialized) {
15175                         throw new Error("initializeWasm() must be awaited first!");
15176                 }
15177                 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
15178                 return nativeResponseValue;
15179         }
15180         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
15181         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
15182                 if(!isWasmInitialized) {
15183                         throw new Error("initializeWasm() must be awaited first!");
15184                 }
15185                 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
15186                 // debug statements here
15187         }
15188         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
15189         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
15190                 if(!isWasmInitialized) {
15191                         throw new Error("initializeWasm() must be awaited first!");
15192                 }
15193                 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
15194                 return nativeResponseValue;
15195         }
15196         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
15197         export function NodeInfo_clone(orig: number): number {
15198                 if(!isWasmInitialized) {
15199                         throw new Error("initializeWasm() must be awaited first!");
15200                 }
15201                 const nativeResponseValue = wasm.NodeInfo_clone(orig);
15202                 return nativeResponseValue;
15203         }
15204         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
15205         export function NodeInfo_write(obj: number): Uint8Array {
15206                 if(!isWasmInitialized) {
15207                         throw new Error("initializeWasm() must be awaited first!");
15208                 }
15209                 const nativeResponseValue = wasm.NodeInfo_write(obj);
15210                 return decodeArray(nativeResponseValue);
15211         }
15212         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
15213         export function NodeInfo_read(ser: Uint8Array): number {
15214                 if(!isWasmInitialized) {
15215                         throw new Error("initializeWasm() must be awaited first!");
15216                 }
15217                 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
15218                 return nativeResponseValue;
15219         }
15220         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
15221         export function NetworkGraph_write(obj: number): Uint8Array {
15222                 if(!isWasmInitialized) {
15223                         throw new Error("initializeWasm() must be awaited first!");
15224                 }
15225                 const nativeResponseValue = wasm.NetworkGraph_write(obj);
15226                 return decodeArray(nativeResponseValue);
15227         }
15228         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
15229         export function NetworkGraph_read(ser: Uint8Array): number {
15230                 if(!isWasmInitialized) {
15231                         throw new Error("initializeWasm() must be awaited first!");
15232                 }
15233                 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
15234                 return nativeResponseValue;
15235         }
15236         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
15237         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
15238                 if(!isWasmInitialized) {
15239                         throw new Error("initializeWasm() must be awaited first!");
15240                 }
15241                 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
15242                 return nativeResponseValue;
15243         }
15244         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
15245         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
15246                 if(!isWasmInitialized) {
15247                         throw new Error("initializeWasm() must be awaited first!");
15248                 }
15249                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
15250                 return nativeResponseValue;
15251         }
15252         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
15253         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
15254                 if(!isWasmInitialized) {
15255                         throw new Error("initializeWasm() must be awaited first!");
15256                 }
15257                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
15258                 return nativeResponseValue;
15259         }
15260         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKAccess *chain_access);
15261         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
15262                 if(!isWasmInitialized) {
15263                         throw new Error("initializeWasm() must be awaited first!");
15264                 }
15265                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
15266                 return nativeResponseValue;
15267         }
15268         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKAccess *chain_access);
15269         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
15270                 if(!isWasmInitialized) {
15271                         throw new Error("initializeWasm() must be awaited first!");
15272                 }
15273                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
15274                 return nativeResponseValue;
15275         }
15276         // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
15277         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
15278                 if(!isWasmInitialized) {
15279                         throw new Error("initializeWasm() must be awaited first!");
15280                 }
15281                 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
15282                 // debug statements here
15283         }
15284         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
15285         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
15286                 if(!isWasmInitialized) {
15287                         throw new Error("initializeWasm() must be awaited first!");
15288                 }
15289                 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
15290                 return nativeResponseValue;
15291         }
15292         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
15293         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
15294                 if(!isWasmInitialized) {
15295                         throw new Error("initializeWasm() must be awaited first!");
15296                 }
15297                 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
15298                 return nativeResponseValue;
15299         }
15300         // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
15301         export function FilesystemPersister_free(this_obj: number): void {
15302                 if(!isWasmInitialized) {
15303                         throw new Error("initializeWasm() must be awaited first!");
15304                 }
15305                 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
15306                 // debug statements here
15307         }
15308         // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
15309         export function FilesystemPersister_new(path_to_channel_data: String): number {
15310                 if(!isWasmInitialized) {
15311                         throw new Error("initializeWasm() must be awaited first!");
15312                 }
15313                 const nativeResponseValue = wasm.FilesystemPersister_new(path_to_channel_data);
15314                 return nativeResponseValue;
15315         }
15316         // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
15317         export function FilesystemPersister_get_data_dir(this_arg: number): String {
15318                 if(!isWasmInitialized) {
15319                         throw new Error("initializeWasm() must be awaited first!");
15320                 }
15321                 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
15322                 return nativeResponseValue;
15323         }
15324         // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
15325         export function FilesystemPersister_persist_manager(data_dir: String, manager: number): number {
15326                 if(!isWasmInitialized) {
15327                         throw new Error("initializeWasm() must be awaited first!");
15328                 }
15329                 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(data_dir, manager);
15330                 return nativeResponseValue;
15331         }
15332         // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
15333         export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
15334                 if(!isWasmInitialized) {
15335                         throw new Error("initializeWasm() must be awaited first!");
15336                 }
15337                 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
15338                 return nativeResponseValue;
15339         }
15340         // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
15341         export function FilesystemPersister_as_Persist(this_arg: number): number {
15342                 if(!isWasmInitialized) {
15343                         throw new Error("initializeWasm() must be awaited first!");
15344                 }
15345                 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
15346                 return nativeResponseValue;
15347         }
15348         // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
15349         export function BackgroundProcessor_free(this_obj: number): void {
15350                 if(!isWasmInitialized) {
15351                         throw new Error("initializeWasm() must be awaited first!");
15352                 }
15353                 const nativeResponseValue = wasm.BackgroundProcessor_free(this_obj);
15354                 // debug statements here
15355         }
15356         // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
15357         export function ChannelManagerPersister_free(this_ptr: number): void {
15358                 if(!isWasmInitialized) {
15359                         throw new Error("initializeWasm() must be awaited first!");
15360                 }
15361                 const nativeResponseValue = wasm.ChannelManagerPersister_free(this_ptr);
15362                 // debug statements here
15363         }
15364         // 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, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger);
15365         export function BackgroundProcessor_start(persister: number, event_handler: number, chain_monitor: number, channel_manager: number, peer_manager: number, logger: number): number {
15366                 if(!isWasmInitialized) {
15367                         throw new Error("initializeWasm() must be awaited first!");
15368                 }
15369                 const nativeResponseValue = wasm.BackgroundProcessor_start(persister, event_handler, chain_monitor, channel_manager, peer_manager, logger);
15370                 return nativeResponseValue;
15371         }
15372         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_join(struct LDKBackgroundProcessor this_arg);
15373         export function BackgroundProcessor_join(this_arg: number): number {
15374                 if(!isWasmInitialized) {
15375                         throw new Error("initializeWasm() must be awaited first!");
15376                 }
15377                 const nativeResponseValue = wasm.BackgroundProcessor_join(this_arg);
15378                 return nativeResponseValue;
15379         }
15380         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
15381         export function BackgroundProcessor_stop(this_arg: number): number {
15382                 if(!isWasmInitialized) {
15383                         throw new Error("initializeWasm() must be awaited first!");
15384                 }
15385                 const nativeResponseValue = wasm.BackgroundProcessor_stop(this_arg);
15386                 return nativeResponseValue;
15387         }
15388         // void check_platform(void);
15389         export function check_platform(): void {
15390                 if(!isWasmInitialized) {
15391                         throw new Error("initializeWasm() must be awaited first!");
15392                 }
15393                 const nativeResponseValue = wasm.check_platform();
15394                 // debug statements here
15395         }
15396         // void Invoice_free(struct LDKInvoice this_obj);
15397         export function Invoice_free(this_obj: number): void {
15398                 if(!isWasmInitialized) {
15399                         throw new Error("initializeWasm() must be awaited first!");
15400                 }
15401                 const nativeResponseValue = wasm.Invoice_free(this_obj);
15402                 // debug statements here
15403         }
15404         // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
15405         export function Invoice_eq(a: number, b: number): boolean {
15406                 if(!isWasmInitialized) {
15407                         throw new Error("initializeWasm() must be awaited first!");
15408                 }
15409                 const nativeResponseValue = wasm.Invoice_eq(a, b);
15410                 return nativeResponseValue;
15411         }
15412         // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
15413         export function Invoice_clone(orig: number): number {
15414                 if(!isWasmInitialized) {
15415                         throw new Error("initializeWasm() must be awaited first!");
15416                 }
15417                 const nativeResponseValue = wasm.Invoice_clone(orig);
15418                 return nativeResponseValue;
15419         }
15420         // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
15421         export function SignedRawInvoice_free(this_obj: number): void {
15422                 if(!isWasmInitialized) {
15423                         throw new Error("initializeWasm() must be awaited first!");
15424                 }
15425                 const nativeResponseValue = wasm.SignedRawInvoice_free(this_obj);
15426                 // debug statements here
15427         }
15428         // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
15429         export function SignedRawInvoice_eq(a: number, b: number): boolean {
15430                 if(!isWasmInitialized) {
15431                         throw new Error("initializeWasm() must be awaited first!");
15432                 }
15433                 const nativeResponseValue = wasm.SignedRawInvoice_eq(a, b);
15434                 return nativeResponseValue;
15435         }
15436         // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
15437         export function SignedRawInvoice_clone(orig: number): number {
15438                 if(!isWasmInitialized) {
15439                         throw new Error("initializeWasm() must be awaited first!");
15440                 }
15441                 const nativeResponseValue = wasm.SignedRawInvoice_clone(orig);
15442                 return nativeResponseValue;
15443         }
15444         // void RawInvoice_free(struct LDKRawInvoice this_obj);
15445         export function RawInvoice_free(this_obj: number): void {
15446                 if(!isWasmInitialized) {
15447                         throw new Error("initializeWasm() must be awaited first!");
15448                 }
15449                 const nativeResponseValue = wasm.RawInvoice_free(this_obj);
15450                 // debug statements here
15451         }
15452         // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
15453         export function RawInvoice_get_data(this_ptr: number): number {
15454                 if(!isWasmInitialized) {
15455                         throw new Error("initializeWasm() must be awaited first!");
15456                 }
15457                 const nativeResponseValue = wasm.RawInvoice_get_data(this_ptr);
15458                 return nativeResponseValue;
15459         }
15460         // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
15461         export function RawInvoice_set_data(this_ptr: number, val: number): void {
15462                 if(!isWasmInitialized) {
15463                         throw new Error("initializeWasm() must be awaited first!");
15464                 }
15465                 const nativeResponseValue = wasm.RawInvoice_set_data(this_ptr, val);
15466                 // debug statements here
15467         }
15468         // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
15469         export function RawInvoice_eq(a: number, b: number): boolean {
15470                 if(!isWasmInitialized) {
15471                         throw new Error("initializeWasm() must be awaited first!");
15472                 }
15473                 const nativeResponseValue = wasm.RawInvoice_eq(a, b);
15474                 return nativeResponseValue;
15475         }
15476         // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
15477         export function RawInvoice_clone(orig: number): number {
15478                 if(!isWasmInitialized) {
15479                         throw new Error("initializeWasm() must be awaited first!");
15480                 }
15481                 const nativeResponseValue = wasm.RawInvoice_clone(orig);
15482                 return nativeResponseValue;
15483         }
15484         // void RawDataPart_free(struct LDKRawDataPart this_obj);
15485         export function RawDataPart_free(this_obj: number): void {
15486                 if(!isWasmInitialized) {
15487                         throw new Error("initializeWasm() must be awaited first!");
15488                 }
15489                 const nativeResponseValue = wasm.RawDataPart_free(this_obj);
15490                 // debug statements here
15491         }
15492         // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
15493         export function RawDataPart_get_timestamp(this_ptr: number): number {
15494                 if(!isWasmInitialized) {
15495                         throw new Error("initializeWasm() must be awaited first!");
15496                 }
15497                 const nativeResponseValue = wasm.RawDataPart_get_timestamp(this_ptr);
15498                 return nativeResponseValue;
15499         }
15500         // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
15501         export function RawDataPart_set_timestamp(this_ptr: number, val: number): void {
15502                 if(!isWasmInitialized) {
15503                         throw new Error("initializeWasm() must be awaited first!");
15504                 }
15505                 const nativeResponseValue = wasm.RawDataPart_set_timestamp(this_ptr, val);
15506                 // debug statements here
15507         }
15508         // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
15509         export function RawDataPart_eq(a: number, b: number): boolean {
15510                 if(!isWasmInitialized) {
15511                         throw new Error("initializeWasm() must be awaited first!");
15512                 }
15513                 const nativeResponseValue = wasm.RawDataPart_eq(a, b);
15514                 return nativeResponseValue;
15515         }
15516         // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
15517         export function RawDataPart_clone(orig: number): number {
15518                 if(!isWasmInitialized) {
15519                         throw new Error("initializeWasm() must be awaited first!");
15520                 }
15521                 const nativeResponseValue = wasm.RawDataPart_clone(orig);
15522                 return nativeResponseValue;
15523         }
15524         // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
15525         export function PositiveTimestamp_free(this_obj: number): void {
15526                 if(!isWasmInitialized) {
15527                         throw new Error("initializeWasm() must be awaited first!");
15528                 }
15529                 const nativeResponseValue = wasm.PositiveTimestamp_free(this_obj);
15530                 // debug statements here
15531         }
15532         // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
15533         export function PositiveTimestamp_eq(a: number, b: number): boolean {
15534                 if(!isWasmInitialized) {
15535                         throw new Error("initializeWasm() must be awaited first!");
15536                 }
15537                 const nativeResponseValue = wasm.PositiveTimestamp_eq(a, b);
15538                 return nativeResponseValue;
15539         }
15540         // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
15541         export function PositiveTimestamp_clone(orig: number): number {
15542                 if(!isWasmInitialized) {
15543                         throw new Error("initializeWasm() must be awaited first!");
15544                 }
15545                 const nativeResponseValue = wasm.PositiveTimestamp_clone(orig);
15546                 return nativeResponseValue;
15547         }
15548         // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
15549         export function SiPrefix_clone(orig: number): SiPrefix {
15550                 if(!isWasmInitialized) {
15551                         throw new Error("initializeWasm() must be awaited first!");
15552                 }
15553                 const nativeResponseValue = wasm.SiPrefix_clone(orig);
15554                 return nativeResponseValue;
15555         }
15556         // enum LDKSiPrefix SiPrefix_milli(void);
15557         export function SiPrefix_milli(): SiPrefix {
15558                 if(!isWasmInitialized) {
15559                         throw new Error("initializeWasm() must be awaited first!");
15560                 }
15561                 const nativeResponseValue = wasm.SiPrefix_milli();
15562                 return nativeResponseValue;
15563         }
15564         // enum LDKSiPrefix SiPrefix_micro(void);
15565         export function SiPrefix_micro(): SiPrefix {
15566                 if(!isWasmInitialized) {
15567                         throw new Error("initializeWasm() must be awaited first!");
15568                 }
15569                 const nativeResponseValue = wasm.SiPrefix_micro();
15570                 return nativeResponseValue;
15571         }
15572         // enum LDKSiPrefix SiPrefix_nano(void);
15573         export function SiPrefix_nano(): SiPrefix {
15574                 if(!isWasmInitialized) {
15575                         throw new Error("initializeWasm() must be awaited first!");
15576                 }
15577                 const nativeResponseValue = wasm.SiPrefix_nano();
15578                 return nativeResponseValue;
15579         }
15580         // enum LDKSiPrefix SiPrefix_pico(void);
15581         export function SiPrefix_pico(): SiPrefix {
15582                 if(!isWasmInitialized) {
15583                         throw new Error("initializeWasm() must be awaited first!");
15584                 }
15585                 const nativeResponseValue = wasm.SiPrefix_pico();
15586                 return nativeResponseValue;
15587         }
15588         // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
15589         export function SiPrefix_eq(a: number, b: number): boolean {
15590                 if(!isWasmInitialized) {
15591                         throw new Error("initializeWasm() must be awaited first!");
15592                 }
15593                 const nativeResponseValue = wasm.SiPrefix_eq(a, b);
15594                 return nativeResponseValue;
15595         }
15596         // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
15597         export function SiPrefix_multiplier(this_arg: number): number {
15598                 if(!isWasmInitialized) {
15599                         throw new Error("initializeWasm() must be awaited first!");
15600                 }
15601                 const nativeResponseValue = wasm.SiPrefix_multiplier(this_arg);
15602                 return nativeResponseValue;
15603         }
15604         // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
15605         export function Currency_clone(orig: number): Currency {
15606                 if(!isWasmInitialized) {
15607                         throw new Error("initializeWasm() must be awaited first!");
15608                 }
15609                 const nativeResponseValue = wasm.Currency_clone(orig);
15610                 return nativeResponseValue;
15611         }
15612         // enum LDKCurrency Currency_bitcoin(void);
15613         export function Currency_bitcoin(): Currency {
15614                 if(!isWasmInitialized) {
15615                         throw new Error("initializeWasm() must be awaited first!");
15616                 }
15617                 const nativeResponseValue = wasm.Currency_bitcoin();
15618                 return nativeResponseValue;
15619         }
15620         // enum LDKCurrency Currency_bitcoin_testnet(void);
15621         export function Currency_bitcoin_testnet(): Currency {
15622                 if(!isWasmInitialized) {
15623                         throw new Error("initializeWasm() must be awaited first!");
15624                 }
15625                 const nativeResponseValue = wasm.Currency_bitcoin_testnet();
15626                 return nativeResponseValue;
15627         }
15628         // enum LDKCurrency Currency_regtest(void);
15629         export function Currency_regtest(): Currency {
15630                 if(!isWasmInitialized) {
15631                         throw new Error("initializeWasm() must be awaited first!");
15632                 }
15633                 const nativeResponseValue = wasm.Currency_regtest();
15634                 return nativeResponseValue;
15635         }
15636         // enum LDKCurrency Currency_simnet(void);
15637         export function Currency_simnet(): Currency {
15638                 if(!isWasmInitialized) {
15639                         throw new Error("initializeWasm() must be awaited first!");
15640                 }
15641                 const nativeResponseValue = wasm.Currency_simnet();
15642                 return nativeResponseValue;
15643         }
15644         // enum LDKCurrency Currency_signet(void);
15645         export function Currency_signet(): Currency {
15646                 if(!isWasmInitialized) {
15647                         throw new Error("initializeWasm() must be awaited first!");
15648                 }
15649                 const nativeResponseValue = wasm.Currency_signet();
15650                 return nativeResponseValue;
15651         }
15652         // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
15653         export function Currency_eq(a: number, b: number): boolean {
15654                 if(!isWasmInitialized) {
15655                         throw new Error("initializeWasm() must be awaited first!");
15656                 }
15657                 const nativeResponseValue = wasm.Currency_eq(a, b);
15658                 return nativeResponseValue;
15659         }
15660         // void Sha256_free(struct LDKSha256 this_obj);
15661         export function Sha256_free(this_obj: number): void {
15662                 if(!isWasmInitialized) {
15663                         throw new Error("initializeWasm() must be awaited first!");
15664                 }
15665                 const nativeResponseValue = wasm.Sha256_free(this_obj);
15666                 // debug statements here
15667         }
15668         // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
15669         export function Sha256_eq(a: number, b: number): boolean {
15670                 if(!isWasmInitialized) {
15671                         throw new Error("initializeWasm() must be awaited first!");
15672                 }
15673                 const nativeResponseValue = wasm.Sha256_eq(a, b);
15674                 return nativeResponseValue;
15675         }
15676         // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
15677         export function Sha256_clone(orig: number): number {
15678                 if(!isWasmInitialized) {
15679                         throw new Error("initializeWasm() must be awaited first!");
15680                 }
15681                 const nativeResponseValue = wasm.Sha256_clone(orig);
15682                 return nativeResponseValue;
15683         }
15684         // void Description_free(struct LDKDescription this_obj);
15685         export function Description_free(this_obj: number): void {
15686                 if(!isWasmInitialized) {
15687                         throw new Error("initializeWasm() must be awaited first!");
15688                 }
15689                 const nativeResponseValue = wasm.Description_free(this_obj);
15690                 // debug statements here
15691         }
15692         // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
15693         export function Description_eq(a: number, b: number): boolean {
15694                 if(!isWasmInitialized) {
15695                         throw new Error("initializeWasm() must be awaited first!");
15696                 }
15697                 const nativeResponseValue = wasm.Description_eq(a, b);
15698                 return nativeResponseValue;
15699         }
15700         // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
15701         export function Description_clone(orig: number): number {
15702                 if(!isWasmInitialized) {
15703                         throw new Error("initializeWasm() must be awaited first!");
15704                 }
15705                 const nativeResponseValue = wasm.Description_clone(orig);
15706                 return nativeResponseValue;
15707         }
15708         // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
15709         export function PayeePubKey_free(this_obj: number): void {
15710                 if(!isWasmInitialized) {
15711                         throw new Error("initializeWasm() must be awaited first!");
15712                 }
15713                 const nativeResponseValue = wasm.PayeePubKey_free(this_obj);
15714                 // debug statements here
15715         }
15716         // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
15717         export function PayeePubKey_eq(a: number, b: number): boolean {
15718                 if(!isWasmInitialized) {
15719                         throw new Error("initializeWasm() must be awaited first!");
15720                 }
15721                 const nativeResponseValue = wasm.PayeePubKey_eq(a, b);
15722                 return nativeResponseValue;
15723         }
15724         // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
15725         export function PayeePubKey_clone(orig: number): number {
15726                 if(!isWasmInitialized) {
15727                         throw new Error("initializeWasm() must be awaited first!");
15728                 }
15729                 const nativeResponseValue = wasm.PayeePubKey_clone(orig);
15730                 return nativeResponseValue;
15731         }
15732         // void ExpiryTime_free(struct LDKExpiryTime this_obj);
15733         export function ExpiryTime_free(this_obj: number): void {
15734                 if(!isWasmInitialized) {
15735                         throw new Error("initializeWasm() must be awaited first!");
15736                 }
15737                 const nativeResponseValue = wasm.ExpiryTime_free(this_obj);
15738                 // debug statements here
15739         }
15740         // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
15741         export function ExpiryTime_eq(a: number, b: number): boolean {
15742                 if(!isWasmInitialized) {
15743                         throw new Error("initializeWasm() must be awaited first!");
15744                 }
15745                 const nativeResponseValue = wasm.ExpiryTime_eq(a, b);
15746                 return nativeResponseValue;
15747         }
15748         // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
15749         export function ExpiryTime_clone(orig: number): number {
15750                 if(!isWasmInitialized) {
15751                         throw new Error("initializeWasm() must be awaited first!");
15752                 }
15753                 const nativeResponseValue = wasm.ExpiryTime_clone(orig);
15754                 return nativeResponseValue;
15755         }
15756         // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
15757         export function MinFinalCltvExpiry_free(this_obj: number): void {
15758                 if(!isWasmInitialized) {
15759                         throw new Error("initializeWasm() must be awaited first!");
15760                 }
15761                 const nativeResponseValue = wasm.MinFinalCltvExpiry_free(this_obj);
15762                 // debug statements here
15763         }
15764         // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
15765         export function MinFinalCltvExpiry_eq(a: number, b: number): boolean {
15766                 if(!isWasmInitialized) {
15767                         throw new Error("initializeWasm() must be awaited first!");
15768                 }
15769                 const nativeResponseValue = wasm.MinFinalCltvExpiry_eq(a, b);
15770                 return nativeResponseValue;
15771         }
15772         // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
15773         export function MinFinalCltvExpiry_clone(orig: number): number {
15774                 if(!isWasmInitialized) {
15775                         throw new Error("initializeWasm() must be awaited first!");
15776                 }
15777                 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone(orig);
15778                 return nativeResponseValue;
15779         }
15780         // void Fallback_free(struct LDKFallback this_ptr);
15781         export function Fallback_free(this_ptr: number): void {
15782                 if(!isWasmInitialized) {
15783                         throw new Error("initializeWasm() must be awaited first!");
15784                 }
15785                 const nativeResponseValue = wasm.Fallback_free(this_ptr);
15786                 // debug statements here
15787         }
15788         // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
15789         export function Fallback_clone(orig: number): number {
15790                 if(!isWasmInitialized) {
15791                         throw new Error("initializeWasm() must be awaited first!");
15792                 }
15793                 const nativeResponseValue = wasm.Fallback_clone(orig);
15794                 return nativeResponseValue;
15795         }
15796         // struct LDKFallback Fallback_seg_wit_program(struct LDKu5 version, struct LDKCVec_u8Z program);
15797         export function Fallback_seg_wit_program(version: number, program: Uint8Array): number {
15798                 if(!isWasmInitialized) {
15799                         throw new Error("initializeWasm() must be awaited first!");
15800                 }
15801                 const nativeResponseValue = wasm.Fallback_seg_wit_program(version, encodeArray(program));
15802                 return nativeResponseValue;
15803         }
15804         // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
15805         export function Fallback_pub_key_hash(a: Uint8Array): number {
15806                 if(!isWasmInitialized) {
15807                         throw new Error("initializeWasm() must be awaited first!");
15808                 }
15809                 const nativeResponseValue = wasm.Fallback_pub_key_hash(encodeArray(a));
15810                 return nativeResponseValue;
15811         }
15812         // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
15813         export function Fallback_script_hash(a: Uint8Array): number {
15814                 if(!isWasmInitialized) {
15815                         throw new Error("initializeWasm() must be awaited first!");
15816                 }
15817                 const nativeResponseValue = wasm.Fallback_script_hash(encodeArray(a));
15818                 return nativeResponseValue;
15819         }
15820         // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
15821         export function Fallback_eq(a: number, b: number): boolean {
15822                 if(!isWasmInitialized) {
15823                         throw new Error("initializeWasm() must be awaited first!");
15824                 }
15825                 const nativeResponseValue = wasm.Fallback_eq(a, b);
15826                 return nativeResponseValue;
15827         }
15828         // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
15829         export function InvoiceSignature_free(this_obj: number): void {
15830                 if(!isWasmInitialized) {
15831                         throw new Error("initializeWasm() must be awaited first!");
15832                 }
15833                 const nativeResponseValue = wasm.InvoiceSignature_free(this_obj);
15834                 // debug statements here
15835         }
15836         // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
15837         export function InvoiceSignature_eq(a: number, b: number): boolean {
15838                 if(!isWasmInitialized) {
15839                         throw new Error("initializeWasm() must be awaited first!");
15840                 }
15841                 const nativeResponseValue = wasm.InvoiceSignature_eq(a, b);
15842                 return nativeResponseValue;
15843         }
15844         // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
15845         export function InvoiceSignature_clone(orig: number): number {
15846                 if(!isWasmInitialized) {
15847                         throw new Error("initializeWasm() must be awaited first!");
15848                 }
15849                 const nativeResponseValue = wasm.InvoiceSignature_clone(orig);
15850                 return nativeResponseValue;
15851         }
15852         // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
15853         export function PrivateRoute_free(this_obj: number): void {
15854                 if(!isWasmInitialized) {
15855                         throw new Error("initializeWasm() must be awaited first!");
15856                 }
15857                 const nativeResponseValue = wasm.PrivateRoute_free(this_obj);
15858                 // debug statements here
15859         }
15860         // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
15861         export function PrivateRoute_eq(a: number, b: number): boolean {
15862                 if(!isWasmInitialized) {
15863                         throw new Error("initializeWasm() must be awaited first!");
15864                 }
15865                 const nativeResponseValue = wasm.PrivateRoute_eq(a, b);
15866                 return nativeResponseValue;
15867         }
15868         // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
15869         export function PrivateRoute_clone(orig: number): number {
15870                 if(!isWasmInitialized) {
15871                         throw new Error("initializeWasm() must be awaited first!");
15872                 }
15873                 const nativeResponseValue = wasm.PrivateRoute_clone(orig);
15874                 return nativeResponseValue;
15875         }
15876         // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
15877         export function SignedRawInvoice_into_parts(this_arg: number): number {
15878                 if(!isWasmInitialized) {
15879                         throw new Error("initializeWasm() must be awaited first!");
15880                 }
15881                 const nativeResponseValue = wasm.SignedRawInvoice_into_parts(this_arg);
15882                 return nativeResponseValue;
15883         }
15884         // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
15885         export function SignedRawInvoice_raw_invoice(this_arg: number): number {
15886                 if(!isWasmInitialized) {
15887                         throw new Error("initializeWasm() must be awaited first!");
15888                 }
15889                 const nativeResponseValue = wasm.SignedRawInvoice_raw_invoice(this_arg);
15890                 return nativeResponseValue;
15891         }
15892         // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
15893         export function SignedRawInvoice_hash(this_arg: number): Uint8Array {
15894                 if(!isWasmInitialized) {
15895                         throw new Error("initializeWasm() must be awaited first!");
15896                 }
15897                 const nativeResponseValue = wasm.SignedRawInvoice_hash(this_arg);
15898                 return decodeArray(nativeResponseValue);
15899         }
15900         // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
15901         export function SignedRawInvoice_signature(this_arg: number): number {
15902                 if(!isWasmInitialized) {
15903                         throw new Error("initializeWasm() must be awaited first!");
15904                 }
15905                 const nativeResponseValue = wasm.SignedRawInvoice_signature(this_arg);
15906                 return nativeResponseValue;
15907         }
15908         // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
15909         export function SignedRawInvoice_recover_payee_pub_key(this_arg: number): number {
15910                 if(!isWasmInitialized) {
15911                         throw new Error("initializeWasm() must be awaited first!");
15912                 }
15913                 const nativeResponseValue = wasm.SignedRawInvoice_recover_payee_pub_key(this_arg);
15914                 return nativeResponseValue;
15915         }
15916         // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
15917         export function SignedRawInvoice_check_signature(this_arg: number): boolean {
15918                 if(!isWasmInitialized) {
15919                         throw new Error("initializeWasm() must be awaited first!");
15920                 }
15921                 const nativeResponseValue = wasm.SignedRawInvoice_check_signature(this_arg);
15922                 return nativeResponseValue;
15923         }
15924         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15925         export function RawInvoice_hash(this_arg: number): Uint8Array {
15926                 if(!isWasmInitialized) {
15927                         throw new Error("initializeWasm() must be awaited first!");
15928                 }
15929                 const nativeResponseValue = wasm.RawInvoice_hash(this_arg);
15930                 return decodeArray(nativeResponseValue);
15931         }
15932         // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15933         export function RawInvoice_payment_hash(this_arg: number): number {
15934                 if(!isWasmInitialized) {
15935                         throw new Error("initializeWasm() must be awaited first!");
15936                 }
15937                 const nativeResponseValue = wasm.RawInvoice_payment_hash(this_arg);
15938                 return nativeResponseValue;
15939         }
15940         // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15941         export function RawInvoice_description(this_arg: number): number {
15942                 if(!isWasmInitialized) {
15943                         throw new Error("initializeWasm() must be awaited first!");
15944                 }
15945                 const nativeResponseValue = wasm.RawInvoice_description(this_arg);
15946                 return nativeResponseValue;
15947         }
15948         // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15949         export function RawInvoice_payee_pub_key(this_arg: number): number {
15950                 if(!isWasmInitialized) {
15951                         throw new Error("initializeWasm() must be awaited first!");
15952                 }
15953                 const nativeResponseValue = wasm.RawInvoice_payee_pub_key(this_arg);
15954                 return nativeResponseValue;
15955         }
15956         // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15957         export function RawInvoice_description_hash(this_arg: number): number {
15958                 if(!isWasmInitialized) {
15959                         throw new Error("initializeWasm() must be awaited first!");
15960                 }
15961                 const nativeResponseValue = wasm.RawInvoice_description_hash(this_arg);
15962                 return nativeResponseValue;
15963         }
15964         // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15965         export function RawInvoice_expiry_time(this_arg: number): number {
15966                 if(!isWasmInitialized) {
15967                         throw new Error("initializeWasm() must be awaited first!");
15968                 }
15969                 const nativeResponseValue = wasm.RawInvoice_expiry_time(this_arg);
15970                 return nativeResponseValue;
15971         }
15972         // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15973         export function RawInvoice_min_final_cltv_expiry(this_arg: number): number {
15974                 if(!isWasmInitialized) {
15975                         throw new Error("initializeWasm() must be awaited first!");
15976                 }
15977                 const nativeResponseValue = wasm.RawInvoice_min_final_cltv_expiry(this_arg);
15978                 return nativeResponseValue;
15979         }
15980         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15981         export function RawInvoice_payment_secret(this_arg: number): Uint8Array {
15982                 if(!isWasmInitialized) {
15983                         throw new Error("initializeWasm() must be awaited first!");
15984                 }
15985                 const nativeResponseValue = wasm.RawInvoice_payment_secret(this_arg);
15986                 return decodeArray(nativeResponseValue);
15987         }
15988         // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15989         export function RawInvoice_features(this_arg: number): number {
15990                 if(!isWasmInitialized) {
15991                         throw new Error("initializeWasm() must be awaited first!");
15992                 }
15993                 const nativeResponseValue = wasm.RawInvoice_features(this_arg);
15994                 return nativeResponseValue;
15995         }
15996         // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15997         export function RawInvoice_private_routes(this_arg: number): number[] {
15998                 if(!isWasmInitialized) {
15999                         throw new Error("initializeWasm() must be awaited first!");
16000                 }
16001                 const nativeResponseValue = wasm.RawInvoice_private_routes(this_arg);
16002                 return nativeResponseValue;
16003         }
16004         // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
16005         export function RawInvoice_amount_pico_btc(this_arg: number): number {
16006                 if(!isWasmInitialized) {
16007                         throw new Error("initializeWasm() must be awaited first!");
16008                 }
16009                 const nativeResponseValue = wasm.RawInvoice_amount_pico_btc(this_arg);
16010                 return nativeResponseValue;
16011         }
16012         // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
16013         export function RawInvoice_currency(this_arg: number): Currency {
16014                 if(!isWasmInitialized) {
16015                         throw new Error("initializeWasm() must be awaited first!");
16016                 }
16017                 const nativeResponseValue = wasm.RawInvoice_currency(this_arg);
16018                 return nativeResponseValue;
16019         }
16020         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
16021         export function PositiveTimestamp_from_unix_timestamp(unix_seconds: number): number {
16022                 if(!isWasmInitialized) {
16023                         throw new Error("initializeWasm() must be awaited first!");
16024                 }
16025                 const nativeResponseValue = wasm.PositiveTimestamp_from_unix_timestamp(unix_seconds);
16026                 return nativeResponseValue;
16027         }
16028         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
16029         export function PositiveTimestamp_from_system_time(time: number): number {
16030                 if(!isWasmInitialized) {
16031                         throw new Error("initializeWasm() must be awaited first!");
16032                 }
16033                 const nativeResponseValue = wasm.PositiveTimestamp_from_system_time(time);
16034                 return nativeResponseValue;
16035         }
16036         // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
16037         export function PositiveTimestamp_as_unix_timestamp(this_arg: number): number {
16038                 if(!isWasmInitialized) {
16039                         throw new Error("initializeWasm() must be awaited first!");
16040                 }
16041                 const nativeResponseValue = wasm.PositiveTimestamp_as_unix_timestamp(this_arg);
16042                 return nativeResponseValue;
16043         }
16044         // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
16045         export function PositiveTimestamp_as_time(this_arg: number): number {
16046                 if(!isWasmInitialized) {
16047                         throw new Error("initializeWasm() must be awaited first!");
16048                 }
16049                 const nativeResponseValue = wasm.PositiveTimestamp_as_time(this_arg);
16050                 return nativeResponseValue;
16051         }
16052         // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
16053         export function Invoice_into_signed_raw(this_arg: number): number {
16054                 if(!isWasmInitialized) {
16055                         throw new Error("initializeWasm() must be awaited first!");
16056                 }
16057                 const nativeResponseValue = wasm.Invoice_into_signed_raw(this_arg);
16058                 return nativeResponseValue;
16059         }
16060         // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
16061         export function Invoice_check_signature(this_arg: number): number {
16062                 if(!isWasmInitialized) {
16063                         throw new Error("initializeWasm() must be awaited first!");
16064                 }
16065                 const nativeResponseValue = wasm.Invoice_check_signature(this_arg);
16066                 return nativeResponseValue;
16067         }
16068         // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
16069         export function Invoice_from_signed(signed_invoice: number): number {
16070                 if(!isWasmInitialized) {
16071                         throw new Error("initializeWasm() must be awaited first!");
16072                 }
16073                 const nativeResponseValue = wasm.Invoice_from_signed(signed_invoice);
16074                 return nativeResponseValue;
16075         }
16076         // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
16077         export function Invoice_timestamp(this_arg: number): number {
16078                 if(!isWasmInitialized) {
16079                         throw new Error("initializeWasm() must be awaited first!");
16080                 }
16081                 const nativeResponseValue = wasm.Invoice_timestamp(this_arg);
16082                 return nativeResponseValue;
16083         }
16084         // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
16085         export function Invoice_payment_hash(this_arg: number): Uint8Array {
16086                 if(!isWasmInitialized) {
16087                         throw new Error("initializeWasm() must be awaited first!");
16088                 }
16089                 const nativeResponseValue = wasm.Invoice_payment_hash(this_arg);
16090                 return decodeArray(nativeResponseValue);
16091         }
16092         // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
16093         export function Invoice_payee_pub_key(this_arg: number): Uint8Array {
16094                 if(!isWasmInitialized) {
16095                         throw new Error("initializeWasm() must be awaited first!");
16096                 }
16097                 const nativeResponseValue = wasm.Invoice_payee_pub_key(this_arg);
16098                 return decodeArray(nativeResponseValue);
16099         }
16100         // MUST_USE_RES struct LDKThirtyTwoBytes Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg);
16101         export function Invoice_payment_secret(this_arg: number): Uint8Array {
16102                 if(!isWasmInitialized) {
16103                         throw new Error("initializeWasm() must be awaited first!");
16104                 }
16105                 const nativeResponseValue = wasm.Invoice_payment_secret(this_arg);
16106                 return decodeArray(nativeResponseValue);
16107         }
16108         // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
16109         export function Invoice_features(this_arg: number): number {
16110                 if(!isWasmInitialized) {
16111                         throw new Error("initializeWasm() must be awaited first!");
16112                 }
16113                 const nativeResponseValue = wasm.Invoice_features(this_arg);
16114                 return nativeResponseValue;
16115         }
16116         // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
16117         export function Invoice_recover_payee_pub_key(this_arg: number): Uint8Array {
16118                 if(!isWasmInitialized) {
16119                         throw new Error("initializeWasm() must be awaited first!");
16120                 }
16121                 const nativeResponseValue = wasm.Invoice_recover_payee_pub_key(this_arg);
16122                 return decodeArray(nativeResponseValue);
16123         }
16124         // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
16125         export function Invoice_expiry_time(this_arg: number): number {
16126                 if(!isWasmInitialized) {
16127                         throw new Error("initializeWasm() must be awaited first!");
16128                 }
16129                 const nativeResponseValue = wasm.Invoice_expiry_time(this_arg);
16130                 return nativeResponseValue;
16131         }
16132         // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
16133         export function Invoice_min_final_cltv_expiry(this_arg: number): number {
16134                 if(!isWasmInitialized) {
16135                         throw new Error("initializeWasm() must be awaited first!");
16136                 }
16137                 const nativeResponseValue = wasm.Invoice_min_final_cltv_expiry(this_arg);
16138                 return nativeResponseValue;
16139         }
16140         // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
16141         export function Invoice_private_routes(this_arg: number): number[] {
16142                 if(!isWasmInitialized) {
16143                         throw new Error("initializeWasm() must be awaited first!");
16144                 }
16145                 const nativeResponseValue = wasm.Invoice_private_routes(this_arg);
16146                 return nativeResponseValue;
16147         }
16148         // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
16149         export function Invoice_route_hints(this_arg: number): number[] {
16150                 if(!isWasmInitialized) {
16151                         throw new Error("initializeWasm() must be awaited first!");
16152                 }
16153                 const nativeResponseValue = wasm.Invoice_route_hints(this_arg);
16154                 return nativeResponseValue;
16155         }
16156         // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
16157         export function Invoice_currency(this_arg: number): Currency {
16158                 if(!isWasmInitialized) {
16159                         throw new Error("initializeWasm() must be awaited first!");
16160                 }
16161                 const nativeResponseValue = wasm.Invoice_currency(this_arg);
16162                 return nativeResponseValue;
16163         }
16164         // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_pico_btc(const struct LDKInvoice *NONNULL_PTR this_arg);
16165         export function Invoice_amount_pico_btc(this_arg: number): number {
16166                 if(!isWasmInitialized) {
16167                         throw new Error("initializeWasm() must be awaited first!");
16168                 }
16169                 const nativeResponseValue = wasm.Invoice_amount_pico_btc(this_arg);
16170                 return nativeResponseValue;
16171         }
16172         // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
16173         export function Description_new(description: String): number {
16174                 if(!isWasmInitialized) {
16175                         throw new Error("initializeWasm() must be awaited first!");
16176                 }
16177                 const nativeResponseValue = wasm.Description_new(description);
16178                 return nativeResponseValue;
16179         }
16180         // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
16181         export function Description_into_inner(this_arg: number): String {
16182                 if(!isWasmInitialized) {
16183                         throw new Error("initializeWasm() must be awaited first!");
16184                 }
16185                 const nativeResponseValue = wasm.Description_into_inner(this_arg);
16186                 return nativeResponseValue;
16187         }
16188         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
16189         export function ExpiryTime_from_seconds(seconds: number): number {
16190                 if(!isWasmInitialized) {
16191                         throw new Error("initializeWasm() must be awaited first!");
16192                 }
16193                 const nativeResponseValue = wasm.ExpiryTime_from_seconds(seconds);
16194                 return nativeResponseValue;
16195         }
16196         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
16197         export function ExpiryTime_from_duration(duration: number): number {
16198                 if(!isWasmInitialized) {
16199                         throw new Error("initializeWasm() must be awaited first!");
16200                 }
16201                 const nativeResponseValue = wasm.ExpiryTime_from_duration(duration);
16202                 return nativeResponseValue;
16203         }
16204         // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
16205         export function ExpiryTime_as_seconds(this_arg: number): number {
16206                 if(!isWasmInitialized) {
16207                         throw new Error("initializeWasm() must be awaited first!");
16208                 }
16209                 const nativeResponseValue = wasm.ExpiryTime_as_seconds(this_arg);
16210                 return nativeResponseValue;
16211         }
16212         // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
16213         export function ExpiryTime_as_duration(this_arg: number): number {
16214                 if(!isWasmInitialized) {
16215                         throw new Error("initializeWasm() must be awaited first!");
16216                 }
16217                 const nativeResponseValue = wasm.ExpiryTime_as_duration(this_arg);
16218                 return nativeResponseValue;
16219         }
16220         // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
16221         export function PrivateRoute_new(hops: number): number {
16222                 if(!isWasmInitialized) {
16223                         throw new Error("initializeWasm() must be awaited first!");
16224                 }
16225                 const nativeResponseValue = wasm.PrivateRoute_new(hops);
16226                 return nativeResponseValue;
16227         }
16228         // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
16229         export function PrivateRoute_into_inner(this_arg: number): number {
16230                 if(!isWasmInitialized) {
16231                         throw new Error("initializeWasm() must be awaited first!");
16232                 }
16233                 const nativeResponseValue = wasm.PrivateRoute_into_inner(this_arg);
16234                 return nativeResponseValue;
16235         }
16236         // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
16237         export function CreationError_clone(orig: number): CreationError {
16238                 if(!isWasmInitialized) {
16239                         throw new Error("initializeWasm() must be awaited first!");
16240                 }
16241                 const nativeResponseValue = wasm.CreationError_clone(orig);
16242                 return nativeResponseValue;
16243         }
16244         // enum LDKCreationError CreationError_description_too_long(void);
16245         export function CreationError_description_too_long(): CreationError {
16246                 if(!isWasmInitialized) {
16247                         throw new Error("initializeWasm() must be awaited first!");
16248                 }
16249                 const nativeResponseValue = wasm.CreationError_description_too_long();
16250                 return nativeResponseValue;
16251         }
16252         // enum LDKCreationError CreationError_route_too_long(void);
16253         export function CreationError_route_too_long(): CreationError {
16254                 if(!isWasmInitialized) {
16255                         throw new Error("initializeWasm() must be awaited first!");
16256                 }
16257                 const nativeResponseValue = wasm.CreationError_route_too_long();
16258                 return nativeResponseValue;
16259         }
16260         // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
16261         export function CreationError_timestamp_out_of_bounds(): CreationError {
16262                 if(!isWasmInitialized) {
16263                         throw new Error("initializeWasm() must be awaited first!");
16264                 }
16265                 const nativeResponseValue = wasm.CreationError_timestamp_out_of_bounds();
16266                 return nativeResponseValue;
16267         }
16268         // enum LDKCreationError CreationError_expiry_time_out_of_bounds(void);
16269         export function CreationError_expiry_time_out_of_bounds(): CreationError {
16270                 if(!isWasmInitialized) {
16271                         throw new Error("initializeWasm() must be awaited first!");
16272                 }
16273                 const nativeResponseValue = wasm.CreationError_expiry_time_out_of_bounds();
16274                 return nativeResponseValue;
16275         }
16276         // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
16277         export function CreationError_eq(a: number, b: number): boolean {
16278                 if(!isWasmInitialized) {
16279                         throw new Error("initializeWasm() must be awaited first!");
16280                 }
16281                 const nativeResponseValue = wasm.CreationError_eq(a, b);
16282                 return nativeResponseValue;
16283         }
16284         // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
16285         export function CreationError_to_str(o: number): String {
16286                 if(!isWasmInitialized) {
16287                         throw new Error("initializeWasm() must be awaited first!");
16288                 }
16289                 const nativeResponseValue = wasm.CreationError_to_str(o);
16290                 return nativeResponseValue;
16291         }
16292         // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
16293         export function SemanticError_clone(orig: number): SemanticError {
16294                 if(!isWasmInitialized) {
16295                         throw new Error("initializeWasm() must be awaited first!");
16296                 }
16297                 const nativeResponseValue = wasm.SemanticError_clone(orig);
16298                 return nativeResponseValue;
16299         }
16300         // enum LDKSemanticError SemanticError_no_payment_hash(void);
16301         export function SemanticError_no_payment_hash(): SemanticError {
16302                 if(!isWasmInitialized) {
16303                         throw new Error("initializeWasm() must be awaited first!");
16304                 }
16305                 const nativeResponseValue = wasm.SemanticError_no_payment_hash();
16306                 return nativeResponseValue;
16307         }
16308         // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
16309         export function SemanticError_multiple_payment_hashes(): SemanticError {
16310                 if(!isWasmInitialized) {
16311                         throw new Error("initializeWasm() must be awaited first!");
16312                 }
16313                 const nativeResponseValue = wasm.SemanticError_multiple_payment_hashes();
16314                 return nativeResponseValue;
16315         }
16316         // enum LDKSemanticError SemanticError_no_description(void);
16317         export function SemanticError_no_description(): SemanticError {
16318                 if(!isWasmInitialized) {
16319                         throw new Error("initializeWasm() must be awaited first!");
16320                 }
16321                 const nativeResponseValue = wasm.SemanticError_no_description();
16322                 return nativeResponseValue;
16323         }
16324         // enum LDKSemanticError SemanticError_multiple_descriptions(void);
16325         export function SemanticError_multiple_descriptions(): SemanticError {
16326                 if(!isWasmInitialized) {
16327                         throw new Error("initializeWasm() must be awaited first!");
16328                 }
16329                 const nativeResponseValue = wasm.SemanticError_multiple_descriptions();
16330                 return nativeResponseValue;
16331         }
16332         // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
16333         export function SemanticError_multiple_payment_secrets(): SemanticError {
16334                 if(!isWasmInitialized) {
16335                         throw new Error("initializeWasm() must be awaited first!");
16336                 }
16337                 const nativeResponseValue = wasm.SemanticError_multiple_payment_secrets();
16338                 return nativeResponseValue;
16339         }
16340         // enum LDKSemanticError SemanticError_invalid_features(void);
16341         export function SemanticError_invalid_features(): SemanticError {
16342                 if(!isWasmInitialized) {
16343                         throw new Error("initializeWasm() must be awaited first!");
16344                 }
16345                 const nativeResponseValue = wasm.SemanticError_invalid_features();
16346                 return nativeResponseValue;
16347         }
16348         // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
16349         export function SemanticError_invalid_recovery_id(): SemanticError {
16350                 if(!isWasmInitialized) {
16351                         throw new Error("initializeWasm() must be awaited first!");
16352                 }
16353                 const nativeResponseValue = wasm.SemanticError_invalid_recovery_id();
16354                 return nativeResponseValue;
16355         }
16356         // enum LDKSemanticError SemanticError_invalid_signature(void);
16357         export function SemanticError_invalid_signature(): SemanticError {
16358                 if(!isWasmInitialized) {
16359                         throw new Error("initializeWasm() must be awaited first!");
16360                 }
16361                 const nativeResponseValue = wasm.SemanticError_invalid_signature();
16362                 return nativeResponseValue;
16363         }
16364         // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
16365         export function SemanticError_eq(a: number, b: number): boolean {
16366                 if(!isWasmInitialized) {
16367                         throw new Error("initializeWasm() must be awaited first!");
16368                 }
16369                 const nativeResponseValue = wasm.SemanticError_eq(a, b);
16370                 return nativeResponseValue;
16371         }
16372         // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
16373         export function SemanticError_to_str(o: number): String {
16374                 if(!isWasmInitialized) {
16375                         throw new Error("initializeWasm() must be awaited first!");
16376                 }
16377                 const nativeResponseValue = wasm.SemanticError_to_str(o);
16378                 return nativeResponseValue;
16379         }
16380         // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
16381         export function SignOrCreationError_free(this_ptr: number): void {
16382                 if(!isWasmInitialized) {
16383                         throw new Error("initializeWasm() must be awaited first!");
16384                 }
16385                 const nativeResponseValue = wasm.SignOrCreationError_free(this_ptr);
16386                 // debug statements here
16387         }
16388         // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
16389         export function SignOrCreationError_clone(orig: number): number {
16390                 if(!isWasmInitialized) {
16391                         throw new Error("initializeWasm() must be awaited first!");
16392                 }
16393                 const nativeResponseValue = wasm.SignOrCreationError_clone(orig);
16394                 return nativeResponseValue;
16395         }
16396         // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
16397         export function SignOrCreationError_sign_error(): number {
16398                 if(!isWasmInitialized) {
16399                         throw new Error("initializeWasm() must be awaited first!");
16400                 }
16401                 const nativeResponseValue = wasm.SignOrCreationError_sign_error();
16402                 return nativeResponseValue;
16403         }
16404         // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
16405         export function SignOrCreationError_creation_error(a: CreationError): number {
16406                 if(!isWasmInitialized) {
16407                         throw new Error("initializeWasm() must be awaited first!");
16408                 }
16409                 const nativeResponseValue = wasm.SignOrCreationError_creation_error(a);
16410                 return nativeResponseValue;
16411         }
16412         // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
16413         export function SignOrCreationError_eq(a: number, b: number): boolean {
16414                 if(!isWasmInitialized) {
16415                         throw new Error("initializeWasm() must be awaited first!");
16416                 }
16417                 const nativeResponseValue = wasm.SignOrCreationError_eq(a, b);
16418                 return nativeResponseValue;
16419         }
16420         // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
16421         export function SignOrCreationError_to_str(o: number): String {
16422                 if(!isWasmInitialized) {
16423                         throw new Error("initializeWasm() must be awaited first!");
16424                 }
16425                 const nativeResponseValue = wasm.SignOrCreationError_to_str(o);
16426                 return nativeResponseValue;
16427         }
16428         // 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);
16429         export function create_invoice_from_channelmanager(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description: String): number {
16430                 if(!isWasmInitialized) {
16431                         throw new Error("initializeWasm() must be awaited first!");
16432                 }
16433                 const nativeResponseValue = wasm.create_invoice_from_channelmanager(channelmanager, keys_manager, network, amt_msat, description);
16434                 return nativeResponseValue;
16435         }
16436         // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
16437         export function SiPrefix_from_str(s: String): number {
16438                 if(!isWasmInitialized) {
16439                         throw new Error("initializeWasm() must be awaited first!");
16440                 }
16441                 const nativeResponseValue = wasm.SiPrefix_from_str(s);
16442                 return nativeResponseValue;
16443         }
16444         // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
16445         export function Invoice_from_str(s: String): number {
16446                 if(!isWasmInitialized) {
16447                         throw new Error("initializeWasm() must be awaited first!");
16448                 }
16449                 const nativeResponseValue = wasm.Invoice_from_str(s);
16450                 return nativeResponseValue;
16451         }
16452         // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
16453         export function SignedRawInvoice_from_str(s: String): number {
16454                 if(!isWasmInitialized) {
16455                         throw new Error("initializeWasm() must be awaited first!");
16456                 }
16457                 const nativeResponseValue = wasm.SignedRawInvoice_from_str(s);
16458                 return nativeResponseValue;
16459         }
16460         // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
16461         export function Invoice_to_str(o: number): String {
16462                 if(!isWasmInitialized) {
16463                         throw new Error("initializeWasm() must be awaited first!");
16464                 }
16465                 const nativeResponseValue = wasm.Invoice_to_str(o);
16466                 return nativeResponseValue;
16467         }
16468         // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
16469         export function SignedRawInvoice_to_str(o: number): String {
16470                 if(!isWasmInitialized) {
16471                         throw new Error("initializeWasm() must be awaited first!");
16472                 }
16473                 const nativeResponseValue = wasm.SignedRawInvoice_to_str(o);
16474                 return nativeResponseValue;
16475         }
16476         // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
16477         export function Currency_to_str(o: number): String {
16478                 if(!isWasmInitialized) {
16479                         throw new Error("initializeWasm() must be awaited first!");
16480                 }
16481                 const nativeResponseValue = wasm.Currency_to_str(o);
16482                 return nativeResponseValue;
16483         }
16484         // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
16485         export function SiPrefix_to_str(o: number): String {
16486                 if(!isWasmInitialized) {
16487                         throw new Error("initializeWasm() must be awaited first!");
16488                 }
16489                 const nativeResponseValue = wasm.SiPrefix_to_str(o);
16490                 return nativeResponseValue;
16491         }
16492
16493         export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
16494             if(isWasmInitialized && !allowDoubleInitialization) {
16495                 return;
16496             }
16497             const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
16498             wasm = wasmInstance.exports;
16499             isWasmInitialized = true;
16500         }
16501