Merge pull request #45 from TheBlueMatt/main
[ldk-java] / ts / bindings.ts
1
2 import * as fs from 'fs';
3 const source = fs.readFileSync('./ldk.wasm');
4
5 const memory = new WebAssembly.Memory({initial: 256});
6 const wasmModule = new WebAssembly.Module(source);
7
8 const imports: any = {};
9 imports.env = {};
10
11 imports.env.memoryBase = 0;
12 imports.env.memory = memory;
13 imports.env.tableBase = 0;
14 imports.env.table = new WebAssembly.Table({initial: 4, element: 'anyfunc'});
15
16 imports.env["abort"] = function () {
17     console.error("ABORT");
18 };
19
20 let wasm = null;
21 let isWasmInitialized: boolean = false;
22
23
24 // WASM CODEC
25
26 const nextMultipleOfFour = (value: number) => {
27     return Math.ceil(value / 4) * 4;
28 }
29
30 const encodeUint8Array = (inputArray) => {
31         const cArrayPointer = wasm.TS_malloc(inputArray.length + 4);
32         const arrayLengthView = new Uint32Array(memory.buffer, cArrayPointer, 1);
33     arrayLengthView[0] = inputArray.length;
34         const arrayMemoryView = new Uint8Array(memory.buffer, cArrayPointer + 4, inputArray.length);
35         arrayMemoryView.set(inputArray);
36         return cArrayPointer;
37 }
38
39 const encodeUint32Array = (inputArray) => {
40         const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 4);
41         const arrayMemoryView = new Uint32Array(memory.buffer, cArrayPointer, inputArray.length);
42         arrayMemoryView.set(inputArray, 1);
43     arrayMemoryView[0] = inputArray.length;
44         return cArrayPointer;
45 }
46
47 const getArrayLength = (arrayPointer) => {
48         const arraySizeViewer = new Uint32Array(
49                 memory.buffer, // value
50                 arrayPointer, // offset
51                 1 // one int
52         );
53         return arraySizeViewer[0];
54 }
55 const decodeUint8Array = (arrayPointer, free = true) => {
56         const arraySize = getArrayLength(arrayPointer);
57         const actualArrayViewer = new Uint8Array(
58                 memory.buffer, // value
59                 arrayPointer + 4, // offset (ignoring length bytes)
60                 arraySize // uint8 count
61         );
62         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
63         // will free the underlying memory when it becomes unreachable instead of copying here.
64         const actualArray = actualArrayViewer.slice(0, arraySize);
65         if (free) {
66                 wasm.TS_free(arrayPointer);
67         }
68         return actualArray;
69 }
70 const decodeUint32Array = (arrayPointer, free = true) => {
71         const arraySize = getArrayLength(arrayPointer);
72         const actualArrayViewer = new Uint32Array(
73                 memory.buffer, // value
74                 arrayPointer + 4, // offset (ignoring length bytes)
75                 arraySize // uint32 count
76         );
77         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
78         // will free the underlying memory when it becomes unreachable instead of copying here.
79         const actualArray = actualArrayViewer.slice(0, arraySize);
80         if (free) {
81                 wasm.TS_free(arrayPointer);
82         }
83         return actualArray;
84 }
85
86 const encodeString = (string) => {
87     // make malloc count divisible by 4
88     const memoryNeed = nextMultipleOfFour(string.length + 1);
89     const stringPointer = wasm.TS_malloc(memoryNeed);
90     const stringMemoryView = new Uint8Array(
91         memory.buffer, // value
92         stringPointer, // offset
93         string.length + 1 // length
94     );
95     for (let i = 0; i < string.length; i++) {
96         stringMemoryView[i] = string.charCodeAt(i);
97     }
98     stringMemoryView[string.length] = 0;
99     return stringPointer;
100 }
101
102 const decodeString = (stringPointer, free = true) => {
103     const memoryView = new Uint8Array(memory.buffer, stringPointer);
104     let cursor = 0;
105     let result = '';
106
107     while (memoryView[cursor] !== 0) {
108         result += String.fromCharCode(memoryView[cursor]);
109         cursor++;
110     }
111
112     if (free) {
113         wasm.wasm_free(stringPointer);
114     }
115
116     return result;
117 };
118
119 export class VecOrSliceDef {
120     public dataptr: number;
121     public datalen: number;
122     public stride: number;
123     public constructor(dataptr: number, datalen: number, stride: number) {
124         this.dataptr = dataptr;
125         this.datalen = datalen;
126         this.stride = stride;
127     }
128 }
129
130 /*
131 TODO: load WASM file
132 static {
133     System.loadLibrary("lightningjni");
134     init(java.lang.Enum.class, VecOrSliceDef.class);
135     init_class_cache();
136 }
137
138 static native void init(java.lang.Class c, java.lang.Class slicedef);
139 static native void init_class_cache();
140
141 public static native boolean deref_bool(long ptr);
142 public static native long deref_long(long ptr);
143 public static native void free_heap_ptr(long ptr);
144 public static native byte[] read_bytes(long ptr, long len);
145 public static native byte[] get_u8_slice_bytes(long slice_ptr);
146 public static native long bytes_to_u8_vec(byte[] bytes);
147 public static native long new_txpointer_copy_data(byte[] txdata);
148 public static native void txpointer_free(long ptr);
149 public static native byte[] txpointer_get_buffer(long ptr);
150 public static native long vec_slice_len(long vec);
151 public static native long new_empty_slice_vec();
152 */
153
154         public static native long LDKCVec_u8Z_new(number[] elems);
155         // struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing)
156         export function TxOut_get_script_pubkey(thing: number): Uint8Array {
157                 if(!isWasmInitialized) {
158                         throw new Error("initializeWasm() must be awaited first!");
159                 }
160                 const nativeResponseValue = wasm.TxOut_get_script_pubkey(thing);
161                 return decodeArray(nativeResponseValue);
162         }
163         // uint64_t TxOut_get_value (struct LDKTxOut* thing)
164         export function TxOut_get_value(thing: number): number {
165                 if(!isWasmInitialized) {
166                         throw new Error("initializeWasm() must be awaited first!");
167                 }
168                 const nativeResponseValue = wasm.TxOut_get_value(thing);
169                 return nativeResponseValue;
170         }
171         public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
172         public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
173         public static native Secp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
174         public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
175         public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
176         public static native Secp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
177         public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
178         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
179         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
180         public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
181         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
182         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
183         public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
184         public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
185         public static native Secp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
186         public static class LDKCOption_u32Z {
187                 private LDKCOption_u32Z() {}
188                 export class Some extends LDKCOption_u32Z {
189                         public number some;
190                         Some(number some) { this.some = some; }
191                 }
192                 export class None extends LDKCOption_u32Z {
193                         None() { }
194                 }
195                 static native void init();
196         }
197         static { LDKCOption_u32Z.init(); }
198         public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
199         public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
200         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
201         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
202         public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
203         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
204         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
205         public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
206         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
207         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
208         public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
209         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
210         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
211         public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
212         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
213         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
214         public static native boolean LDKCResult_TrustedClosingTransactionNoneZ_result_ok(long arg);
215         public static native number LDKCResult_TrustedClosingTransactionNoneZ_get_ok(long arg);
216         public static native void LDKCResult_TrustedClosingTransactionNoneZ_get_err(long arg);
217         public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
218         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
219         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
220         public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
221         public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
222         public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
223         public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
224         public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
225         public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
226         public static native boolean LDKCResult_ShutdownScriptDecodeErrorZ_result_ok(long arg);
227         public static native number LDKCResult_ShutdownScriptDecodeErrorZ_get_ok(long arg);
228         public static native number LDKCResult_ShutdownScriptDecodeErrorZ_get_err(long arg);
229         public static native boolean LDKCResult_ShutdownScriptInvalidShutdownScriptZ_result_ok(long arg);
230         public static native number LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(long arg);
231         public static native number LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_err(long arg);
232         public static native boolean LDKCResult_NoneErrorZ_result_ok(long arg);
233         public static native void LDKCResult_NoneErrorZ_get_ok(long arg);
234         public static native IOError LDKCResult_NoneErrorZ_get_err(long arg);
235         public static native boolean LDKCResult_RouteHopDecodeErrorZ_result_ok(long arg);
236         public static native number LDKCResult_RouteHopDecodeErrorZ_get_ok(long arg);
237         public static native number LDKCResult_RouteHopDecodeErrorZ_get_err(long arg);
238         public static native long LDKCVec_RouteHopZ_new(number[] elems);
239         public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
240         public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
241         public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
242         public static class LDKCOption_u64Z {
243                 private LDKCOption_u64Z() {}
244                 export class Some extends LDKCOption_u64Z {
245                         public number some;
246                         Some(number some) { this.some = some; }
247                 }
248                 export class None extends LDKCOption_u64Z {
249                         None() { }
250                 }
251                 static native void init();
252         }
253         static { LDKCOption_u64Z.init(); }
254         public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
255         public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
256         public static native long LDKCVec_RouteHintZ_new(number[] elems);
257         public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
258         public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
259         public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
260         public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
261         public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
262         public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
263         public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
264         public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
265         public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
266         public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
267         public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
268         public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
269         public static native ChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
270         public static class LDKMonitorEvent {
271                 private LDKMonitorEvent() {}
272                 export class HTLCEvent extends LDKMonitorEvent {
273                         public number htlc_event;
274                         HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
275                 }
276                 export class CommitmentTxConfirmed extends LDKMonitorEvent {
277                         public number commitment_tx_confirmed;
278                         CommitmentTxConfirmed(number commitment_tx_confirmed) { this.commitment_tx_confirmed = commitment_tx_confirmed; }
279                 }
280                 static native void init();
281         }
282         static { LDKMonitorEvent.init(); }
283         public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
284         public static native long LDKCVec_MonitorEventZ_new(number[] elems);
285         public static class LDKCOption_C2Tuple_usizeTransactionZZ {
286                 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
287                 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
288                         public number some;
289                         Some(number some) { this.some = some; }
290                 }
291                 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
292                         None() { }
293                 }
294                 static native void init();
295         }
296         static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
297         public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
298         public static class LDKNetworkUpdate {
299                 private LDKNetworkUpdate() {}
300                 export class ChannelUpdateMessage extends LDKNetworkUpdate {
301                         public number msg;
302                         ChannelUpdateMessage(number msg) { this.msg = msg; }
303                 }
304                 export class ChannelClosed extends LDKNetworkUpdate {
305                         public number short_channel_id;
306                         public boolean is_permanent;
307                         ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
308                 }
309                 export class NodeFailure extends LDKNetworkUpdate {
310                         public Uint8Array node_id;
311                         public boolean is_permanent;
312                         NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
313                 }
314                 static native void init();
315         }
316         static { LDKNetworkUpdate.init(); }
317         public static native LDKNetworkUpdate LDKNetworkUpdate_ref_from_ptr(long ptr);
318         public static class LDKCOption_NetworkUpdateZ {
319                 private LDKCOption_NetworkUpdateZ() {}
320                 export class Some extends LDKCOption_NetworkUpdateZ {
321                         public number some;
322                         Some(number some) { this.some = some; }
323                 }
324                 export class None extends LDKCOption_NetworkUpdateZ {
325                         None() { }
326                 }
327                 static native void init();
328         }
329         static { LDKCOption_NetworkUpdateZ.init(); }
330         public static native LDKCOption_NetworkUpdateZ LDKCOption_NetworkUpdateZ_ref_from_ptr(long ptr);
331         public static class LDKSpendableOutputDescriptor {
332                 private LDKSpendableOutputDescriptor() {}
333                 export class StaticOutput extends LDKSpendableOutputDescriptor {
334                         public number outpoint;
335                         public number output;
336                         StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
337                 }
338                 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
339                         public number delayed_payment_output;
340                         DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
341                 }
342                 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
343                         public number static_payment_output;
344                         StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
345                 }
346                 static native void init();
347         }
348         static { LDKSpendableOutputDescriptor.init(); }
349         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
350         public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
351         public static class LDKErrorAction {
352                 private LDKErrorAction() {}
353                 export class DisconnectPeer extends LDKErrorAction {
354                         public number msg;
355                         DisconnectPeer(number msg) { this.msg = msg; }
356                 }
357                 export class IgnoreError extends LDKErrorAction {
358                         IgnoreError() { }
359                 }
360                 export class IgnoreAndLog extends LDKErrorAction {
361                         public Level ignore_and_log;
362                         IgnoreAndLog(Level ignore_and_log) { this.ignore_and_log = ignore_and_log; }
363                 }
364                 export class SendErrorMessage extends LDKErrorAction {
365                         public number msg;
366                         SendErrorMessage(number msg) { this.msg = msg; }
367                 }
368                 static native void init();
369         }
370         static { LDKErrorAction.init(); }
371         public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
372         public static class LDKMessageSendEvent {
373                 private LDKMessageSendEvent() {}
374                 export class SendAcceptChannel extends LDKMessageSendEvent {
375                         public Uint8Array node_id;
376                         public number msg;
377                         SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
378                 }
379                 export class SendOpenChannel extends LDKMessageSendEvent {
380                         public Uint8Array node_id;
381                         public number msg;
382                         SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
383                 }
384                 export class SendFundingCreated extends LDKMessageSendEvent {
385                         public Uint8Array node_id;
386                         public number msg;
387                         SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
388                 }
389                 export class SendFundingSigned extends LDKMessageSendEvent {
390                         public Uint8Array node_id;
391                         public number msg;
392                         SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
393                 }
394                 export class SendFundingLocked extends LDKMessageSendEvent {
395                         public Uint8Array node_id;
396                         public number msg;
397                         SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
398                 }
399                 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
400                         public Uint8Array node_id;
401                         public number msg;
402                         SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
403                 }
404                 export class UpdateHTLCs extends LDKMessageSendEvent {
405                         public Uint8Array node_id;
406                         public number updates;
407                         UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
408                 }
409                 export class SendRevokeAndACK extends LDKMessageSendEvent {
410                         public Uint8Array node_id;
411                         public number msg;
412                         SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
413                 }
414                 export class SendClosingSigned extends LDKMessageSendEvent {
415                         public Uint8Array node_id;
416                         public number msg;
417                         SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
418                 }
419                 export class SendShutdown extends LDKMessageSendEvent {
420                         public Uint8Array node_id;
421                         public number msg;
422                         SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
423                 }
424                 export class SendChannelReestablish extends LDKMessageSendEvent {
425                         public Uint8Array node_id;
426                         public number msg;
427                         SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
428                 }
429                 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
430                         public number msg;
431                         public number update_msg;
432                         BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
433                 }
434                 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
435                         public number msg;
436                         BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
437                 }
438                 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
439                         public number msg;
440                         BroadcastChannelUpdate(number msg) { this.msg = msg; }
441                 }
442                 export class SendChannelUpdate extends LDKMessageSendEvent {
443                         public Uint8Array node_id;
444                         public number msg;
445                         SendChannelUpdate(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
446                 }
447                 export class HandleError extends LDKMessageSendEvent {
448                         public Uint8Array node_id;
449                         public number action;
450                         HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
451                 }
452                 export class SendChannelRangeQuery extends LDKMessageSendEvent {
453                         public Uint8Array node_id;
454                         public number msg;
455                         SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
456                 }
457                 export class SendShortIdsQuery extends LDKMessageSendEvent {
458                         public Uint8Array node_id;
459                         public number msg;
460                         SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
461                 }
462                 export class SendReplyChannelRange extends LDKMessageSendEvent {
463                         public Uint8Array node_id;
464                         public number msg;
465                         SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
466                 }
467                 static native void init();
468         }
469         static { LDKMessageSendEvent.init(); }
470         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
471         public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
472         public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
473         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
474         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
475         public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
476         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
477         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
478         public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
479         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
480         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
481         public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
482         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
483         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
484         public static native boolean LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
485         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
486         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
487         public static native boolean LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
488         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
489         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
490         public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
491         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
492         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
493         public static native boolean LDKCResult_NoneNoneZ_result_ok(long arg);
494         public static native void LDKCResult_NoneNoneZ_get_ok(long arg);
495         public static native void LDKCResult_NoneNoneZ_get_err(long arg);
496         public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
497         public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
498         public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
499         public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
500         public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
501         public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
502         public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
503         public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
504         public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
505
506
507
508 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
509
510                 export interface LDKBaseSign {
511                         get_per_commitment_point (idx: number): Uint8Array;
512                         release_commitment_secret (idx: number): Uint8Array;
513                         validate_holder_commitment (holder_tx: number): number;
514                         channel_keys_id (): Uint8Array;
515                         sign_counterparty_commitment (commitment_tx: number): number;
516                         validate_counterparty_revocation (idx: number, secret: Uint8Array): number;
517                         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
518                         sign_justice_revoked_output (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number;
519                         sign_justice_revoked_htlc (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
520                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
521                         sign_closing_transaction (closing_tx: number): number;
522                         sign_channel_announcement (msg: number): number;
523                         ready_channel (channel_parameters: number): void;
524                 }
525
526                 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
527             throw new Error('unimplemented'); // TODO: bind to WASM
528         }
529
530 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
531
532
533         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
534         export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
535                 if(!isWasmInitialized) {
536                         throw new Error("initializeWasm() must be awaited first!");
537                 }
538                 const nativeResponseValue = wasm.BaseSign_get_per_commitment_point(this_arg, idx);
539                 return decodeArray(nativeResponseValue);
540         }
541         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
542         export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
543                 if(!isWasmInitialized) {
544                         throw new Error("initializeWasm() must be awaited first!");
545                 }
546                 const nativeResponseValue = wasm.BaseSign_release_commitment_secret(this_arg, idx);
547                 return decodeArray(nativeResponseValue);
548         }
549         // LDKCResult_NoneNoneZ BaseSign_validate_holder_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx
550         export function BaseSign_validate_holder_commitment(this_arg: number, holder_tx: number): number {
551                 if(!isWasmInitialized) {
552                         throw new Error("initializeWasm() must be awaited first!");
553                 }
554                 const nativeResponseValue = wasm.BaseSign_validate_holder_commitment(this_arg, holder_tx);
555                 return nativeResponseValue;
556         }
557         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
558         export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
559                 if(!isWasmInitialized) {
560                         throw new Error("initializeWasm() must be awaited first!");
561                 }
562                 const nativeResponseValue = wasm.BaseSign_channel_keys_id(this_arg);
563                 return decodeArray(nativeResponseValue);
564         }
565         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
566         export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
567                 if(!isWasmInitialized) {
568                         throw new Error("initializeWasm() must be awaited first!");
569                 }
570                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
571                 return nativeResponseValue;
572         }
573         // LDKCResult_NoneNoneZ BaseSign_validate_counterparty_revocation LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx, const uint8_t (*secret)[32]
574         export function BaseSign_validate_counterparty_revocation(this_arg: number, idx: number, secret: Uint8Array): number {
575                 if(!isWasmInitialized) {
576                         throw new Error("initializeWasm() must be awaited first!");
577                 }
578                 const nativeResponseValue = wasm.BaseSign_validate_counterparty_revocation(this_arg, idx, encodeArray(secret));
579                 return nativeResponseValue;
580         }
581         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
582         export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
583                 if(!isWasmInitialized) {
584                         throw new Error("initializeWasm() must be awaited first!");
585                 }
586                 const nativeResponseValue = wasm.BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
587                 return nativeResponseValue;
588         }
589         // 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]
590         export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number {
591                 if(!isWasmInitialized) {
592                         throw new Error("initializeWasm() must be awaited first!");
593                 }
594                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_output(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key));
595                 return nativeResponseValue;
596         }
597         // 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
598         export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
599                 if(!isWasmInitialized) {
600                         throw new Error("initializeWasm() must be awaited first!");
601                 }
602                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_htlc(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
603                 return nativeResponseValue;
604         }
605         // 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
606         export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
607                 if(!isWasmInitialized) {
608                         throw new Error("initializeWasm() must be awaited first!");
609                 }
610                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
611                 return nativeResponseValue;
612         }
613         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
614         export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: number): number {
615                 if(!isWasmInitialized) {
616                         throw new Error("initializeWasm() must be awaited first!");
617                 }
618                 const nativeResponseValue = wasm.BaseSign_sign_closing_transaction(this_arg, closing_tx);
619                 return nativeResponseValue;
620         }
621         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
622         export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
623                 if(!isWasmInitialized) {
624                         throw new Error("initializeWasm() must be awaited first!");
625                 }
626                 const nativeResponseValue = wasm.BaseSign_sign_channel_announcement(this_arg, msg);
627                 return nativeResponseValue;
628         }
629         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
630         export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
631                 if(!isWasmInitialized) {
632                         throw new Error("initializeWasm() must be awaited first!");
633                 }
634                 const nativeResponseValue = wasm.BaseSign_ready_channel(this_arg, channel_parameters);
635                 // debug statements here
636         }
637         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
638         export function BaseSign_get_pubkeys(this_arg: number): number {
639                 if(!isWasmInitialized) {
640                         throw new Error("initializeWasm() must be awaited first!");
641                 }
642                 const nativeResponseValue = wasm.BaseSign_get_pubkeys(this_arg);
643                 return nativeResponseValue;
644         }
645
646
647
648 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
649
650                 export interface LDKSign {
651                         write (): Uint8Array;
652                 }
653
654                 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
655             throw new Error('unimplemented'); // TODO: bind to WASM
656         }
657
658 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
659
660
661         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
662         export function Sign_write(this_arg: number): Uint8Array {
663                 if(!isWasmInitialized) {
664                         throw new Error("initializeWasm() must be awaited first!");
665                 }
666                 const nativeResponseValue = wasm.Sign_write(this_arg);
667                 return decodeArray(nativeResponseValue);
668         }
669         public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
670         public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
671         public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
672         public static native boolean LDKCResult_RecoverableSignatureNoneZ_result_ok(long arg);
673         public static native Uint8Array LDKCResult_RecoverableSignatureNoneZ_get_ok(long arg);
674         public static native void LDKCResult_RecoverableSignatureNoneZ_get_err(long arg);
675         public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
676         public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
677         public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
678         public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
679         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
680         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
681         public static native long LDKCVec_TxOutZ_new(number[] elems);
682         public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
683         public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
684         public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
685         public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
686         public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
687         public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
688         public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(number[] elems);
689         public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
690         public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
691         public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
692         public static class LDKCOption_u16Z {
693                 private LDKCOption_u16Z() {}
694                 export class Some extends LDKCOption_u16Z {
695                         public number some;
696                         Some(number some) { this.some = some; }
697                 }
698                 export class None extends LDKCOption_u16Z {
699                         None() { }
700                 }
701                 static native void init();
702         }
703         static { LDKCOption_u16Z.init(); }
704         public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
705         public static class LDKAPIError {
706                 private LDKAPIError() {}
707                 export class APIMisuseError extends LDKAPIError {
708                         public String err;
709                         APIMisuseError(String err) { this.err = err; }
710                 }
711                 export class FeeRateTooHigh extends LDKAPIError {
712                         public String err;
713                         public number feerate;
714                         FeeRateTooHigh(String err, number feerate) { this.err = err; this.feerate = feerate; }
715                 }
716                 export class RouteError extends LDKAPIError {
717                         public String err;
718                         RouteError(String err) { this.err = err; }
719                 }
720                 export class ChannelUnavailable extends LDKAPIError {
721                         public String err;
722                         ChannelUnavailable(String err) { this.err = err; }
723                 }
724                 export class MonitorUpdateFailed extends LDKAPIError {
725                         MonitorUpdateFailed() { }
726                 }
727                 export class IncompatibleShutdownScript extends LDKAPIError {
728                         public number script;
729                         IncompatibleShutdownScript(number script) { this.script = script; }
730                 }
731                 static native void init();
732         }
733         static { LDKAPIError.init(); }
734         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
735         public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
736         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
737         public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
738         public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
739         public static native long LDKCVec_APIErrorZ_new(number[] elems);
740         public static class LDKPaymentSendFailure {
741                 private LDKPaymentSendFailure() {}
742                 export class ParameterError extends LDKPaymentSendFailure {
743                         public number parameter_error;
744                         ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
745                 }
746                 export class PathParameterError extends LDKPaymentSendFailure {
747                         public number[] path_parameter_error;
748                         PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
749                 }
750                 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
751                         public number[] all_failed_retry_safe;
752                         AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
753                 }
754                 export class PartialFailure extends LDKPaymentSendFailure {
755                         public number[] partial_failure;
756                         PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
757                 }
758                 static native void init();
759         }
760         static { LDKPaymentSendFailure.init(); }
761         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
762         public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
763         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
764         public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
765         public static native boolean LDKCResult_PaymentHashPaymentSendFailureZ_result_ok(long arg);
766         public static native Uint8Array LDKCResult_PaymentHashPaymentSendFailureZ_get_ok(long arg);
767         public static native number LDKCResult_PaymentHashPaymentSendFailureZ_get_err(long arg);
768         public static class LDKNetAddress {
769                 private LDKNetAddress() {}
770                 export class IPv4 extends LDKNetAddress {
771                         public Uint8Array addr;
772                         public number port;
773                         IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
774                 }
775                 export class IPv6 extends LDKNetAddress {
776                         public Uint8Array addr;
777                         public number port;
778                         IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
779                 }
780                 export class OnionV2 extends LDKNetAddress {
781                         public Uint8Array addr;
782                         public number port;
783                         OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
784                 }
785                 export class OnionV3 extends LDKNetAddress {
786                         public Uint8Array ed25519_pubkey;
787                         public number checksum;
788                         public number version;
789                         public number port;
790                         OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
791                 }
792                 static native void init();
793         }
794         static { LDKNetAddress.init(); }
795         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
796         public static native long LDKCVec_NetAddressZ_new(number[] elems);
797         public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(Uint8Array a, Uint8Array b);
798         public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(long ptr);
799         public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(long ptr);
800         public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
801         public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
802         public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
803         public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
804
805
806
807 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
808
809                 export interface LDKWatch {
810                         watch_channel (funding_txo: number, monitor: number): number;
811                         update_channel (funding_txo: number, update: number): number;
812                         release_pending_monitor_events (): number[];
813                 }
814
815                 export function LDKWatch_new(impl: LDKWatch): number {
816             throw new Error('unimplemented'); // TODO: bind to WASM
817         }
818
819 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
820
821
822         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
823         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
824                 if(!isWasmInitialized) {
825                         throw new Error("initializeWasm() must be awaited first!");
826                 }
827                 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
828                 return nativeResponseValue;
829         }
830         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
831         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
832                 if(!isWasmInitialized) {
833                         throw new Error("initializeWasm() must be awaited first!");
834                 }
835                 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
836                 return nativeResponseValue;
837         }
838         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
839         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
840                 if(!isWasmInitialized) {
841                         throw new Error("initializeWasm() must be awaited first!");
842                 }
843                 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
844                 return nativeResponseValue;
845         }
846
847
848
849 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
850
851                 export interface LDKBroadcasterInterface {
852                         broadcast_transaction (tx: Uint8Array): void;
853                 }
854
855                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
856             throw new Error('unimplemented'); // TODO: bind to WASM
857         }
858
859 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
860
861
862         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
863         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
864                 if(!isWasmInitialized) {
865                         throw new Error("initializeWasm() must be awaited first!");
866                 }
867                 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
868                 // debug statements here
869         }
870
871
872
873 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
874
875                 export interface LDKKeysInterface {
876                         get_node_secret (): Uint8Array;
877                         get_destination_script (): Uint8Array;
878                         get_shutdown_scriptpubkey (): number;
879                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
880                         get_secure_random_bytes (): Uint8Array;
881                         read_chan_signer (reader: Uint8Array): number;
882                         sign_invoice (invoice_preimage: Uint8Array): number;
883                 }
884
885                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
886             throw new Error('unimplemented'); // TODO: bind to WASM
887         }
888
889 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
890
891
892         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
893         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
894                 if(!isWasmInitialized) {
895                         throw new Error("initializeWasm() must be awaited first!");
896                 }
897                 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
898                 return decodeArray(nativeResponseValue);
899         }
900         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
901         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
902                 if(!isWasmInitialized) {
903                         throw new Error("initializeWasm() must be awaited first!");
904                 }
905                 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
906                 return decodeArray(nativeResponseValue);
907         }
908         // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
909         export function KeysInterface_get_shutdown_scriptpubkey(this_arg: number): number {
910                 if(!isWasmInitialized) {
911                         throw new Error("initializeWasm() must be awaited first!");
912                 }
913                 const nativeResponseValue = wasm.KeysInterface_get_shutdown_scriptpubkey(this_arg);
914                 return nativeResponseValue;
915         }
916         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
917         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
918                 if(!isWasmInitialized) {
919                         throw new Error("initializeWasm() must be awaited first!");
920                 }
921                 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
922                 return nativeResponseValue;
923         }
924         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
925         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
926                 if(!isWasmInitialized) {
927                         throw new Error("initializeWasm() must be awaited first!");
928                 }
929                 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
930                 return decodeArray(nativeResponseValue);
931         }
932         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
933         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
934                 if(!isWasmInitialized) {
935                         throw new Error("initializeWasm() must be awaited first!");
936                 }
937                 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
938                 return nativeResponseValue;
939         }
940         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
941         export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
942                 if(!isWasmInitialized) {
943                         throw new Error("initializeWasm() must be awaited first!");
944                 }
945                 const nativeResponseValue = wasm.KeysInterface_sign_invoice(this_arg, encodeArray(invoice_preimage));
946                 return nativeResponseValue;
947         }
948
949
950
951 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
952
953                 export interface LDKFeeEstimator {
954                         get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
955                 }
956
957                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
958             throw new Error('unimplemented'); // TODO: bind to WASM
959         }
960
961 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
962
963
964         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
965         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
966                 if(!isWasmInitialized) {
967                         throw new Error("initializeWasm() must be awaited first!");
968                 }
969                 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
970                 return nativeResponseValue;
971         }
972
973
974
975 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
976
977                 export interface LDKLogger {
978                         log (record: String): void;
979                 }
980
981                 export function LDKLogger_new(impl: LDKLogger): number {
982             throw new Error('unimplemented'); // TODO: bind to WASM
983         }
984
985 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
986
987
988         public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
989         public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
990         public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
991         public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
992         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
993         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
994         public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
995         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
996         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
997         public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
998         public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
999         public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
1000
1001
1002
1003 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1004
1005                 export interface LDKType {
1006                         type_id (): number;
1007                         debug_str (): String;
1008                         write (): Uint8Array;
1009                 }
1010
1011                 export function LDKType_new(impl: LDKType): number {
1012             throw new Error('unimplemented'); // TODO: bind to WASM
1013         }
1014
1015 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1016
1017
1018         // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
1019         export function Type_type_id(this_arg: number): number {
1020                 if(!isWasmInitialized) {
1021                         throw new Error("initializeWasm() must be awaited first!");
1022                 }
1023                 const nativeResponseValue = wasm.Type_type_id(this_arg);
1024                 return nativeResponseValue;
1025         }
1026         // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
1027         export function Type_debug_str(this_arg: number): String {
1028                 if(!isWasmInitialized) {
1029                         throw new Error("initializeWasm() must be awaited first!");
1030                 }
1031                 const nativeResponseValue = wasm.Type_debug_str(this_arg);
1032                 return nativeResponseValue;
1033         }
1034         // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
1035         export function Type_write(this_arg: number): Uint8Array {
1036                 if(!isWasmInitialized) {
1037                         throw new Error("initializeWasm() must be awaited first!");
1038                 }
1039                 const nativeResponseValue = wasm.Type_write(this_arg);
1040                 return decodeArray(nativeResponseValue);
1041         }
1042         public static class LDKCOption_TypeZ {
1043                 private LDKCOption_TypeZ() {}
1044                 export class Some extends LDKCOption_TypeZ {
1045                         public number some;
1046                         Some(number some) { this.some = some; }
1047                 }
1048                 export class None extends LDKCOption_TypeZ {
1049                         None() { }
1050                 }
1051                 static native void init();
1052         }
1053         static { LDKCOption_TypeZ.init(); }
1054         public static native LDKCOption_TypeZ LDKCOption_TypeZ_ref_from_ptr(long ptr);
1055         public static native boolean LDKCResult_COption_TypeZDecodeErrorZ_result_ok(long arg);
1056         public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_ok(long arg);
1057         public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_err(long arg);
1058         public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
1059         public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
1060         public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
1061         public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
1062         public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
1063         public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
1064         public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
1065         public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
1066         public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
1067         public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(number a, Uint8Array b, number c);
1068         public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long ptr);
1069         public static native Uint8Array LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long ptr);
1070         public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long ptr);
1071         public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
1072         public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
1073         public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
1074         public static native long LDKCVec_PrivateRouteZ_new(number[] elems);
1075         public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
1076         public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
1077         public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
1078         public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
1079         public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
1080         public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
1081         public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
1082         public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
1083         public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
1084         public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
1085         public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
1086         public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
1087         public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
1088         public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
1089         public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
1090         public static native boolean LDKCResult_PrivateRouteCreationErrorZ_result_ok(long arg);
1091         public static native number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
1092         public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
1093         public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
1094         public static native String LDKCResult_StringErrorZ_get_ok(long arg);
1095         public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
1096         public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
1097         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
1098         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
1099         public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
1100         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
1101         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
1102         public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
1103         public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
1104         public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
1105         public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
1106         public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
1107         public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
1108         public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
1109         public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
1110         public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
1111         public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
1112         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
1113         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
1114         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
1115         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
1116         public static class LDKPaymentPurpose {
1117                 private LDKPaymentPurpose() {}
1118                 export class InvoicePayment extends LDKPaymentPurpose {
1119                         public Uint8Array payment_preimage;
1120                         public Uint8Array payment_secret;
1121                         public number user_payment_id;
1122                         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; }
1123                 }
1124                 export class SpontaneousPayment extends LDKPaymentPurpose {
1125                         public Uint8Array spontaneous_payment;
1126                         SpontaneousPayment(Uint8Array spontaneous_payment) { this.spontaneous_payment = spontaneous_payment; }
1127                 }
1128                 static native void init();
1129         }
1130         static { LDKPaymentPurpose.init(); }
1131         public static native LDKPaymentPurpose LDKPaymentPurpose_ref_from_ptr(long ptr);
1132         public static class LDKClosureReason {
1133                 private LDKClosureReason() {}
1134                 export class CounterpartyForceClosed extends LDKClosureReason {
1135                         public String peer_msg;
1136                         CounterpartyForceClosed(String peer_msg) { this.peer_msg = peer_msg; }
1137                 }
1138                 export class HolderForceClosed extends LDKClosureReason {
1139                         HolderForceClosed() { }
1140                 }
1141                 export class CooperativeClosure extends LDKClosureReason {
1142                         CooperativeClosure() { }
1143                 }
1144                 export class CommitmentTxConfirmed extends LDKClosureReason {
1145                         CommitmentTxConfirmed() { }
1146                 }
1147                 export class ProcessingError extends LDKClosureReason {
1148                         public String err;
1149                         ProcessingError(String err) { this.err = err; }
1150                 }
1151                 export class DisconnectedPeer extends LDKClosureReason {
1152                         DisconnectedPeer() { }
1153                 }
1154                 export class OutdatedChannelManager extends LDKClosureReason {
1155                         OutdatedChannelManager() { }
1156                 }
1157                 static native void init();
1158         }
1159         static { LDKClosureReason.init(); }
1160         public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
1161         public static class LDKEvent {
1162                 private LDKEvent() {}
1163                 export class FundingGenerationReady extends LDKEvent {
1164                         public Uint8Array temporary_channel_id;
1165                         public number channel_value_satoshis;
1166                         public Uint8Array output_script;
1167                         public number user_channel_id;
1168                         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; }
1169                 }
1170                 export class PaymentReceived extends LDKEvent {
1171                         public Uint8Array payment_hash;
1172                         public number amt;
1173                         public number purpose;
1174                         PaymentReceived(Uint8Array payment_hash, number amt, number purpose) { this.payment_hash = payment_hash; this.amt = amt; this.purpose = purpose; }
1175                 }
1176                 export class PaymentSent extends LDKEvent {
1177                         public Uint8Array payment_preimage;
1178                         PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
1179                 }
1180                 export class PaymentPathFailed extends LDKEvent {
1181                         public Uint8Array payment_hash;
1182                         public boolean rejected_by_dest;
1183                         public number network_update;
1184                         public boolean all_paths_failed;
1185                         public number[] path;
1186                         PaymentPathFailed(Uint8Array payment_hash, boolean rejected_by_dest, number network_update, boolean all_paths_failed, number[] path) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; this.network_update = network_update; this.all_paths_failed = all_paths_failed; this.path = path; }
1187                 }
1188                 export class PendingHTLCsForwardable extends LDKEvent {
1189                         public number time_forwardable;
1190                         PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
1191                 }
1192                 export class SpendableOutputs extends LDKEvent {
1193                         public number[] outputs;
1194                         SpendableOutputs(number[] outputs) { this.outputs = outputs; }
1195                 }
1196                 export class PaymentForwarded extends LDKEvent {
1197                         public number fee_earned_msat;
1198                         public boolean claim_from_onchain_tx;
1199                         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; }
1200                 }
1201                 export class ChannelClosed extends LDKEvent {
1202                         public Uint8Array channel_id;
1203                         public number reason;
1204                         ChannelClosed(Uint8Array channel_id, number reason) { this.channel_id = channel_id; this.reason = reason; }
1205                 }
1206                 static native void init();
1207         }
1208         static { LDKEvent.init(); }
1209         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
1210         public static native long LDKCVec_EventZ_new(number[] elems);
1211         public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
1212         public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
1213         public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
1214         public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
1215         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
1216         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
1217         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
1218         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
1219         public static class LDKBalance {
1220                 private LDKBalance() {}
1221                 export class ClaimableOnChannelClose extends LDKBalance {
1222                         public number claimable_amount_satoshis;
1223                         ClaimableOnChannelClose(number claimable_amount_satoshis) { this.claimable_amount_satoshis = claimable_amount_satoshis; }
1224                 }
1225                 export class ClaimableAwaitingConfirmations extends LDKBalance {
1226                         public number claimable_amount_satoshis;
1227                         public number confirmation_height;
1228                         ClaimableAwaitingConfirmations(number claimable_amount_satoshis, number confirmation_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.confirmation_height = confirmation_height; }
1229                 }
1230                 export class ContentiousClaimable extends LDKBalance {
1231                         public number claimable_amount_satoshis;
1232                         public number timeout_height;
1233                         ContentiousClaimable(number claimable_amount_satoshis, number timeout_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.timeout_height = timeout_height; }
1234                 }
1235                 export class MaybeClaimableHTLCAwaitingTimeout extends LDKBalance {
1236                         public number claimable_amount_satoshis;
1237                         public number claimable_height;
1238                         MaybeClaimableHTLCAwaitingTimeout(number claimable_amount_satoshis, number claimable_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.claimable_height = claimable_height; }
1239                 }
1240                 static native void init();
1241         }
1242         static { LDKBalance.init(); }
1243         public static native LDKBalance LDKBalance_ref_from_ptr(long ptr);
1244         public static native long LDKCVec_BalanceZ_new(number[] elems);
1245         public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
1246         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
1247         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
1248         public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
1249         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
1250         public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
1251         public static native long LDKC2Tuple_PublicKeyTypeZ_new(Uint8Array a, number b);
1252         public static native Uint8Array LDKC2Tuple_PublicKeyTypeZ_get_a(long ptr);
1253         public static native number LDKC2Tuple_PublicKeyTypeZ_get_b(long ptr);
1254         public static native long LDKCVec_C2Tuple_PublicKeyTypeZZ_new(number[] elems);
1255         public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
1256         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
1257         public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
1258         public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
1259         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
1260         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
1261         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
1262         public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
1263         public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
1264         public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
1265         public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
1266         public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
1267         public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
1268         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
1269         public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
1270         public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
1271         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
1272         public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
1273
1274
1275
1276 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1277
1278                 export interface LDKAccess {
1279                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1280                 }
1281
1282                 export function LDKAccess_new(impl: LDKAccess): number {
1283             throw new Error('unimplemented'); // TODO: bind to WASM
1284         }
1285
1286 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1287
1288
1289         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1290         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1291                 if(!isWasmInitialized) {
1292                         throw new Error("initializeWasm() must be awaited first!");
1293                 }
1294                 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1295                 return nativeResponseValue;
1296         }
1297         public static class LDKCOption_AccessZ {
1298                 private LDKCOption_AccessZ() {}
1299                 export class Some extends LDKCOption_AccessZ {
1300                         public number some;
1301                         Some(number some) { this.some = some; }
1302                 }
1303                 export class None extends LDKCOption_AccessZ {
1304                         None() { }
1305                 }
1306                 static native void init();
1307         }
1308         static { LDKCOption_AccessZ.init(); }
1309         public static native LDKCOption_AccessZ LDKCOption_AccessZ_ref_from_ptr(long ptr);
1310         public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
1311         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
1312         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
1313         public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
1314         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
1315         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
1316         public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
1317         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
1318         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
1319         public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
1320         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
1321         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
1322         public static native long LDKCVec_u64Z_new(number[] elems);
1323         public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
1324         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
1325         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
1326         public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
1327         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
1328         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
1329         public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
1330         public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
1331         public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
1332         public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
1333         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
1334         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
1335         public static native boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
1336         public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
1337         public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
1338         public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
1339         public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
1340         public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
1341         public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
1342         public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
1343         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
1344         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
1345         public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
1346         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
1347         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
1348         public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
1349         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
1350         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
1351         public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
1352         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
1353         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
1354         public static native boolean LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_result_ok(long arg);
1355         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(long arg);
1356         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(long arg);
1357         public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
1358         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
1359         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
1360         public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
1361         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
1362         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
1363         public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
1364         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1365         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1366         public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
1367         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1368         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1369         public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
1370         public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1371         public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
1372         public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
1373         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1374         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1375         public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
1376         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1377         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1378         public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
1379         public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1380         public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1381         public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
1382         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1383         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1384         public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
1385         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1386         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1387         public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
1388         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1389         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1390         public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
1391         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1392         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1393         public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
1394         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1395         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1396         public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
1397         public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1398         public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
1399         public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
1400         public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1401         public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
1402         public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1403         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1404         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1405         public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1406         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1407         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1408         public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
1409         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1410         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1411         public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
1412         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1413         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1414         public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
1415         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1416         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1417         public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1418         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1419         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1420         public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1421         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1422         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1423         public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1424         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1425         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1426         public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1427         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1428         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1429         public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1430         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1431         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1432         public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1433         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1434         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1435         public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1436         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1437         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1438         public static class LDKSignOrCreationError {
1439                 private LDKSignOrCreationError() {}
1440                 export class SignError extends LDKSignOrCreationError {
1441                         SignError() { }
1442                 }
1443                 export class CreationError extends LDKSignOrCreationError {
1444                         public CreationError creation_error;
1445                         CreationError(CreationError creation_error) { this.creation_error = creation_error; }
1446                 }
1447                 static native void init();
1448         }
1449         static { LDKSignOrCreationError.init(); }
1450         public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1451         public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
1452         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
1453         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
1454
1455
1456
1457 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1458
1459                 export interface LDKFilter {
1460                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1461                         register_output (output: number): number;
1462                 }
1463
1464                 export function LDKFilter_new(impl: LDKFilter): number {
1465             throw new Error('unimplemented'); // TODO: bind to WASM
1466         }
1467
1468 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1469
1470
1471         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1472         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1473                 if(!isWasmInitialized) {
1474                         throw new Error("initializeWasm() must be awaited first!");
1475                 }
1476                 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1477                 // debug statements here
1478         }
1479         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1480         export function Filter_register_output(this_arg: number, output: number): number {
1481                 if(!isWasmInitialized) {
1482                         throw new Error("initializeWasm() must be awaited first!");
1483                 }
1484                 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1485                 return nativeResponseValue;
1486         }
1487         public static class LDKCOption_FilterZ {
1488                 private LDKCOption_FilterZ() {}
1489                 export class Some extends LDKCOption_FilterZ {
1490                         public number some;
1491                         Some(number some) { this.some = some; }
1492                 }
1493                 export class None extends LDKCOption_FilterZ {
1494                         None() { }
1495                 }
1496                 static native void init();
1497         }
1498         static { LDKCOption_FilterZ.init(); }
1499         public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
1500
1501
1502
1503 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1504
1505                 export interface LDKMessageSendEventsProvider {
1506                         get_and_clear_pending_msg_events (): number[];
1507                 }
1508
1509                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1510             throw new Error('unimplemented'); // TODO: bind to WASM
1511         }
1512
1513 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1514
1515
1516         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1517         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1518                 if(!isWasmInitialized) {
1519                         throw new Error("initializeWasm() must be awaited first!");
1520                 }
1521                 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1522                 return nativeResponseValue;
1523         }
1524
1525
1526
1527 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1528
1529                 export interface LDKEventHandler {
1530                         handle_event (event: number): void;
1531                 }
1532
1533                 export function LDKEventHandler_new(impl: LDKEventHandler): number {
1534             throw new Error('unimplemented'); // TODO: bind to WASM
1535         }
1536
1537 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1538
1539
1540         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
1541         export function EventHandler_handle_event(this_arg: number, event: number): void {
1542                 if(!isWasmInitialized) {
1543                         throw new Error("initializeWasm() must be awaited first!");
1544                 }
1545                 const nativeResponseValue = wasm.EventHandler_handle_event(this_arg, event);
1546                 // debug statements here
1547         }
1548
1549
1550
1551 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1552
1553                 export interface LDKEventsProvider {
1554                         process_pending_events (handler: number): void;
1555                 }
1556
1557                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1558             throw new Error('unimplemented'); // TODO: bind to WASM
1559         }
1560
1561 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1562
1563
1564         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1565         export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
1566                 if(!isWasmInitialized) {
1567                         throw new Error("initializeWasm() must be awaited first!");
1568                 }
1569                 const nativeResponseValue = wasm.EventsProvider_process_pending_events(this_arg, handler);
1570                 // debug statements here
1571         }
1572
1573
1574
1575 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1576
1577                 export interface LDKListen {
1578                         block_connected (block: Uint8Array, height: number): void;
1579                         block_disconnected (header: Uint8Array, height: number): void;
1580                 }
1581
1582                 export function LDKListen_new(impl: LDKListen): number {
1583             throw new Error('unimplemented'); // TODO: bind to WASM
1584         }
1585
1586 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1587
1588
1589         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1590         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1591                 if(!isWasmInitialized) {
1592                         throw new Error("initializeWasm() must be awaited first!");
1593                 }
1594                 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1595                 // debug statements here
1596         }
1597         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1598         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1599                 if(!isWasmInitialized) {
1600                         throw new Error("initializeWasm() must be awaited first!");
1601                 }
1602                 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1603                 // debug statements here
1604         }
1605
1606
1607
1608 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1609
1610                 export interface LDKConfirm {
1611                         transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
1612                         transaction_unconfirmed (txid: Uint8Array): void;
1613                         best_block_updated (header: Uint8Array, height: number): void;
1614                         get_relevant_txids (): Uint8Array[];
1615                 }
1616
1617                 export function LDKConfirm_new(impl: LDKConfirm): number {
1618             throw new Error('unimplemented'); // TODO: bind to WASM
1619         }
1620
1621 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1622
1623
1624         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1625         export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
1626                 if(!isWasmInitialized) {
1627                         throw new Error("initializeWasm() must be awaited first!");
1628                 }
1629                 const nativeResponseValue = wasm.Confirm_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
1630                 // debug statements here
1631         }
1632         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1633         export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
1634                 if(!isWasmInitialized) {
1635                         throw new Error("initializeWasm() must be awaited first!");
1636                 }
1637                 const nativeResponseValue = wasm.Confirm_transaction_unconfirmed(this_arg, encodeArray(txid));
1638                 // debug statements here
1639         }
1640         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1641         export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
1642                 if(!isWasmInitialized) {
1643                         throw new Error("initializeWasm() must be awaited first!");
1644                 }
1645                 const nativeResponseValue = wasm.Confirm_best_block_updated(this_arg, encodeArray(header), height);
1646                 // debug statements here
1647         }
1648         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1649         export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
1650                 if(!isWasmInitialized) {
1651                         throw new Error("initializeWasm() must be awaited first!");
1652                 }
1653                 const nativeResponseValue = wasm.Confirm_get_relevant_txids(this_arg);
1654                 return nativeResponseValue;
1655         }
1656
1657
1658
1659 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1660
1661                 export interface LDKPersist {
1662                         persist_new_channel (id: number, data: number): number;
1663                         update_persisted_channel (id: number, update: number, data: number): number;
1664                 }
1665
1666                 export function LDKPersist_new(impl: LDKPersist): number {
1667             throw new Error('unimplemented'); // TODO: bind to WASM
1668         }
1669
1670 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1671
1672
1673         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1674         export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1675                 if(!isWasmInitialized) {
1676                         throw new Error("initializeWasm() must be awaited first!");
1677                 }
1678                 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1679                 return nativeResponseValue;
1680         }
1681         // 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
1682         export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1683                 if(!isWasmInitialized) {
1684                         throw new Error("initializeWasm() must be awaited first!");
1685                 }
1686                 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1687                 return nativeResponseValue;
1688         }
1689
1690
1691
1692 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1693
1694                 export interface LDKChannelMessageHandler {
1695                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1696                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1697                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1698                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1699                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1700                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1701                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1702                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1703                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1704                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1705                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1706                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1707                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1708                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1709                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1710                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1711                         peer_connected (their_node_id: Uint8Array, msg: number): void;
1712                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1713                         handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1714                         handle_error (their_node_id: Uint8Array, msg: number): void;
1715                 }
1716
1717                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1718             throw new Error('unimplemented'); // TODO: bind to WASM
1719         }
1720
1721 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1722
1723
1724         // 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
1725         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1726                 if(!isWasmInitialized) {
1727                         throw new Error("initializeWasm() must be awaited first!");
1728                 }
1729                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1730                 // debug statements here
1731         }
1732         // 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
1733         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1734                 if(!isWasmInitialized) {
1735                         throw new Error("initializeWasm() must be awaited first!");
1736                 }
1737                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1738                 // debug statements here
1739         }
1740         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1741         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1742                 if(!isWasmInitialized) {
1743                         throw new Error("initializeWasm() must be awaited first!");
1744                 }
1745                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1746                 // debug statements here
1747         }
1748         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1749         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1750                 if(!isWasmInitialized) {
1751                         throw new Error("initializeWasm() must be awaited first!");
1752                 }
1753                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1754                 // debug statements here
1755         }
1756         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1757         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1758                 if(!isWasmInitialized) {
1759                         throw new Error("initializeWasm() must be awaited first!");
1760                 }
1761                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1762                 // debug statements here
1763         }
1764         // 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
1765         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1766                 if(!isWasmInitialized) {
1767                         throw new Error("initializeWasm() must be awaited first!");
1768                 }
1769                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1770                 // debug statements here
1771         }
1772         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1773         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1774                 if(!isWasmInitialized) {
1775                         throw new Error("initializeWasm() must be awaited first!");
1776                 }
1777                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1778                 // debug statements here
1779         }
1780         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1781         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1782                 if(!isWasmInitialized) {
1783                         throw new Error("initializeWasm() must be awaited first!");
1784                 }
1785                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1786                 // debug statements here
1787         }
1788         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1789         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1790                 if(!isWasmInitialized) {
1791                         throw new Error("initializeWasm() must be awaited first!");
1792                 }
1793                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1794                 // debug statements here
1795         }
1796         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1797         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1798                 if(!isWasmInitialized) {
1799                         throw new Error("initializeWasm() must be awaited first!");
1800                 }
1801                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1802                 // debug statements here
1803         }
1804         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1805         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1806                 if(!isWasmInitialized) {
1807                         throw new Error("initializeWasm() must be awaited first!");
1808                 }
1809                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1810                 // debug statements here
1811         }
1812         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1813         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1814                 if(!isWasmInitialized) {
1815                         throw new Error("initializeWasm() must be awaited first!");
1816                 }
1817                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1818                 // debug statements here
1819         }
1820         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1821         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1822                 if(!isWasmInitialized) {
1823                         throw new Error("initializeWasm() must be awaited first!");
1824                 }
1825                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1826                 // debug statements here
1827         }
1828         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1829         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1830                 if(!isWasmInitialized) {
1831                         throw new Error("initializeWasm() must be awaited first!");
1832                 }
1833                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1834                 // debug statements here
1835         }
1836         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1837         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1838                 if(!isWasmInitialized) {
1839                         throw new Error("initializeWasm() must be awaited first!");
1840                 }
1841                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1842                 // debug statements here
1843         }
1844         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1845         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1846                 if(!isWasmInitialized) {
1847                         throw new Error("initializeWasm() must be awaited first!");
1848                 }
1849                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1850                 // debug statements here
1851         }
1852         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1853         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1854                 if(!isWasmInitialized) {
1855                         throw new Error("initializeWasm() must be awaited first!");
1856                 }
1857                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1858                 // debug statements here
1859         }
1860         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1861         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1862                 if(!isWasmInitialized) {
1863                         throw new Error("initializeWasm() must be awaited first!");
1864                 }
1865                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1866                 // debug statements here
1867         }
1868         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
1869         export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1870                 if(!isWasmInitialized) {
1871                         throw new Error("initializeWasm() must be awaited first!");
1872                 }
1873                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
1874                 // debug statements here
1875         }
1876         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1877         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1878                 if(!isWasmInitialized) {
1879                         throw new Error("initializeWasm() must be awaited first!");
1880                 }
1881                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1882                 // debug statements here
1883         }
1884
1885
1886
1887 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1888
1889                 export interface LDKRoutingMessageHandler {
1890                         handle_node_announcement (msg: number): number;
1891                         handle_channel_announcement (msg: number): number;
1892                         handle_channel_update (msg: number): number;
1893                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1894                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1895                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
1896                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1897                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1898                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1899                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1900                 }
1901
1902                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1903             throw new Error('unimplemented'); // TODO: bind to WASM
1904         }
1905
1906 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1907
1908
1909         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1910         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1911                 if(!isWasmInitialized) {
1912                         throw new Error("initializeWasm() must be awaited first!");
1913                 }
1914                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1915                 return nativeResponseValue;
1916         }
1917         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1918         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1919                 if(!isWasmInitialized) {
1920                         throw new Error("initializeWasm() must be awaited first!");
1921                 }
1922                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1923                 return nativeResponseValue;
1924         }
1925         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1926         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1927                 if(!isWasmInitialized) {
1928                         throw new Error("initializeWasm() must be awaited first!");
1929                 }
1930                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1931                 return nativeResponseValue;
1932         }
1933         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1934         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1935                 if(!isWasmInitialized) {
1936                         throw new Error("initializeWasm() must be awaited first!");
1937                 }
1938                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1939                 return nativeResponseValue;
1940         }
1941         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1942         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1943                 if(!isWasmInitialized) {
1944                         throw new Error("initializeWasm() must be awaited first!");
1945                 }
1946                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1947                 return nativeResponseValue;
1948         }
1949         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1950         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1951                 if(!isWasmInitialized) {
1952                         throw new Error("initializeWasm() must be awaited first!");
1953                 }
1954                 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1955                 // debug statements here
1956         }
1957         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1958         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1959                 if(!isWasmInitialized) {
1960                         throw new Error("initializeWasm() must be awaited first!");
1961                 }
1962                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1963                 return nativeResponseValue;
1964         }
1965         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1966         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1967                 if(!isWasmInitialized) {
1968                         throw new Error("initializeWasm() must be awaited first!");
1969                 }
1970                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1971                 return nativeResponseValue;
1972         }
1973         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1974         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1975                 if(!isWasmInitialized) {
1976                         throw new Error("initializeWasm() must be awaited first!");
1977                 }
1978                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1979                 return nativeResponseValue;
1980         }
1981         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1982         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1983                 if(!isWasmInitialized) {
1984                         throw new Error("initializeWasm() must be awaited first!");
1985                 }
1986                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1987                 return nativeResponseValue;
1988         }
1989
1990
1991
1992 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1993
1994                 export interface LDKCustomMessageReader {
1995                         read (message_type: number, buffer: Uint8Array): number;
1996                 }
1997
1998                 export function LDKCustomMessageReader_new(impl: LDKCustomMessageReader): number {
1999             throw new Error('unimplemented'); // TODO: bind to WASM
2000         }
2001
2002 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2003
2004
2005         // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
2006         export function CustomMessageReader_read(this_arg: number, message_type: number, buffer: Uint8Array): number {
2007                 if(!isWasmInitialized) {
2008                         throw new Error("initializeWasm() must be awaited first!");
2009                 }
2010                 const nativeResponseValue = wasm.CustomMessageReader_read(this_arg, message_type, encodeArray(buffer));
2011                 return nativeResponseValue;
2012         }
2013
2014
2015
2016 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2017
2018                 export interface LDKCustomMessageHandler {
2019                         handle_custom_message (msg: number, sender_node_id: Uint8Array): number;
2020                         get_and_clear_pending_msg (): number[];
2021                 }
2022
2023                 export function LDKCustomMessageHandler_new(impl: LDKCustomMessageHandler, CustomMessageReader: LDKCustomMessageReader): number {
2024             throw new Error('unimplemented'); // TODO: bind to WASM
2025         }
2026
2027 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2028
2029
2030         // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
2031         export function CustomMessageHandler_handle_custom_message(this_arg: number, msg: number, sender_node_id: Uint8Array): number {
2032                 if(!isWasmInitialized) {
2033                         throw new Error("initializeWasm() must be awaited first!");
2034                 }
2035                 const nativeResponseValue = wasm.CustomMessageHandler_handle_custom_message(this_arg, msg, encodeArray(sender_node_id));
2036                 return nativeResponseValue;
2037         }
2038         // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
2039         export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: number): number[] {
2040                 if(!isWasmInitialized) {
2041                         throw new Error("initializeWasm() must be awaited first!");
2042                 }
2043                 const nativeResponseValue = wasm.CustomMessageHandler_get_and_clear_pending_msg(this_arg);
2044                 return nativeResponseValue;
2045         }
2046
2047
2048
2049 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2050
2051                 export interface LDKSocketDescriptor {
2052                         send_data (data: Uint8Array, resume_read: boolean): number;
2053                         disconnect_socket (): void;
2054                         eq (other_arg: number): boolean;
2055                         hash (): number;
2056                 }
2057
2058                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
2059             throw new Error('unimplemented'); // TODO: bind to WASM
2060         }
2061
2062 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2063
2064
2065         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
2066         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
2067                 if(!isWasmInitialized) {
2068                         throw new Error("initializeWasm() must be awaited first!");
2069                 }
2070                 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
2071                 return nativeResponseValue;
2072         }
2073         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
2074         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
2075                 if(!isWasmInitialized) {
2076                         throw new Error("initializeWasm() must be awaited first!");
2077                 }
2078                 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
2079                 // debug statements here
2080         }
2081         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
2082         export function SocketDescriptor_hash(this_arg: number): number {
2083                 if(!isWasmInitialized) {
2084                         throw new Error("initializeWasm() must be awaited first!");
2085                 }
2086                 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
2087                 return nativeResponseValue;
2088         }
2089
2090
2091
2092 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2093
2094                 export interface LDKChannelManagerPersister {
2095                         persist_manager (channel_manager: number): number;
2096                 }
2097
2098                 export function LDKChannelManagerPersister_new(impl: LDKChannelManagerPersister): number {
2099             throw new Error('unimplemented'); // TODO: bind to WASM
2100         }
2101
2102 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2103
2104
2105         // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
2106         export function ChannelManagerPersister_persist_manager(this_arg: number, channel_manager: number): number {
2107                 if(!isWasmInitialized) {
2108                         throw new Error("initializeWasm() must be awaited first!");
2109                 }
2110                 const nativeResponseValue = wasm.ChannelManagerPersister_persist_manager(this_arg, channel_manager);
2111                 return nativeResponseValue;
2112         }
2113         public static class LDKFallback {
2114                 private LDKFallback() {}
2115                 export class SegWitProgram extends LDKFallback {
2116                         public number version;
2117                         public Uint8Array program;
2118                         SegWitProgram(number version, Uint8Array program) { this.version = version; this.program = program; }
2119                 }
2120                 export class PubKeyHash extends LDKFallback {
2121                         public Uint8Array pub_key_hash;
2122                         PubKeyHash(Uint8Array pub_key_hash) { this.pub_key_hash = pub_key_hash; }
2123                 }
2124                 export class ScriptHash extends LDKFallback {
2125                         public Uint8Array script_hash;
2126                         ScriptHash(Uint8Array script_hash) { this.script_hash = script_hash; }
2127                 }
2128                 static native void init();
2129         }
2130         static { LDKFallback.init(); }
2131         public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
2132         // struct LDKStr _ldk_get_compiled_version(void);
2133         export function _ldk_get_compiled_version(): String {
2134                 if(!isWasmInitialized) {
2135                         throw new Error("initializeWasm() must be awaited first!");
2136                 }
2137                 const nativeResponseValue = wasm._ldk_get_compiled_version();
2138                 return nativeResponseValue;
2139         }
2140         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
2141         export function _ldk_c_bindings_get_compiled_version(): String {
2142                 if(!isWasmInitialized) {
2143                         throw new Error("initializeWasm() must be awaited first!");
2144                 }
2145                 const nativeResponseValue = wasm._ldk_c_bindings_get_compiled_version();
2146                 return nativeResponseValue;
2147         }
2148         // void Transaction_free(struct LDKTransaction _res);
2149         export function Transaction_free(_res: Uint8Array): void {
2150                 if(!isWasmInitialized) {
2151                         throw new Error("initializeWasm() must be awaited first!");
2152                 }
2153                 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
2154                 // debug statements here
2155         }
2156         // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
2157         export function TxOut_new(script_pubkey: Uint8Array, value: number): number {
2158                 if(!isWasmInitialized) {
2159                         throw new Error("initializeWasm() must be awaited first!");
2160                 }
2161                 const nativeResponseValue = wasm.TxOut_new(encodeArray(script_pubkey), value);
2162                 return nativeResponseValue;
2163         }
2164         // void TxOut_free(struct LDKTxOut _res);
2165         export function TxOut_free(_res: number): void {
2166                 if(!isWasmInitialized) {
2167                         throw new Error("initializeWasm() must be awaited first!");
2168                 }
2169                 const nativeResponseValue = wasm.TxOut_free(_res);
2170                 // debug statements here
2171         }
2172         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
2173         export function TxOut_clone(orig: number): number {
2174                 if(!isWasmInitialized) {
2175                         throw new Error("initializeWasm() must be awaited first!");
2176                 }
2177                 const nativeResponseValue = wasm.TxOut_clone(orig);
2178                 return nativeResponseValue;
2179         }
2180         // void Str_free(struct LDKStr _res);
2181         export function Str_free(_res: String): void {
2182                 if(!isWasmInitialized) {
2183                         throw new Error("initializeWasm() must be awaited first!");
2184                 }
2185                 const nativeResponseValue = wasm.Str_free(_res);
2186                 // debug statements here
2187         }
2188         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
2189         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
2190                 if(!isWasmInitialized) {
2191                         throw new Error("initializeWasm() must be awaited first!");
2192                 }
2193                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
2194                 return nativeResponseValue;
2195         }
2196         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
2197         export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
2198                 if(!isWasmInitialized) {
2199                         throw new Error("initializeWasm() must be awaited first!");
2200                 }
2201                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
2202                 return nativeResponseValue;
2203         }
2204         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
2205         export function CResult_SecretKeyErrorZ_free(_res: number): void {
2206                 if(!isWasmInitialized) {
2207                         throw new Error("initializeWasm() must be awaited first!");
2208                 }
2209                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
2210                 // debug statements here
2211         }
2212         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
2213         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
2214                 if(!isWasmInitialized) {
2215                         throw new Error("initializeWasm() must be awaited first!");
2216                 }
2217                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
2218                 return nativeResponseValue;
2219         }
2220         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
2221         export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
2222                 if(!isWasmInitialized) {
2223                         throw new Error("initializeWasm() must be awaited first!");
2224                 }
2225                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
2226                 return nativeResponseValue;
2227         }
2228         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
2229         export function CResult_PublicKeyErrorZ_free(_res: number): void {
2230                 if(!isWasmInitialized) {
2231                         throw new Error("initializeWasm() must be awaited first!");
2232                 }
2233                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
2234                 // debug statements here
2235         }
2236         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
2237         export function CResult_PublicKeyErrorZ_clone(orig: number): number {
2238                 if(!isWasmInitialized) {
2239                         throw new Error("initializeWasm() must be awaited first!");
2240                 }
2241                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
2242                 return nativeResponseValue;
2243         }
2244         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
2245         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
2246                 if(!isWasmInitialized) {
2247                         throw new Error("initializeWasm() must be awaited first!");
2248                 }
2249                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
2250                 return nativeResponseValue;
2251         }
2252         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
2253         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
2254                 if(!isWasmInitialized) {
2255                         throw new Error("initializeWasm() must be awaited first!");
2256                 }
2257                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
2258                 return nativeResponseValue;
2259         }
2260         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
2261         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
2262                 if(!isWasmInitialized) {
2263                         throw new Error("initializeWasm() must be awaited first!");
2264                 }
2265                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
2266                 // debug statements here
2267         }
2268         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
2269         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
2270                 if(!isWasmInitialized) {
2271                         throw new Error("initializeWasm() must be awaited first!");
2272                 }
2273                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
2274                 return nativeResponseValue;
2275         }
2276         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
2277         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
2278                 if(!isWasmInitialized) {
2279                         throw new Error("initializeWasm() must be awaited first!");
2280                 }
2281                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
2282                 return nativeResponseValue;
2283         }
2284         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
2285         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
2286                 if(!isWasmInitialized) {
2287                         throw new Error("initializeWasm() must be awaited first!");
2288                 }
2289                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
2290                 return nativeResponseValue;
2291         }
2292         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
2293         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
2294                 if(!isWasmInitialized) {
2295                         throw new Error("initializeWasm() must be awaited first!");
2296                 }
2297                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
2298                 // debug statements here
2299         }
2300         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
2301         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
2302                 if(!isWasmInitialized) {
2303                         throw new Error("initializeWasm() must be awaited first!");
2304                 }
2305                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
2306                 return nativeResponseValue;
2307         }
2308         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
2309         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
2310                 if(!isWasmInitialized) {
2311                         throw new Error("initializeWasm() must be awaited first!");
2312                 }
2313                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
2314                 return nativeResponseValue;
2315         }
2316         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
2317         export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
2318                 if(!isWasmInitialized) {
2319                         throw new Error("initializeWasm() must be awaited first!");
2320                 }
2321                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
2322                 return nativeResponseValue;
2323         }
2324         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
2325         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
2326                 if(!isWasmInitialized) {
2327                         throw new Error("initializeWasm() must be awaited first!");
2328                 }
2329                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
2330                 // debug statements here
2331         }
2332         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
2333         export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
2334                 if(!isWasmInitialized) {
2335                         throw new Error("initializeWasm() must be awaited first!");
2336                 }
2337                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
2338                 return nativeResponseValue;
2339         }
2340         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
2341         export function COption_u32Z_some(o: number): number {
2342                 if(!isWasmInitialized) {
2343                         throw new Error("initializeWasm() must be awaited first!");
2344                 }
2345                 const nativeResponseValue = wasm.COption_u32Z_some(o);
2346                 return nativeResponseValue;
2347         }
2348         // struct LDKCOption_u32Z COption_u32Z_none(void);
2349         export function COption_u32Z_none(): number {
2350                 if(!isWasmInitialized) {
2351                         throw new Error("initializeWasm() must be awaited first!");
2352                 }
2353                 const nativeResponseValue = wasm.COption_u32Z_none();
2354                 return nativeResponseValue;
2355         }
2356         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
2357         export function COption_u32Z_free(_res: number): void {
2358                 if(!isWasmInitialized) {
2359                         throw new Error("initializeWasm() must be awaited first!");
2360                 }
2361                 const nativeResponseValue = wasm.COption_u32Z_free(_res);
2362                 // debug statements here
2363         }
2364         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
2365         export function COption_u32Z_clone(orig: number): number {
2366                 if(!isWasmInitialized) {
2367                         throw new Error("initializeWasm() must be awaited first!");
2368                 }
2369                 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
2370                 return nativeResponseValue;
2371         }
2372         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
2373         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
2374                 if(!isWasmInitialized) {
2375                         throw new Error("initializeWasm() must be awaited first!");
2376                 }
2377                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
2378                 return nativeResponseValue;
2379         }
2380         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
2381         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
2382                 if(!isWasmInitialized) {
2383                         throw new Error("initializeWasm() must be awaited first!");
2384                 }
2385                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
2386                 return nativeResponseValue;
2387         }
2388         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
2389         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
2390                 if(!isWasmInitialized) {
2391                         throw new Error("initializeWasm() must be awaited first!");
2392                 }
2393                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
2394                 // debug statements here
2395         }
2396         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
2397         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
2398                 if(!isWasmInitialized) {
2399                         throw new Error("initializeWasm() must be awaited first!");
2400                 }
2401                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
2402                 return nativeResponseValue;
2403         }
2404         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
2405         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2406                 if(!isWasmInitialized) {
2407                         throw new Error("initializeWasm() must be awaited first!");
2408                 }
2409                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
2410                 return nativeResponseValue;
2411         }
2412         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2413         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2414                 if(!isWasmInitialized) {
2415                         throw new Error("initializeWasm() must be awaited first!");
2416                 }
2417                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
2418                 return nativeResponseValue;
2419         }
2420         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
2421         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2422                 if(!isWasmInitialized) {
2423                         throw new Error("initializeWasm() must be awaited first!");
2424                 }
2425                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
2426                 // debug statements here
2427         }
2428         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2429         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2430                 if(!isWasmInitialized) {
2431                         throw new Error("initializeWasm() must be awaited first!");
2432                 }
2433                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
2434                 return nativeResponseValue;
2435         }
2436         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
2437         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2438                 if(!isWasmInitialized) {
2439                         throw new Error("initializeWasm() must be awaited first!");
2440                 }
2441                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
2442                 return nativeResponseValue;
2443         }
2444         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2445         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2446                 if(!isWasmInitialized) {
2447                         throw new Error("initializeWasm() must be awaited first!");
2448                 }
2449                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
2450                 return nativeResponseValue;
2451         }
2452         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
2453         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2454                 if(!isWasmInitialized) {
2455                         throw new Error("initializeWasm() must be awaited first!");
2456                 }
2457                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
2458                 // debug statements here
2459         }
2460         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2461         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2462                 if(!isWasmInitialized) {
2463                         throw new Error("initializeWasm() must be awaited first!");
2464                 }
2465                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
2466                 return nativeResponseValue;
2467         }
2468         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
2469         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
2470                 if(!isWasmInitialized) {
2471                         throw new Error("initializeWasm() must be awaited first!");
2472                 }
2473                 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
2474                 // debug statements here
2475         }
2476         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
2477         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2478                 if(!isWasmInitialized) {
2479                         throw new Error("initializeWasm() must be awaited first!");
2480                 }
2481                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
2482                 return nativeResponseValue;
2483         }
2484         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2485         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
2486                 if(!isWasmInitialized) {
2487                         throw new Error("initializeWasm() must be awaited first!");
2488                 }
2489                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
2490                 return nativeResponseValue;
2491         }
2492         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
2493         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2494                 if(!isWasmInitialized) {
2495                         throw new Error("initializeWasm() must be awaited first!");
2496                 }
2497                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
2498                 // debug statements here
2499         }
2500         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2501         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2502                 if(!isWasmInitialized) {
2503                         throw new Error("initializeWasm() must be awaited first!");
2504                 }
2505                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
2506                 return nativeResponseValue;
2507         }
2508         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
2509         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2510                 if(!isWasmInitialized) {
2511                         throw new Error("initializeWasm() must be awaited first!");
2512                 }
2513                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
2514                 return nativeResponseValue;
2515         }
2516         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2517         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
2518                 if(!isWasmInitialized) {
2519                         throw new Error("initializeWasm() must be awaited first!");
2520                 }
2521                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
2522                 return nativeResponseValue;
2523         }
2524         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
2525         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2526                 if(!isWasmInitialized) {
2527                         throw new Error("initializeWasm() must be awaited first!");
2528                 }
2529                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
2530                 // debug statements here
2531         }
2532         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2533         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2534                 if(!isWasmInitialized) {
2535                         throw new Error("initializeWasm() must be awaited first!");
2536                 }
2537                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
2538                 return nativeResponseValue;
2539         }
2540         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
2541         export function CResult_TrustedClosingTransactionNoneZ_ok(o: number): number {
2542                 if(!isWasmInitialized) {
2543                         throw new Error("initializeWasm() must be awaited first!");
2544                 }
2545                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_ok(o);
2546                 return nativeResponseValue;
2547         }
2548         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
2549         export function CResult_TrustedClosingTransactionNoneZ_err(): number {
2550                 if(!isWasmInitialized) {
2551                         throw new Error("initializeWasm() must be awaited first!");
2552                 }
2553                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_err();
2554                 return nativeResponseValue;
2555         }
2556         // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
2557         export function CResult_TrustedClosingTransactionNoneZ_free(_res: number): void {
2558                 if(!isWasmInitialized) {
2559                         throw new Error("initializeWasm() must be awaited first!");
2560                 }
2561                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_free(_res);
2562                 // debug statements here
2563         }
2564         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
2565         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
2566                 if(!isWasmInitialized) {
2567                         throw new Error("initializeWasm() must be awaited first!");
2568                 }
2569                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
2570                 return nativeResponseValue;
2571         }
2572         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2573         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
2574                 if(!isWasmInitialized) {
2575                         throw new Error("initializeWasm() must be awaited first!");
2576                 }
2577                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
2578                 return nativeResponseValue;
2579         }
2580         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
2581         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
2582                 if(!isWasmInitialized) {
2583                         throw new Error("initializeWasm() must be awaited first!");
2584                 }
2585                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
2586                 // debug statements here
2587         }
2588         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2589         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2590                 if(!isWasmInitialized) {
2591                         throw new Error("initializeWasm() must be awaited first!");
2592                 }
2593                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
2594                 return nativeResponseValue;
2595         }
2596         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2597         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2598                 if(!isWasmInitialized) {
2599                         throw new Error("initializeWasm() must be awaited first!");
2600                 }
2601                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
2602                 return nativeResponseValue;
2603         }
2604         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
2605         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
2606                 if(!isWasmInitialized) {
2607                         throw new Error("initializeWasm() must be awaited first!");
2608                 }
2609                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2610                 return nativeResponseValue;
2611         }
2612         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2613         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2614                 if(!isWasmInitialized) {
2615                         throw new Error("initializeWasm() must be awaited first!");
2616                 }
2617                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2618                 // debug statements here
2619         }
2620         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
2621         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
2622                 if(!isWasmInitialized) {
2623                         throw new Error("initializeWasm() must be awaited first!");
2624                 }
2625                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
2626                 return nativeResponseValue;
2627         }
2628         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
2629         export function CResult_CVec_SignatureZNoneZ_err(): number {
2630                 if(!isWasmInitialized) {
2631                         throw new Error("initializeWasm() must be awaited first!");
2632                 }
2633                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
2634                 return nativeResponseValue;
2635         }
2636         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
2637         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
2638                 if(!isWasmInitialized) {
2639                         throw new Error("initializeWasm() must be awaited first!");
2640                 }
2641                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
2642                 // debug statements here
2643         }
2644         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
2645         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
2646                 if(!isWasmInitialized) {
2647                         throw new Error("initializeWasm() must be awaited first!");
2648                 }
2649                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
2650                 return nativeResponseValue;
2651         }
2652         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
2653         export function CResult_ShutdownScriptDecodeErrorZ_ok(o: number): number {
2654                 if(!isWasmInitialized) {
2655                         throw new Error("initializeWasm() must be awaited first!");
2656                 }
2657                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_ok(o);
2658                 return nativeResponseValue;
2659         }
2660         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
2661         export function CResult_ShutdownScriptDecodeErrorZ_err(e: number): number {
2662                 if(!isWasmInitialized) {
2663                         throw new Error("initializeWasm() must be awaited first!");
2664                 }
2665                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_err(e);
2666                 return nativeResponseValue;
2667         }
2668         // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
2669         export function CResult_ShutdownScriptDecodeErrorZ_free(_res: number): void {
2670                 if(!isWasmInitialized) {
2671                         throw new Error("initializeWasm() must be awaited first!");
2672                 }
2673                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_free(_res);
2674                 // debug statements here
2675         }
2676         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
2677         export function CResult_ShutdownScriptDecodeErrorZ_clone(orig: number): number {
2678                 if(!isWasmInitialized) {
2679                         throw new Error("initializeWasm() must be awaited first!");
2680                 }
2681                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_clone(orig);
2682                 return nativeResponseValue;
2683         }
2684         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
2685         export function CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o: number): number {
2686                 if(!isWasmInitialized) {
2687                         throw new Error("initializeWasm() must be awaited first!");
2688                 }
2689                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o);
2690                 return nativeResponseValue;
2691         }
2692         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
2693         export function CResult_ShutdownScriptInvalidShutdownScriptZ_err(e: number): number {
2694                 if(!isWasmInitialized) {
2695                         throw new Error("initializeWasm() must be awaited first!");
2696                 }
2697                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e);
2698                 return nativeResponseValue;
2699         }
2700         // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
2701         export function CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res: number): void {
2702                 if(!isWasmInitialized) {
2703                         throw new Error("initializeWasm() must be awaited first!");
2704                 }
2705                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res);
2706                 // debug statements here
2707         }
2708         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
2709         export function CResult_NoneErrorZ_ok(): number {
2710                 if(!isWasmInitialized) {
2711                         throw new Error("initializeWasm() must be awaited first!");
2712                 }
2713                 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
2714                 return nativeResponseValue;
2715         }
2716         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
2717         export function CResult_NoneErrorZ_err(e: IOError): number {
2718                 if(!isWasmInitialized) {
2719                         throw new Error("initializeWasm() must be awaited first!");
2720                 }
2721                 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
2722                 return nativeResponseValue;
2723         }
2724         // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
2725         export function CResult_NoneErrorZ_free(_res: number): void {
2726                 if(!isWasmInitialized) {
2727                         throw new Error("initializeWasm() must be awaited first!");
2728                 }
2729                 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
2730                 // debug statements here
2731         }
2732         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
2733         export function CResult_NoneErrorZ_clone(orig: number): number {
2734                 if(!isWasmInitialized) {
2735                         throw new Error("initializeWasm() must be awaited first!");
2736                 }
2737                 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
2738                 return nativeResponseValue;
2739         }
2740         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
2741         export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
2742                 if(!isWasmInitialized) {
2743                         throw new Error("initializeWasm() must be awaited first!");
2744                 }
2745                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
2746                 return nativeResponseValue;
2747         }
2748         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
2749         export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
2750                 if(!isWasmInitialized) {
2751                         throw new Error("initializeWasm() must be awaited first!");
2752                 }
2753                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
2754                 return nativeResponseValue;
2755         }
2756         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
2757         export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
2758                 if(!isWasmInitialized) {
2759                         throw new Error("initializeWasm() must be awaited first!");
2760                 }
2761                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
2762                 // debug statements here
2763         }
2764         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
2765         export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
2766                 if(!isWasmInitialized) {
2767                         throw new Error("initializeWasm() must be awaited first!");
2768                 }
2769                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
2770                 return nativeResponseValue;
2771         }
2772         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
2773         export function CVec_RouteHopZ_free(_res: number[]): void {
2774                 if(!isWasmInitialized) {
2775                         throw new Error("initializeWasm() must be awaited first!");
2776                 }
2777                 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
2778                 // debug statements here
2779         }
2780         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
2781         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
2782                 if(!isWasmInitialized) {
2783                         throw new Error("initializeWasm() must be awaited first!");
2784                 }
2785                 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
2786                 // debug statements here
2787         }
2788         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
2789         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
2790                 if(!isWasmInitialized) {
2791                         throw new Error("initializeWasm() must be awaited first!");
2792                 }
2793                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
2794                 return nativeResponseValue;
2795         }
2796         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
2797         export function CResult_RouteDecodeErrorZ_err(e: number): number {
2798                 if(!isWasmInitialized) {
2799                         throw new Error("initializeWasm() must be awaited first!");
2800                 }
2801                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
2802                 return nativeResponseValue;
2803         }
2804         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
2805         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
2806                 if(!isWasmInitialized) {
2807                         throw new Error("initializeWasm() must be awaited first!");
2808                 }
2809                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
2810                 // debug statements here
2811         }
2812         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
2813         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
2814                 if(!isWasmInitialized) {
2815                         throw new Error("initializeWasm() must be awaited first!");
2816                 }
2817                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
2818                 return nativeResponseValue;
2819         }
2820         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
2821         export function COption_u64Z_some(o: number): number {
2822                 if(!isWasmInitialized) {
2823                         throw new Error("initializeWasm() must be awaited first!");
2824                 }
2825                 const nativeResponseValue = wasm.COption_u64Z_some(o);
2826                 return nativeResponseValue;
2827         }
2828         // struct LDKCOption_u64Z COption_u64Z_none(void);
2829         export function COption_u64Z_none(): number {
2830                 if(!isWasmInitialized) {
2831                         throw new Error("initializeWasm() must be awaited first!");
2832                 }
2833                 const nativeResponseValue = wasm.COption_u64Z_none();
2834                 return nativeResponseValue;
2835         }
2836         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
2837         export function COption_u64Z_free(_res: number): void {
2838                 if(!isWasmInitialized) {
2839                         throw new Error("initializeWasm() must be awaited first!");
2840                 }
2841                 const nativeResponseValue = wasm.COption_u64Z_free(_res);
2842                 // debug statements here
2843         }
2844         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
2845         export function COption_u64Z_clone(orig: number): number {
2846                 if(!isWasmInitialized) {
2847                         throw new Error("initializeWasm() must be awaited first!");
2848                 }
2849                 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
2850                 return nativeResponseValue;
2851         }
2852         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2853         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
2854                 if(!isWasmInitialized) {
2855                         throw new Error("initializeWasm() must be awaited first!");
2856                 }
2857                 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
2858                 // debug statements here
2859         }
2860         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
2861         export function CVec_RouteHintZ_free(_res: number[]): void {
2862                 if(!isWasmInitialized) {
2863                         throw new Error("initializeWasm() must be awaited first!");
2864                 }
2865                 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
2866                 // debug statements here
2867         }
2868         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
2869         export function CResult_RouteLightningErrorZ_ok(o: number): number {
2870                 if(!isWasmInitialized) {
2871                         throw new Error("initializeWasm() must be awaited first!");
2872                 }
2873                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
2874                 return nativeResponseValue;
2875         }
2876         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
2877         export function CResult_RouteLightningErrorZ_err(e: number): number {
2878                 if(!isWasmInitialized) {
2879                         throw new Error("initializeWasm() must be awaited first!");
2880                 }
2881                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
2882                 return nativeResponseValue;
2883         }
2884         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
2885         export function CResult_RouteLightningErrorZ_free(_res: number): void {
2886                 if(!isWasmInitialized) {
2887                         throw new Error("initializeWasm() must be awaited first!");
2888                 }
2889                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
2890                 // debug statements here
2891         }
2892         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
2893         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
2894                 if(!isWasmInitialized) {
2895                         throw new Error("initializeWasm() must be awaited first!");
2896                 }
2897                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
2898                 return nativeResponseValue;
2899         }
2900         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2901         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2902                 if(!isWasmInitialized) {
2903                         throw new Error("initializeWasm() must be awaited first!");
2904                 }
2905                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2906                 return nativeResponseValue;
2907         }
2908         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2909         export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
2910                 if(!isWasmInitialized) {
2911                         throw new Error("initializeWasm() must be awaited first!");
2912                 }
2913                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2914                 return nativeResponseValue;
2915         }
2916         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2917         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2918                 if(!isWasmInitialized) {
2919                         throw new Error("initializeWasm() must be awaited first!");
2920                 }
2921                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2922                 // debug statements here
2923         }
2924         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2925         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2926                 if(!isWasmInitialized) {
2927                         throw new Error("initializeWasm() must be awaited first!");
2928                 }
2929                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2930                 return nativeResponseValue;
2931         }
2932         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
2933         export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
2934                 if(!isWasmInitialized) {
2935                         throw new Error("initializeWasm() must be awaited first!");
2936                 }
2937                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
2938                 return nativeResponseValue;
2939         }
2940         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2941         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2942                 if(!isWasmInitialized) {
2943                         throw new Error("initializeWasm() must be awaited first!");
2944                 }
2945                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2946                 return nativeResponseValue;
2947         }
2948         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2949         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2950                 if(!isWasmInitialized) {
2951                         throw new Error("initializeWasm() must be awaited first!");
2952                 }
2953                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2954                 // debug statements here
2955         }
2956         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2957         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2958                 if(!isWasmInitialized) {
2959                         throw new Error("initializeWasm() must be awaited first!");
2960                 }
2961                 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2962                 // debug statements here
2963         }
2964         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
2965         export function CVec_TxidZ_free(_res: Uint8Array[]): void {
2966                 if(!isWasmInitialized) {
2967                         throw new Error("initializeWasm() must be awaited first!");
2968                 }
2969                 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
2970                 // debug statements here
2971         }
2972         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2973         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2974                 if(!isWasmInitialized) {
2975                         throw new Error("initializeWasm() must be awaited first!");
2976                 }
2977                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2978                 return nativeResponseValue;
2979         }
2980         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2981         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
2982                 if(!isWasmInitialized) {
2983                         throw new Error("initializeWasm() must be awaited first!");
2984                 }
2985                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2986                 return nativeResponseValue;
2987         }
2988         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2989         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2990                 if(!isWasmInitialized) {
2991                         throw new Error("initializeWasm() must be awaited first!");
2992                 }
2993                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2994                 // debug statements here
2995         }
2996         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2997         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2998                 if(!isWasmInitialized) {
2999                         throw new Error("initializeWasm() must be awaited first!");
3000                 }
3001                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
3002                 return nativeResponseValue;
3003         }
3004         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
3005         export function CVec_MonitorEventZ_free(_res: number[]): void {
3006                 if(!isWasmInitialized) {
3007                         throw new Error("initializeWasm() must be awaited first!");
3008                 }
3009                 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
3010                 // debug statements here
3011         }
3012         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
3013         export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
3014                 if(!isWasmInitialized) {
3015                         throw new Error("initializeWasm() must be awaited first!");
3016                 }
3017                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
3018                 return nativeResponseValue;
3019         }
3020         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
3021         export function COption_C2Tuple_usizeTransactionZZ_none(): number {
3022                 if(!isWasmInitialized) {
3023                         throw new Error("initializeWasm() must be awaited first!");
3024                 }
3025                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
3026                 return nativeResponseValue;
3027         }
3028         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
3029         export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
3030                 if(!isWasmInitialized) {
3031                         throw new Error("initializeWasm() must be awaited first!");
3032                 }
3033                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
3034                 // debug statements here
3035         }
3036         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
3037         export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
3038                 if(!isWasmInitialized) {
3039                         throw new Error("initializeWasm() must be awaited first!");
3040                 }
3041                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
3042                 return nativeResponseValue;
3043         }
3044         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
3045         export function COption_NetworkUpdateZ_some(o: number): number {
3046                 if(!isWasmInitialized) {
3047                         throw new Error("initializeWasm() must be awaited first!");
3048                 }
3049                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_some(o);
3050                 return nativeResponseValue;
3051         }
3052         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
3053         export function COption_NetworkUpdateZ_none(): number {
3054                 if(!isWasmInitialized) {
3055                         throw new Error("initializeWasm() must be awaited first!");
3056                 }
3057                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_none();
3058                 return nativeResponseValue;
3059         }
3060         // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
3061         export function COption_NetworkUpdateZ_free(_res: number): void {
3062                 if(!isWasmInitialized) {
3063                         throw new Error("initializeWasm() must be awaited first!");
3064                 }
3065                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_free(_res);
3066                 // debug statements here
3067         }
3068         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
3069         export function COption_NetworkUpdateZ_clone(orig: number): number {
3070                 if(!isWasmInitialized) {
3071                         throw new Error("initializeWasm() must be awaited first!");
3072                 }
3073                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_clone(orig);
3074                 return nativeResponseValue;
3075         }
3076         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
3077         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
3078                 if(!isWasmInitialized) {
3079                         throw new Error("initializeWasm() must be awaited first!");
3080                 }
3081                 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
3082                 // debug statements here
3083         }
3084         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
3085         export function CVec_MessageSendEventZ_free(_res: number[]): void {
3086                 if(!isWasmInitialized) {
3087                         throw new Error("initializeWasm() must be awaited first!");
3088                 }
3089                 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
3090                 // debug statements here
3091         }
3092         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
3093         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
3094                 if(!isWasmInitialized) {
3095                         throw new Error("initializeWasm() must be awaited first!");
3096                 }
3097                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
3098                 return nativeResponseValue;
3099         }
3100         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3101         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
3102                 if(!isWasmInitialized) {
3103                         throw new Error("initializeWasm() must be awaited first!");
3104                 }
3105                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
3106                 return nativeResponseValue;
3107         }
3108         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
3109         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
3110                 if(!isWasmInitialized) {
3111                         throw new Error("initializeWasm() must be awaited first!");
3112                 }
3113                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
3114                 // debug statements here
3115         }
3116         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
3117         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
3118                 if(!isWasmInitialized) {
3119                         throw new Error("initializeWasm() must be awaited first!");
3120                 }
3121                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
3122                 return nativeResponseValue;
3123         }
3124         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3125         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
3126                 if(!isWasmInitialized) {
3127                         throw new Error("initializeWasm() must be awaited first!");
3128                 }
3129                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
3130                 return nativeResponseValue;
3131         }
3132         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
3133         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
3134                 if(!isWasmInitialized) {
3135                         throw new Error("initializeWasm() must be awaited first!");
3136                 }
3137                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
3138                 // debug statements here
3139         }
3140         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
3141         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
3142                 if(!isWasmInitialized) {
3143                         throw new Error("initializeWasm() must be awaited first!");
3144                 }
3145                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
3146                 return nativeResponseValue;
3147         }
3148         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3149         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
3150                 if(!isWasmInitialized) {
3151                         throw new Error("initializeWasm() must be awaited first!");
3152                 }
3153                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
3154                 return nativeResponseValue;
3155         }
3156         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
3157         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
3158                 if(!isWasmInitialized) {
3159                         throw new Error("initializeWasm() must be awaited first!");
3160                 }
3161                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
3162                 // debug statements here
3163         }
3164         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
3165         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
3166                 if(!isWasmInitialized) {
3167                         throw new Error("initializeWasm() must be awaited first!");
3168                 }
3169                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
3170                 return nativeResponseValue;
3171         }
3172         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3173         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
3174                 if(!isWasmInitialized) {
3175                         throw new Error("initializeWasm() must be awaited first!");
3176                 }
3177                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
3178                 return nativeResponseValue;
3179         }
3180         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
3181         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
3182                 if(!isWasmInitialized) {
3183                         throw new Error("initializeWasm() must be awaited first!");
3184                 }
3185                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
3186                 // debug statements here
3187         }
3188         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
3189         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
3190                 if(!isWasmInitialized) {
3191                         throw new Error("initializeWasm() must be awaited first!");
3192                 }
3193                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
3194                 return nativeResponseValue;
3195         }
3196         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3197         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
3198                 if(!isWasmInitialized) {
3199                         throw new Error("initializeWasm() must be awaited first!");
3200                 }
3201                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
3202                 return nativeResponseValue;
3203         }
3204         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
3205         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
3206                 if(!isWasmInitialized) {
3207                         throw new Error("initializeWasm() must be awaited first!");
3208                 }
3209                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
3210                 // debug statements here
3211         }
3212         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3213         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3214                 if(!isWasmInitialized) {
3215                         throw new Error("initializeWasm() must be awaited first!");
3216                 }
3217                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
3218                 return nativeResponseValue;
3219         }
3220         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
3221         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
3222                 if(!isWasmInitialized) {
3223                         throw new Error("initializeWasm() must be awaited first!");
3224                 }
3225                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
3226                 return nativeResponseValue;
3227         }
3228         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3229         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
3230                 if(!isWasmInitialized) {
3231                         throw new Error("initializeWasm() must be awaited first!");
3232                 }
3233                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
3234                 return nativeResponseValue;
3235         }
3236         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
3237         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
3238                 if(!isWasmInitialized) {
3239                         throw new Error("initializeWasm() must be awaited first!");
3240                 }
3241                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
3242                 // debug statements here
3243         }
3244         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3245         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3246                 if(!isWasmInitialized) {
3247                         throw new Error("initializeWasm() must be awaited first!");
3248                 }
3249                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
3250                 return nativeResponseValue;
3251         }
3252         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
3253         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
3254                 if(!isWasmInitialized) {
3255                         throw new Error("initializeWasm() must be awaited first!");
3256                 }
3257                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
3258                 return nativeResponseValue;
3259         }
3260         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3261         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
3262                 if(!isWasmInitialized) {
3263                         throw new Error("initializeWasm() must be awaited first!");
3264                 }
3265                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
3266                 return nativeResponseValue;
3267         }
3268         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
3269         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
3270                 if(!isWasmInitialized) {
3271                         throw new Error("initializeWasm() must be awaited first!");
3272                 }
3273                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
3274                 // debug statements here
3275         }
3276         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3277         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3278                 if(!isWasmInitialized) {
3279                         throw new Error("initializeWasm() must be awaited first!");
3280                 }
3281                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
3282                 return nativeResponseValue;
3283         }
3284         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
3285         export function CResult_NoneNoneZ_ok(): number {
3286                 if(!isWasmInitialized) {
3287                         throw new Error("initializeWasm() must be awaited first!");
3288                 }
3289                 const nativeResponseValue = wasm.CResult_NoneNoneZ_ok();
3290                 return nativeResponseValue;
3291         }
3292         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
3293         export function CResult_NoneNoneZ_err(): number {
3294                 if(!isWasmInitialized) {
3295                         throw new Error("initializeWasm() must be awaited first!");
3296                 }
3297                 const nativeResponseValue = wasm.CResult_NoneNoneZ_err();
3298                 return nativeResponseValue;
3299         }
3300         // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
3301         export function CResult_NoneNoneZ_free(_res: number): void {
3302                 if(!isWasmInitialized) {
3303                         throw new Error("initializeWasm() must be awaited first!");
3304                 }
3305                 const nativeResponseValue = wasm.CResult_NoneNoneZ_free(_res);
3306                 // debug statements here
3307         }
3308         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
3309         export function CResult_NoneNoneZ_clone(orig: number): number {
3310                 if(!isWasmInitialized) {
3311                         throw new Error("initializeWasm() must be awaited first!");
3312                 }
3313                 const nativeResponseValue = wasm.CResult_NoneNoneZ_clone(orig);
3314                 return nativeResponseValue;
3315         }
3316         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
3317         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
3318                 if(!isWasmInitialized) {
3319                         throw new Error("initializeWasm() must be awaited first!");
3320                 }
3321                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
3322                 return nativeResponseValue;
3323         }
3324         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
3325         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
3326                 if(!isWasmInitialized) {
3327                         throw new Error("initializeWasm() must be awaited first!");
3328                 }
3329                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
3330                 return nativeResponseValue;
3331         }
3332         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
3333         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
3334                 if(!isWasmInitialized) {
3335                         throw new Error("initializeWasm() must be awaited first!");
3336                 }
3337                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
3338                 // debug statements here
3339         }
3340         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
3341         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
3342                 if(!isWasmInitialized) {
3343                         throw new Error("initializeWasm() must be awaited first!");
3344                 }
3345                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
3346                 return nativeResponseValue;
3347         }
3348         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
3349         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
3350                 if(!isWasmInitialized) {
3351                         throw new Error("initializeWasm() must be awaited first!");
3352                 }
3353                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
3354                 return nativeResponseValue;
3355         }
3356         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
3357         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
3358                 if(!isWasmInitialized) {
3359                         throw new Error("initializeWasm() must be awaited first!");
3360                 }
3361                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
3362                 // debug statements here
3363         }
3364         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
3365         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
3366                 if(!isWasmInitialized) {
3367                         throw new Error("initializeWasm() must be awaited first!");
3368                 }
3369                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
3370                 return nativeResponseValue;
3371         }
3372         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
3373         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
3374                 if(!isWasmInitialized) {
3375                         throw new Error("initializeWasm() must be awaited first!");
3376                 }
3377                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
3378                 return nativeResponseValue;
3379         }
3380         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
3381         export function CResult_SignatureNoneZ_err(): number {
3382                 if(!isWasmInitialized) {
3383                         throw new Error("initializeWasm() must be awaited first!");
3384                 }
3385                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
3386                 return nativeResponseValue;
3387         }
3388         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
3389         export function CResult_SignatureNoneZ_free(_res: number): void {
3390                 if(!isWasmInitialized) {
3391                         throw new Error("initializeWasm() must be awaited first!");
3392                 }
3393                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
3394                 // debug statements here
3395         }
3396         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
3397         export function CResult_SignatureNoneZ_clone(orig: number): number {
3398                 if(!isWasmInitialized) {
3399                         throw new Error("initializeWasm() must be awaited first!");
3400                 }
3401                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
3402                 return nativeResponseValue;
3403         }
3404         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
3405         export function CResult_SignDecodeErrorZ_ok(o: number): number {
3406                 if(!isWasmInitialized) {
3407                         throw new Error("initializeWasm() must be awaited first!");
3408                 }
3409                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
3410                 return nativeResponseValue;
3411         }
3412         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
3413         export function CResult_SignDecodeErrorZ_err(e: number): number {
3414                 if(!isWasmInitialized) {
3415                         throw new Error("initializeWasm() must be awaited first!");
3416                 }
3417                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
3418                 return nativeResponseValue;
3419         }
3420         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
3421         export function CResult_SignDecodeErrorZ_free(_res: number): void {
3422                 if(!isWasmInitialized) {
3423                         throw new Error("initializeWasm() must be awaited first!");
3424                 }
3425                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
3426                 // debug statements here
3427         }
3428         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
3429         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
3430                 if(!isWasmInitialized) {
3431                         throw new Error("initializeWasm() must be awaited first!");
3432                 }
3433                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
3434                 return nativeResponseValue;
3435         }
3436         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
3437         export function CVec_u8Z_free(_res: Uint8Array): void {
3438                 if(!isWasmInitialized) {
3439                         throw new Error("initializeWasm() must be awaited first!");
3440                 }
3441                 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
3442                 // debug statements here
3443         }
3444         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
3445         export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
3446                 if(!isWasmInitialized) {
3447                         throw new Error("initializeWasm() must be awaited first!");
3448                 }
3449                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_ok(encodeArray(arg));
3450                 return nativeResponseValue;
3451         }
3452         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
3453         export function CResult_RecoverableSignatureNoneZ_err(): number {
3454                 if(!isWasmInitialized) {
3455                         throw new Error("initializeWasm() must be awaited first!");
3456                 }
3457                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_err();
3458                 return nativeResponseValue;
3459         }
3460         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
3461         export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
3462                 if(!isWasmInitialized) {
3463                         throw new Error("initializeWasm() must be awaited first!");
3464                 }
3465                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_free(_res);
3466                 // debug statements here
3467         }
3468         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
3469         export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
3470                 if(!isWasmInitialized) {
3471                         throw new Error("initializeWasm() must be awaited first!");
3472                 }
3473                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone(orig);
3474                 return nativeResponseValue;
3475         }
3476         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3477         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3478                 if(!isWasmInitialized) {
3479                         throw new Error("initializeWasm() must be awaited first!");
3480                 }
3481                 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3482                 // debug statements here
3483         }
3484         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3485         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3486                 if(!isWasmInitialized) {
3487                         throw new Error("initializeWasm() must be awaited first!");
3488                 }
3489                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3490                 return nativeResponseValue;
3491         }
3492         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3493         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3494                 if(!isWasmInitialized) {
3495                         throw new Error("initializeWasm() must be awaited first!");
3496                 }
3497                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3498                 return nativeResponseValue;
3499         }
3500         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3501         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3502                 if(!isWasmInitialized) {
3503                         throw new Error("initializeWasm() must be awaited first!");
3504                 }
3505                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3506                 // debug statements here
3507         }
3508         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3509         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3510                 if(!isWasmInitialized) {
3511                         throw new Error("initializeWasm() must be awaited first!");
3512                 }
3513                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3514                 return nativeResponseValue;
3515         }
3516         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3517         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3518                 if(!isWasmInitialized) {
3519                         throw new Error("initializeWasm() must be awaited first!");
3520                 }
3521                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3522                 return nativeResponseValue;
3523         }
3524         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3525         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3526                 if(!isWasmInitialized) {
3527                         throw new Error("initializeWasm() must be awaited first!");
3528                 }
3529                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3530                 return nativeResponseValue;
3531         }
3532         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3533         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3534                 if(!isWasmInitialized) {
3535                         throw new Error("initializeWasm() must be awaited first!");
3536                 }
3537                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3538                 // debug statements here
3539         }
3540         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3541         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3542                 if(!isWasmInitialized) {
3543                         throw new Error("initializeWasm() must be awaited first!");
3544                 }
3545                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3546                 return nativeResponseValue;
3547         }
3548         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3549         export function CVec_TxOutZ_free(_res: number[]): void {
3550                 if(!isWasmInitialized) {
3551                         throw new Error("initializeWasm() must be awaited first!");
3552                 }
3553                 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3554                 // debug statements here
3555         }
3556         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3557         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3558                 if(!isWasmInitialized) {
3559                         throw new Error("initializeWasm() must be awaited first!");
3560                 }
3561                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3562                 return nativeResponseValue;
3563         }
3564         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3565         export function CResult_TransactionNoneZ_err(): number {
3566                 if(!isWasmInitialized) {
3567                         throw new Error("initializeWasm() must be awaited first!");
3568                 }
3569                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3570                 return nativeResponseValue;
3571         }
3572         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3573         export function CResult_TransactionNoneZ_free(_res: number): void {
3574                 if(!isWasmInitialized) {
3575                         throw new Error("initializeWasm() must be awaited first!");
3576                 }
3577                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3578                 // debug statements here
3579         }
3580         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
3581         export function CResult_TransactionNoneZ_clone(orig: number): number {
3582                 if(!isWasmInitialized) {
3583                         throw new Error("initializeWasm() must be awaited first!");
3584                 }
3585                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
3586                 return nativeResponseValue;
3587         }
3588         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
3589         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
3590                 if(!isWasmInitialized) {
3591                         throw new Error("initializeWasm() must be awaited first!");
3592                 }
3593                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
3594                 return nativeResponseValue;
3595         }
3596         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
3597         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
3598                 if(!isWasmInitialized) {
3599                         throw new Error("initializeWasm() must be awaited first!");
3600                 }
3601                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
3602                 // debug statements here
3603         }
3604         // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
3605         export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
3606                 if(!isWasmInitialized) {
3607                         throw new Error("initializeWasm() must be awaited first!");
3608                 }
3609                 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
3610                 // debug statements here
3611         }
3612         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
3613         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
3614                 if(!isWasmInitialized) {
3615                         throw new Error("initializeWasm() must be awaited first!");
3616                 }
3617                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
3618                 return nativeResponseValue;
3619         }
3620         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
3621         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: IOError): number {
3622                 if(!isWasmInitialized) {
3623                         throw new Error("initializeWasm() must be awaited first!");
3624                 }
3625                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
3626                 return nativeResponseValue;
3627         }
3628         // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
3629         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
3630                 if(!isWasmInitialized) {
3631                         throw new Error("initializeWasm() must be awaited first!");
3632                 }
3633                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
3634                 // debug statements here
3635         }
3636         // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
3637         export function COption_u16Z_some(o: number): number {
3638                 if(!isWasmInitialized) {
3639                         throw new Error("initializeWasm() must be awaited first!");
3640                 }
3641                 const nativeResponseValue = wasm.COption_u16Z_some(o);
3642                 return nativeResponseValue;
3643         }
3644         // struct LDKCOption_u16Z COption_u16Z_none(void);
3645         export function COption_u16Z_none(): number {
3646                 if(!isWasmInitialized) {
3647                         throw new Error("initializeWasm() must be awaited first!");
3648                 }
3649                 const nativeResponseValue = wasm.COption_u16Z_none();
3650                 return nativeResponseValue;
3651         }
3652         // void COption_u16Z_free(struct LDKCOption_u16Z _res);
3653         export function COption_u16Z_free(_res: number): void {
3654                 if(!isWasmInitialized) {
3655                         throw new Error("initializeWasm() must be awaited first!");
3656                 }
3657                 const nativeResponseValue = wasm.COption_u16Z_free(_res);
3658                 // debug statements here
3659         }
3660         // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
3661         export function COption_u16Z_clone(orig: number): number {
3662                 if(!isWasmInitialized) {
3663                         throw new Error("initializeWasm() must be awaited first!");
3664                 }
3665                 const nativeResponseValue = wasm.COption_u16Z_clone(orig);
3666                 return nativeResponseValue;
3667         }
3668         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
3669         export function CResult_NoneAPIErrorZ_ok(): number {
3670                 if(!isWasmInitialized) {
3671                         throw new Error("initializeWasm() must be awaited first!");
3672                 }
3673                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
3674                 return nativeResponseValue;
3675         }
3676         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
3677         export function CResult_NoneAPIErrorZ_err(e: number): number {
3678                 if(!isWasmInitialized) {
3679                         throw new Error("initializeWasm() must be awaited first!");
3680                 }
3681                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
3682                 return nativeResponseValue;
3683         }
3684         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
3685         export function CResult_NoneAPIErrorZ_free(_res: number): void {
3686                 if(!isWasmInitialized) {
3687                         throw new Error("initializeWasm() must be awaited first!");
3688                 }
3689                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
3690                 // debug statements here
3691         }
3692         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
3693         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
3694                 if(!isWasmInitialized) {
3695                         throw new Error("initializeWasm() must be awaited first!");
3696                 }
3697                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
3698                 return nativeResponseValue;
3699         }
3700         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
3701         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
3702                 if(!isWasmInitialized) {
3703                         throw new Error("initializeWasm() must be awaited first!");
3704                 }
3705                 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
3706                 // debug statements here
3707         }
3708         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
3709         export function CVec_APIErrorZ_free(_res: number[]): void {
3710                 if(!isWasmInitialized) {
3711                         throw new Error("initializeWasm() must be awaited first!");
3712                 }
3713                 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
3714                 // debug statements here
3715         }
3716         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
3717         export function CResult_NonePaymentSendFailureZ_ok(): number {
3718                 if(!isWasmInitialized) {
3719                         throw new Error("initializeWasm() must be awaited first!");
3720                 }
3721                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
3722                 return nativeResponseValue;
3723         }
3724         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3725         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
3726                 if(!isWasmInitialized) {
3727                         throw new Error("initializeWasm() must be awaited first!");
3728                 }
3729                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
3730                 return nativeResponseValue;
3731         }
3732         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
3733         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
3734                 if(!isWasmInitialized) {
3735                         throw new Error("initializeWasm() must be awaited first!");
3736                 }
3737                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
3738                 // debug statements here
3739         }
3740         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
3741         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
3742                 if(!isWasmInitialized) {
3743                         throw new Error("initializeWasm() must be awaited first!");
3744                 }
3745                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
3746                 return nativeResponseValue;
3747         }
3748         // struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
3749         export function CResult_PaymentHashPaymentSendFailureZ_ok(o: Uint8Array): number {
3750                 if(!isWasmInitialized) {
3751                         throw new Error("initializeWasm() must be awaited first!");
3752                 }
3753                 const nativeResponseValue = wasm.CResult_PaymentHashPaymentSendFailureZ_ok(encodeArray(o));
3754                 return nativeResponseValue;
3755         }
3756         // struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3757         export function CResult_PaymentHashPaymentSendFailureZ_err(e: number): number {
3758                 if(!isWasmInitialized) {
3759                         throw new Error("initializeWasm() must be awaited first!");
3760                 }
3761                 const nativeResponseValue = wasm.CResult_PaymentHashPaymentSendFailureZ_err(e);
3762                 return nativeResponseValue;
3763         }
3764         // void CResult_PaymentHashPaymentSendFailureZ_free(struct LDKCResult_PaymentHashPaymentSendFailureZ _res);
3765         export function CResult_PaymentHashPaymentSendFailureZ_free(_res: number): void {
3766                 if(!isWasmInitialized) {
3767                         throw new Error("initializeWasm() must be awaited first!");
3768                 }
3769                 const nativeResponseValue = wasm.CResult_PaymentHashPaymentSendFailureZ_free(_res);
3770                 // debug statements here
3771         }
3772         // struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_clone(const struct LDKCResult_PaymentHashPaymentSendFailureZ *NONNULL_PTR orig);
3773         export function CResult_PaymentHashPaymentSendFailureZ_clone(orig: number): number {
3774                 if(!isWasmInitialized) {
3775                         throw new Error("initializeWasm() must be awaited first!");
3776                 }
3777                 const nativeResponseValue = wasm.CResult_PaymentHashPaymentSendFailureZ_clone(orig);
3778                 return nativeResponseValue;
3779         }
3780         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
3781         export function CVec_NetAddressZ_free(_res: number[]): void {
3782                 if(!isWasmInitialized) {
3783                         throw new Error("initializeWasm() must be awaited first!");
3784                 }
3785                 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
3786                 // debug statements here
3787         }
3788         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
3789         export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
3790                 if(!isWasmInitialized) {
3791                         throw new Error("initializeWasm() must be awaited first!");
3792                 }
3793                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
3794                 return nativeResponseValue;
3795         }
3796         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
3797         export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
3798                 if(!isWasmInitialized) {
3799                         throw new Error("initializeWasm() must be awaited first!");
3800                 }
3801                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_new(encodeArray(a), encodeArray(b));
3802                 return nativeResponseValue;
3803         }
3804         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
3805         export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
3806                 if(!isWasmInitialized) {
3807                         throw new Error("initializeWasm() must be awaited first!");
3808                 }
3809                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_free(_res);
3810                 // debug statements here
3811         }
3812         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
3813         export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
3814                 if(!isWasmInitialized) {
3815                         throw new Error("initializeWasm() must be awaited first!");
3816                 }
3817                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_ok(encodeArray(o));
3818                 return nativeResponseValue;
3819         }
3820         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
3821         export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
3822                 if(!isWasmInitialized) {
3823                         throw new Error("initializeWasm() must be awaited first!");
3824                 }
3825                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_err(e);
3826                 return nativeResponseValue;
3827         }
3828         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
3829         export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
3830                 if(!isWasmInitialized) {
3831                         throw new Error("initializeWasm() must be awaited first!");
3832                 }
3833                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_free(_res);
3834                 // debug statements here
3835         }
3836         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
3837         export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
3838                 if(!isWasmInitialized) {
3839                         throw new Error("initializeWasm() must be awaited first!");
3840                 }
3841                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone(orig);
3842                 return nativeResponseValue;
3843         }
3844         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
3845         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
3846                 if(!isWasmInitialized) {
3847                         throw new Error("initializeWasm() must be awaited first!");
3848                 }
3849                 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
3850                 // debug statements here
3851         }
3852         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
3853         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
3854                 if(!isWasmInitialized) {
3855                         throw new Error("initializeWasm() must be awaited first!");
3856                 }
3857                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
3858                 return nativeResponseValue;
3859         }
3860         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
3861         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
3862                 if(!isWasmInitialized) {
3863                         throw new Error("initializeWasm() must be awaited first!");
3864                 }
3865                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
3866                 // debug statements here
3867         }
3868         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
3869         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
3870                 if(!isWasmInitialized) {
3871                         throw new Error("initializeWasm() must be awaited first!");
3872                 }
3873                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
3874                 return nativeResponseValue;
3875         }
3876         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
3877         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
3878                 if(!isWasmInitialized) {
3879                         throw new Error("initializeWasm() must be awaited first!");
3880                 }
3881                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
3882                 return nativeResponseValue;
3883         }
3884         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
3885         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
3886                 if(!isWasmInitialized) {
3887                         throw new Error("initializeWasm() must be awaited first!");
3888                 }
3889                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
3890                 // debug statements here
3891         }
3892         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
3893         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
3894                 if(!isWasmInitialized) {
3895                         throw new Error("initializeWasm() must be awaited first!");
3896                 }
3897                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
3898                 return nativeResponseValue;
3899         }
3900         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
3901         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
3902                 if(!isWasmInitialized) {
3903                         throw new Error("initializeWasm() must be awaited first!");
3904                 }
3905                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
3906                 return nativeResponseValue;
3907         }
3908         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
3909         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
3910                 if(!isWasmInitialized) {
3911                         throw new Error("initializeWasm() must be awaited first!");
3912                 }
3913                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
3914                 // debug statements here
3915         }
3916         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
3917         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
3918                 if(!isWasmInitialized) {
3919                         throw new Error("initializeWasm() must be awaited first!");
3920                 }
3921                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
3922                 return nativeResponseValue;
3923         }
3924         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
3925         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
3926                 if(!isWasmInitialized) {
3927                         throw new Error("initializeWasm() must be awaited first!");
3928                 }
3929                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
3930                 return nativeResponseValue;
3931         }
3932         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
3933         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
3934                 if(!isWasmInitialized) {
3935                         throw new Error("initializeWasm() must be awaited first!");
3936                 }
3937                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
3938                 return nativeResponseValue;
3939         }
3940         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
3941         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
3942                 if(!isWasmInitialized) {
3943                         throw new Error("initializeWasm() must be awaited first!");
3944                 }
3945                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
3946                 // debug statements here
3947         }
3948         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
3949         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
3950                 if(!isWasmInitialized) {
3951                         throw new Error("initializeWasm() must be awaited first!");
3952                 }
3953                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
3954                 return nativeResponseValue;
3955         }
3956         // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
3957         export function COption_TypeZ_some(o: number): number {
3958                 if(!isWasmInitialized) {
3959                         throw new Error("initializeWasm() must be awaited first!");
3960                 }
3961                 const nativeResponseValue = wasm.COption_TypeZ_some(o);
3962                 return nativeResponseValue;
3963         }
3964         // struct LDKCOption_TypeZ COption_TypeZ_none(void);
3965         export function COption_TypeZ_none(): number {
3966                 if(!isWasmInitialized) {
3967                         throw new Error("initializeWasm() must be awaited first!");
3968                 }
3969                 const nativeResponseValue = wasm.COption_TypeZ_none();
3970                 return nativeResponseValue;
3971         }
3972         // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
3973         export function COption_TypeZ_free(_res: number): void {
3974                 if(!isWasmInitialized) {
3975                         throw new Error("initializeWasm() must be awaited first!");
3976                 }
3977                 const nativeResponseValue = wasm.COption_TypeZ_free(_res);
3978                 // debug statements here
3979         }
3980         // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
3981         export function COption_TypeZ_clone(orig: number): number {
3982                 if(!isWasmInitialized) {
3983                         throw new Error("initializeWasm() must be awaited first!");
3984                 }
3985                 const nativeResponseValue = wasm.COption_TypeZ_clone(orig);
3986                 return nativeResponseValue;
3987         }
3988         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
3989         export function CResult_COption_TypeZDecodeErrorZ_ok(o: number): number {
3990                 if(!isWasmInitialized) {
3991                         throw new Error("initializeWasm() must be awaited first!");
3992                 }
3993                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_ok(o);
3994                 return nativeResponseValue;
3995         }
3996         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
3997         export function CResult_COption_TypeZDecodeErrorZ_err(e: number): number {
3998                 if(!isWasmInitialized) {
3999                         throw new Error("initializeWasm() must be awaited first!");
4000                 }
4001                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_err(e);
4002                 return nativeResponseValue;
4003         }
4004         // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
4005         export function CResult_COption_TypeZDecodeErrorZ_free(_res: number): void {
4006                 if(!isWasmInitialized) {
4007                         throw new Error("initializeWasm() must be awaited first!");
4008                 }
4009                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_free(_res);
4010                 // debug statements here
4011         }
4012         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
4013         export function CResult_COption_TypeZDecodeErrorZ_clone(orig: number): number {
4014                 if(!isWasmInitialized) {
4015                         throw new Error("initializeWasm() must be awaited first!");
4016                 }
4017                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_clone(orig);
4018                 return nativeResponseValue;
4019         }
4020         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
4021         export function CResult_SiPrefixNoneZ_ok(o: SiPrefix): number {
4022                 if(!isWasmInitialized) {
4023                         throw new Error("initializeWasm() must be awaited first!");
4024                 }
4025                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_ok(o);
4026                 return nativeResponseValue;
4027         }
4028         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
4029         export function CResult_SiPrefixNoneZ_err(): number {
4030                 if(!isWasmInitialized) {
4031                         throw new Error("initializeWasm() must be awaited first!");
4032                 }
4033                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_err();
4034                 return nativeResponseValue;
4035         }
4036         // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
4037         export function CResult_SiPrefixNoneZ_free(_res: number): void {
4038                 if(!isWasmInitialized) {
4039                         throw new Error("initializeWasm() must be awaited first!");
4040                 }
4041                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_free(_res);
4042                 // debug statements here
4043         }
4044         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
4045         export function CResult_SiPrefixNoneZ_clone(orig: number): number {
4046                 if(!isWasmInitialized) {
4047                         throw new Error("initializeWasm() must be awaited first!");
4048                 }
4049                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone(orig);
4050                 return nativeResponseValue;
4051         }
4052         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
4053         export function CResult_InvoiceNoneZ_ok(o: number): number {
4054                 if(!isWasmInitialized) {
4055                         throw new Error("initializeWasm() must be awaited first!");
4056                 }
4057                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_ok(o);
4058                 return nativeResponseValue;
4059         }
4060         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
4061         export function CResult_InvoiceNoneZ_err(): number {
4062                 if(!isWasmInitialized) {
4063                         throw new Error("initializeWasm() must be awaited first!");
4064                 }
4065                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_err();
4066                 return nativeResponseValue;
4067         }
4068         // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
4069         export function CResult_InvoiceNoneZ_free(_res: number): void {
4070                 if(!isWasmInitialized) {
4071                         throw new Error("initializeWasm() must be awaited first!");
4072                 }
4073                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_free(_res);
4074                 // debug statements here
4075         }
4076         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
4077         export function CResult_InvoiceNoneZ_clone(orig: number): number {
4078                 if(!isWasmInitialized) {
4079                         throw new Error("initializeWasm() must be awaited first!");
4080                 }
4081                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone(orig);
4082                 return nativeResponseValue;
4083         }
4084         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
4085         export function CResult_SignedRawInvoiceNoneZ_ok(o: number): number {
4086                 if(!isWasmInitialized) {
4087                         throw new Error("initializeWasm() must be awaited first!");
4088                 }
4089                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_ok(o);
4090                 return nativeResponseValue;
4091         }
4092         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
4093         export function CResult_SignedRawInvoiceNoneZ_err(): number {
4094                 if(!isWasmInitialized) {
4095                         throw new Error("initializeWasm() must be awaited first!");
4096                 }
4097                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_err();
4098                 return nativeResponseValue;
4099         }
4100         // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
4101         export function CResult_SignedRawInvoiceNoneZ_free(_res: number): void {
4102                 if(!isWasmInitialized) {
4103                         throw new Error("initializeWasm() must be awaited first!");
4104                 }
4105                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_free(_res);
4106                 // debug statements here
4107         }
4108         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
4109         export function CResult_SignedRawInvoiceNoneZ_clone(orig: number): number {
4110                 if(!isWasmInitialized) {
4111                         throw new Error("initializeWasm() must be awaited first!");
4112                 }
4113                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone(orig);
4114                 return nativeResponseValue;
4115         }
4116         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
4117         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig: number): number {
4118                 if(!isWasmInitialized) {
4119                         throw new Error("initializeWasm() must be awaited first!");
4120                 }
4121                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig);
4122                 return nativeResponseValue;
4123         }
4124         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
4125         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a: number, b: Uint8Array, c: number): number {
4126                 if(!isWasmInitialized) {
4127                         throw new Error("initializeWasm() must be awaited first!");
4128                 }
4129                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a, encodeArray(b), c);
4130                 return nativeResponseValue;
4131         }
4132         // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
4133         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res: number): void {
4134                 if(!isWasmInitialized) {
4135                         throw new Error("initializeWasm() must be awaited first!");
4136                 }
4137                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res);
4138                 // debug statements here
4139         }
4140         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
4141         export function CResult_PayeePubKeyErrorZ_ok(o: number): number {
4142                 if(!isWasmInitialized) {
4143                         throw new Error("initializeWasm() must be awaited first!");
4144                 }
4145                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_ok(o);
4146                 return nativeResponseValue;
4147         }
4148         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
4149         export function CResult_PayeePubKeyErrorZ_err(e: Secp256k1Error): number {
4150                 if(!isWasmInitialized) {
4151                         throw new Error("initializeWasm() must be awaited first!");
4152                 }
4153                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_err(e);
4154                 return nativeResponseValue;
4155         }
4156         // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
4157         export function CResult_PayeePubKeyErrorZ_free(_res: number): void {
4158                 if(!isWasmInitialized) {
4159                         throw new Error("initializeWasm() must be awaited first!");
4160                 }
4161                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_free(_res);
4162                 // debug statements here
4163         }
4164         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
4165         export function CResult_PayeePubKeyErrorZ_clone(orig: number): number {
4166                 if(!isWasmInitialized) {
4167                         throw new Error("initializeWasm() must be awaited first!");
4168                 }
4169                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone(orig);
4170                 return nativeResponseValue;
4171         }
4172         // void CVec_PrivateRouteZ_free(struct LDKCVec_PrivateRouteZ _res);
4173         export function CVec_PrivateRouteZ_free(_res: number[]): void {
4174                 if(!isWasmInitialized) {
4175                         throw new Error("initializeWasm() must be awaited first!");
4176                 }
4177                 const nativeResponseValue = wasm.CVec_PrivateRouteZ_free(_res);
4178                 // debug statements here
4179         }
4180         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
4181         export function CResult_PositiveTimestampCreationErrorZ_ok(o: number): number {
4182                 if(!isWasmInitialized) {
4183                         throw new Error("initializeWasm() must be awaited first!");
4184                 }
4185                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_ok(o);
4186                 return nativeResponseValue;
4187         }
4188         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
4189         export function CResult_PositiveTimestampCreationErrorZ_err(e: CreationError): number {
4190                 if(!isWasmInitialized) {
4191                         throw new Error("initializeWasm() must be awaited first!");
4192                 }
4193                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_err(e);
4194                 return nativeResponseValue;
4195         }
4196         // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
4197         export function CResult_PositiveTimestampCreationErrorZ_free(_res: number): void {
4198                 if(!isWasmInitialized) {
4199                         throw new Error("initializeWasm() must be awaited first!");
4200                 }
4201                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_free(_res);
4202                 // debug statements here
4203         }
4204         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
4205         export function CResult_PositiveTimestampCreationErrorZ_clone(orig: number): number {
4206                 if(!isWasmInitialized) {
4207                         throw new Error("initializeWasm() must be awaited first!");
4208                 }
4209                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone(orig);
4210                 return nativeResponseValue;
4211         }
4212         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
4213         export function CResult_NoneSemanticErrorZ_ok(): number {
4214                 if(!isWasmInitialized) {
4215                         throw new Error("initializeWasm() must be awaited first!");
4216                 }
4217                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_ok();
4218                 return nativeResponseValue;
4219         }
4220         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
4221         export function CResult_NoneSemanticErrorZ_err(e: SemanticError): number {
4222                 if(!isWasmInitialized) {
4223                         throw new Error("initializeWasm() must be awaited first!");
4224                 }
4225                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_err(e);
4226                 return nativeResponseValue;
4227         }
4228         // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
4229         export function CResult_NoneSemanticErrorZ_free(_res: number): void {
4230                 if(!isWasmInitialized) {
4231                         throw new Error("initializeWasm() must be awaited first!");
4232                 }
4233                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_free(_res);
4234                 // debug statements here
4235         }
4236         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
4237         export function CResult_NoneSemanticErrorZ_clone(orig: number): number {
4238                 if(!isWasmInitialized) {
4239                         throw new Error("initializeWasm() must be awaited first!");
4240                 }
4241                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone(orig);
4242                 return nativeResponseValue;
4243         }
4244         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
4245         export function CResult_InvoiceSemanticErrorZ_ok(o: number): number {
4246                 if(!isWasmInitialized) {
4247                         throw new Error("initializeWasm() must be awaited first!");
4248                 }
4249                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_ok(o);
4250                 return nativeResponseValue;
4251         }
4252         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
4253         export function CResult_InvoiceSemanticErrorZ_err(e: SemanticError): number {
4254                 if(!isWasmInitialized) {
4255                         throw new Error("initializeWasm() must be awaited first!");
4256                 }
4257                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_err(e);
4258                 return nativeResponseValue;
4259         }
4260         // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
4261         export function CResult_InvoiceSemanticErrorZ_free(_res: number): void {
4262                 if(!isWasmInitialized) {
4263                         throw new Error("initializeWasm() must be awaited first!");
4264                 }
4265                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_free(_res);
4266                 // debug statements here
4267         }
4268         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
4269         export function CResult_InvoiceSemanticErrorZ_clone(orig: number): number {
4270                 if(!isWasmInitialized) {
4271                         throw new Error("initializeWasm() must be awaited first!");
4272                 }
4273                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone(orig);
4274                 return nativeResponseValue;
4275         }
4276         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
4277         export function CResult_DescriptionCreationErrorZ_ok(o: number): number {
4278                 if(!isWasmInitialized) {
4279                         throw new Error("initializeWasm() must be awaited first!");
4280                 }
4281                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_ok(o);
4282                 return nativeResponseValue;
4283         }
4284         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
4285         export function CResult_DescriptionCreationErrorZ_err(e: CreationError): number {
4286                 if(!isWasmInitialized) {
4287                         throw new Error("initializeWasm() must be awaited first!");
4288                 }
4289                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_err(e);
4290                 return nativeResponseValue;
4291         }
4292         // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
4293         export function CResult_DescriptionCreationErrorZ_free(_res: number): void {
4294                 if(!isWasmInitialized) {
4295                         throw new Error("initializeWasm() must be awaited first!");
4296                 }
4297                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_free(_res);
4298                 // debug statements here
4299         }
4300         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
4301         export function CResult_DescriptionCreationErrorZ_clone(orig: number): number {
4302                 if(!isWasmInitialized) {
4303                         throw new Error("initializeWasm() must be awaited first!");
4304                 }
4305                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone(orig);
4306                 return nativeResponseValue;
4307         }
4308         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
4309         export function CResult_ExpiryTimeCreationErrorZ_ok(o: number): number {
4310                 if(!isWasmInitialized) {
4311                         throw new Error("initializeWasm() must be awaited first!");
4312                 }
4313                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_ok(o);
4314                 return nativeResponseValue;
4315         }
4316         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
4317         export function CResult_ExpiryTimeCreationErrorZ_err(e: CreationError): number {
4318                 if(!isWasmInitialized) {
4319                         throw new Error("initializeWasm() must be awaited first!");
4320                 }
4321                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_err(e);
4322                 return nativeResponseValue;
4323         }
4324         // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
4325         export function CResult_ExpiryTimeCreationErrorZ_free(_res: number): void {
4326                 if(!isWasmInitialized) {
4327                         throw new Error("initializeWasm() must be awaited first!");
4328                 }
4329                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_free(_res);
4330                 // debug statements here
4331         }
4332         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
4333         export function CResult_ExpiryTimeCreationErrorZ_clone(orig: number): number {
4334                 if(!isWasmInitialized) {
4335                         throw new Error("initializeWasm() must be awaited first!");
4336                 }
4337                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone(orig);
4338                 return nativeResponseValue;
4339         }
4340         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_ok(struct LDKPrivateRoute o);
4341         export function CResult_PrivateRouteCreationErrorZ_ok(o: number): number {
4342                 if(!isWasmInitialized) {
4343                         throw new Error("initializeWasm() must be awaited first!");
4344                 }
4345                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_ok(o);
4346                 return nativeResponseValue;
4347         }
4348         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_err(enum LDKCreationError e);
4349         export function CResult_PrivateRouteCreationErrorZ_err(e: CreationError): number {
4350                 if(!isWasmInitialized) {
4351                         throw new Error("initializeWasm() must be awaited first!");
4352                 }
4353                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_err(e);
4354                 return nativeResponseValue;
4355         }
4356         // void CResult_PrivateRouteCreationErrorZ_free(struct LDKCResult_PrivateRouteCreationErrorZ _res);
4357         export function CResult_PrivateRouteCreationErrorZ_free(_res: number): void {
4358                 if(!isWasmInitialized) {
4359                         throw new Error("initializeWasm() must be awaited first!");
4360                 }
4361                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_free(_res);
4362                 // debug statements here
4363         }
4364         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_clone(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR orig);
4365         export function CResult_PrivateRouteCreationErrorZ_clone(orig: number): number {
4366                 if(!isWasmInitialized) {
4367                         throw new Error("initializeWasm() must be awaited first!");
4368                 }
4369                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_clone(orig);
4370                 return nativeResponseValue;
4371         }
4372         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
4373         export function CResult_StringErrorZ_ok(o: String): number {
4374                 if(!isWasmInitialized) {
4375                         throw new Error("initializeWasm() must be awaited first!");
4376                 }
4377                 const nativeResponseValue = wasm.CResult_StringErrorZ_ok(o);
4378                 return nativeResponseValue;
4379         }
4380         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
4381         export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
4382                 if(!isWasmInitialized) {
4383                         throw new Error("initializeWasm() must be awaited first!");
4384                 }
4385                 const nativeResponseValue = wasm.CResult_StringErrorZ_err(e);
4386                 return nativeResponseValue;
4387         }
4388         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
4389         export function CResult_StringErrorZ_free(_res: number): void {
4390                 if(!isWasmInitialized) {
4391                         throw new Error("initializeWasm() must be awaited first!");
4392                 }
4393                 const nativeResponseValue = wasm.CResult_StringErrorZ_free(_res);
4394                 // debug statements here
4395         }
4396         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
4397         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
4398                 if(!isWasmInitialized) {
4399                         throw new Error("initializeWasm() must be awaited first!");
4400                 }
4401                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
4402                 return nativeResponseValue;
4403         }
4404         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4405         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
4406                 if(!isWasmInitialized) {
4407                         throw new Error("initializeWasm() must be awaited first!");
4408                 }
4409                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
4410                 return nativeResponseValue;
4411         }
4412         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
4413         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
4414                 if(!isWasmInitialized) {
4415                         throw new Error("initializeWasm() must be awaited first!");
4416                 }
4417                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
4418                 // debug statements here
4419         }
4420         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
4421         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
4422                 if(!isWasmInitialized) {
4423                         throw new Error("initializeWasm() must be awaited first!");
4424                 }
4425                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
4426                 return nativeResponseValue;
4427         }
4428         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
4429         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
4430                 if(!isWasmInitialized) {
4431                         throw new Error("initializeWasm() must be awaited first!");
4432                 }
4433                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
4434                 return nativeResponseValue;
4435         }
4436         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4437         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
4438                 if(!isWasmInitialized) {
4439                         throw new Error("initializeWasm() must be awaited first!");
4440                 }
4441                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
4442                 return nativeResponseValue;
4443         }
4444         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
4445         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
4446                 if(!isWasmInitialized) {
4447                         throw new Error("initializeWasm() must be awaited first!");
4448                 }
4449                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
4450                 // debug statements here
4451         }
4452         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
4453         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
4454                 if(!isWasmInitialized) {
4455                         throw new Error("initializeWasm() must be awaited first!");
4456                 }
4457                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
4458                 return nativeResponseValue;
4459         }
4460         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
4461         export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
4462                 if(!isWasmInitialized) {
4463                         throw new Error("initializeWasm() must be awaited first!");
4464                 }
4465                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
4466                 return nativeResponseValue;
4467         }
4468         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
4469         export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
4470                 if(!isWasmInitialized) {
4471                         throw new Error("initializeWasm() must be awaited first!");
4472                 }
4473                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
4474                 return nativeResponseValue;
4475         }
4476         // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
4477         export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
4478                 if(!isWasmInitialized) {
4479                         throw new Error("initializeWasm() must be awaited first!");
4480                 }
4481                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
4482                 // debug statements here
4483         }
4484         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
4485         export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
4486                 if(!isWasmInitialized) {
4487                         throw new Error("initializeWasm() must be awaited first!");
4488                 }
4489                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
4490                 return nativeResponseValue;
4491         }
4492         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
4493         export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
4494                 if(!isWasmInitialized) {
4495                         throw new Error("initializeWasm() must be awaited first!");
4496                 }
4497                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
4498                 return nativeResponseValue;
4499         }
4500         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
4501         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
4502                 if(!isWasmInitialized) {
4503                         throw new Error("initializeWasm() must be awaited first!");
4504                 }
4505                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
4506                 return nativeResponseValue;
4507         }
4508         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
4509         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
4510                 if(!isWasmInitialized) {
4511                         throw new Error("initializeWasm() must be awaited first!");
4512                 }
4513                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
4514                 // debug statements here
4515         }
4516         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
4517         export function C2Tuple_u32ScriptZ_clone(orig: number): number {
4518                 if(!isWasmInitialized) {
4519                         throw new Error("initializeWasm() must be awaited first!");
4520                 }
4521                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
4522                 return nativeResponseValue;
4523         }
4524         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
4525         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
4526                 if(!isWasmInitialized) {
4527                         throw new Error("initializeWasm() must be awaited first!");
4528                 }
4529                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
4530                 return nativeResponseValue;
4531         }
4532         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
4533         export function C2Tuple_u32ScriptZ_free(_res: number): void {
4534                 if(!isWasmInitialized) {
4535                         throw new Error("initializeWasm() must be awaited first!");
4536                 }
4537                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
4538                 // debug statements here
4539         }
4540         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
4541         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
4542                 if(!isWasmInitialized) {
4543                         throw new Error("initializeWasm() must be awaited first!");
4544                 }
4545                 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
4546                 // debug statements here
4547         }
4548         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
4549         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig: number): number {
4550                 if(!isWasmInitialized) {
4551                         throw new Error("initializeWasm() must be awaited first!");
4552                 }
4553                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig);
4554                 return nativeResponseValue;
4555         }
4556         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
4557         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
4558                 if(!isWasmInitialized) {
4559                         throw new Error("initializeWasm() must be awaited first!");
4560                 }
4561                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
4562                 return nativeResponseValue;
4563         }
4564         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
4565         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
4566                 if(!isWasmInitialized) {
4567                         throw new Error("initializeWasm() must be awaited first!");
4568                 }
4569                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
4570                 // debug statements here
4571         }
4572         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
4573         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
4574                 if(!isWasmInitialized) {
4575                         throw new Error("initializeWasm() must be awaited first!");
4576                 }
4577                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
4578                 // debug statements here
4579         }
4580         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
4581         export function CVec_EventZ_free(_res: number[]): void {
4582                 if(!isWasmInitialized) {
4583                         throw new Error("initializeWasm() must be awaited first!");
4584                 }
4585                 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
4586                 // debug statements here
4587         }
4588         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
4589         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
4590                 if(!isWasmInitialized) {
4591                         throw new Error("initializeWasm() must be awaited first!");
4592                 }
4593                 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
4594                 // debug statements here
4595         }
4596         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
4597         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
4598                 if(!isWasmInitialized) {
4599                         throw new Error("initializeWasm() must be awaited first!");
4600                 }
4601                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
4602                 return nativeResponseValue;
4603         }
4604         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
4605         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
4606                 if(!isWasmInitialized) {
4607                         throw new Error("initializeWasm() must be awaited first!");
4608                 }
4609                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
4610                 return nativeResponseValue;
4611         }
4612         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
4613         export function C2Tuple_u32TxOutZ_free(_res: number): void {
4614                 if(!isWasmInitialized) {
4615                         throw new Error("initializeWasm() must be awaited first!");
4616                 }
4617                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
4618                 // debug statements here
4619         }
4620         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
4621         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
4622                 if(!isWasmInitialized) {
4623                         throw new Error("initializeWasm() must be awaited first!");
4624                 }
4625                 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
4626                 // debug statements here
4627         }
4628         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
4629         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
4630                 if(!isWasmInitialized) {
4631                         throw new Error("initializeWasm() must be awaited first!");
4632                 }
4633                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
4634                 return nativeResponseValue;
4635         }
4636         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
4637         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
4638                 if(!isWasmInitialized) {
4639                         throw new Error("initializeWasm() must be awaited first!");
4640                 }
4641                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
4642                 return nativeResponseValue;
4643         }
4644         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
4645         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
4646                 if(!isWasmInitialized) {
4647                         throw new Error("initializeWasm() must be awaited first!");
4648                 }
4649                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
4650                 // debug statements here
4651         }
4652         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
4653         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
4654                 if(!isWasmInitialized) {
4655                         throw new Error("initializeWasm() must be awaited first!");
4656                 }
4657                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
4658                 // debug statements here
4659         }
4660         // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
4661         export function CVec_BalanceZ_free(_res: number[]): void {
4662                 if(!isWasmInitialized) {
4663                         throw new Error("initializeWasm() must be awaited first!");
4664                 }
4665                 const nativeResponseValue = wasm.CVec_BalanceZ_free(_res);
4666                 // debug statements here
4667         }
4668         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
4669         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
4670                 if(!isWasmInitialized) {
4671                         throw new Error("initializeWasm() must be awaited first!");
4672                 }
4673                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
4674                 return nativeResponseValue;
4675         }
4676         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
4677         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
4678                 if(!isWasmInitialized) {
4679                         throw new Error("initializeWasm() must be awaited first!");
4680                 }
4681                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
4682                 return nativeResponseValue;
4683         }
4684         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
4685         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
4686                 if(!isWasmInitialized) {
4687                         throw new Error("initializeWasm() must be awaited first!");
4688                 }
4689                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
4690                 // debug statements here
4691         }
4692         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
4693         export function CResult_NoneLightningErrorZ_ok(): number {
4694                 if(!isWasmInitialized) {
4695                         throw new Error("initializeWasm() must be awaited first!");
4696                 }
4697                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
4698                 return nativeResponseValue;
4699         }
4700         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
4701         export function CResult_NoneLightningErrorZ_err(e: number): number {
4702                 if(!isWasmInitialized) {
4703                         throw new Error("initializeWasm() must be awaited first!");
4704                 }
4705                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
4706                 return nativeResponseValue;
4707         }
4708         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
4709         export function CResult_NoneLightningErrorZ_free(_res: number): void {
4710                 if(!isWasmInitialized) {
4711                         throw new Error("initializeWasm() must be awaited first!");
4712                 }
4713                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
4714                 // debug statements here
4715         }
4716         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
4717         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
4718                 if(!isWasmInitialized) {
4719                         throw new Error("initializeWasm() must be awaited first!");
4720                 }
4721                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
4722                 return nativeResponseValue;
4723         }
4724         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
4725         export function C2Tuple_PublicKeyTypeZ_clone(orig: number): number {
4726                 if(!isWasmInitialized) {
4727                         throw new Error("initializeWasm() must be awaited first!");
4728                 }
4729                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_clone(orig);
4730                 return nativeResponseValue;
4731         }
4732         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
4733         export function C2Tuple_PublicKeyTypeZ_new(a: Uint8Array, b: number): number {
4734                 if(!isWasmInitialized) {
4735                         throw new Error("initializeWasm() must be awaited first!");
4736                 }
4737                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_new(encodeArray(a), b);
4738                 return nativeResponseValue;
4739         }
4740         // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
4741         export function C2Tuple_PublicKeyTypeZ_free(_res: number): void {
4742                 if(!isWasmInitialized) {
4743                         throw new Error("initializeWasm() must be awaited first!");
4744                 }
4745                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_free(_res);
4746                 // debug statements here
4747         }
4748         // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
4749         export function CVec_C2Tuple_PublicKeyTypeZZ_free(_res: number[]): void {
4750                 if(!isWasmInitialized) {
4751                         throw new Error("initializeWasm() must be awaited first!");
4752                 }
4753                 const nativeResponseValue = wasm.CVec_C2Tuple_PublicKeyTypeZZ_free(_res);
4754                 // debug statements here
4755         }
4756         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
4757         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
4758                 if(!isWasmInitialized) {
4759                         throw new Error("initializeWasm() must be awaited first!");
4760                 }
4761                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
4762                 return nativeResponseValue;
4763         }
4764         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
4765         export function CResult_boolLightningErrorZ_err(e: number): number {
4766                 if(!isWasmInitialized) {
4767                         throw new Error("initializeWasm() must be awaited first!");
4768                 }
4769                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
4770                 return nativeResponseValue;
4771         }
4772         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
4773         export function CResult_boolLightningErrorZ_free(_res: number): void {
4774                 if(!isWasmInitialized) {
4775                         throw new Error("initializeWasm() must be awaited first!");
4776                 }
4777                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
4778                 // debug statements here
4779         }
4780         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
4781         export function CResult_boolLightningErrorZ_clone(orig: number): number {
4782                 if(!isWasmInitialized) {
4783                         throw new Error("initializeWasm() must be awaited first!");
4784                 }
4785                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
4786                 return nativeResponseValue;
4787         }
4788         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
4789         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
4790                 if(!isWasmInitialized) {
4791                         throw new Error("initializeWasm() must be awaited first!");
4792                 }
4793                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
4794                 return nativeResponseValue;
4795         }
4796         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
4797         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
4798                 if(!isWasmInitialized) {
4799                         throw new Error("initializeWasm() must be awaited first!");
4800                 }
4801                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
4802                 return nativeResponseValue;
4803         }
4804         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
4805         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
4806                 if(!isWasmInitialized) {
4807                         throw new Error("initializeWasm() must be awaited first!");
4808                 }
4809                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
4810                 // debug statements here
4811         }
4812         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
4813         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
4814                 if(!isWasmInitialized) {
4815                         throw new Error("initializeWasm() must be awaited first!");
4816                 }
4817                 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
4818                 // debug statements here
4819         }
4820         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
4821         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
4822                 if(!isWasmInitialized) {
4823                         throw new Error("initializeWasm() must be awaited first!");
4824                 }
4825                 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
4826                 // debug statements here
4827         }
4828         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
4829         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
4830                 if(!isWasmInitialized) {
4831                         throw new Error("initializeWasm() must be awaited first!");
4832                 }
4833                 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
4834                 // debug statements here
4835         }
4836         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
4837         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
4838                 if(!isWasmInitialized) {
4839                         throw new Error("initializeWasm() must be awaited first!");
4840                 }
4841                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
4842                 return nativeResponseValue;
4843         }
4844         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
4845         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
4846                 if(!isWasmInitialized) {
4847                         throw new Error("initializeWasm() must be awaited first!");
4848                 }
4849                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
4850                 return nativeResponseValue;
4851         }
4852         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
4853         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
4854                 if(!isWasmInitialized) {
4855                         throw new Error("initializeWasm() must be awaited first!");
4856                 }
4857                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
4858                 // debug statements here
4859         }
4860         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
4861         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
4862                 if(!isWasmInitialized) {
4863                         throw new Error("initializeWasm() must be awaited first!");
4864                 }
4865                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
4866                 return nativeResponseValue;
4867         }
4868         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
4869         export function CResult_NonePeerHandleErrorZ_ok(): number {
4870                 if(!isWasmInitialized) {
4871                         throw new Error("initializeWasm() must be awaited first!");
4872                 }
4873                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
4874                 return nativeResponseValue;
4875         }
4876         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
4877         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
4878                 if(!isWasmInitialized) {
4879                         throw new Error("initializeWasm() must be awaited first!");
4880                 }
4881                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
4882                 return nativeResponseValue;
4883         }
4884         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
4885         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
4886                 if(!isWasmInitialized) {
4887                         throw new Error("initializeWasm() must be awaited first!");
4888                 }
4889                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
4890                 // debug statements here
4891         }
4892         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
4893         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
4894                 if(!isWasmInitialized) {
4895                         throw new Error("initializeWasm() must be awaited first!");
4896                 }
4897                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
4898                 return nativeResponseValue;
4899         }
4900         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
4901         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
4902                 if(!isWasmInitialized) {
4903                         throw new Error("initializeWasm() must be awaited first!");
4904                 }
4905                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
4906                 return nativeResponseValue;
4907         }
4908         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
4909         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
4910                 if(!isWasmInitialized) {
4911                         throw new Error("initializeWasm() must be awaited first!");
4912                 }
4913                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
4914                 return nativeResponseValue;
4915         }
4916         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
4917         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
4918                 if(!isWasmInitialized) {
4919                         throw new Error("initializeWasm() must be awaited first!");
4920                 }
4921                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
4922                 // debug statements here
4923         }
4924         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
4925         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
4926                 if(!isWasmInitialized) {
4927                         throw new Error("initializeWasm() must be awaited first!");
4928                 }
4929                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
4930                 return nativeResponseValue;
4931         }
4932         // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
4933         export function COption_AccessZ_some(o: number): number {
4934                 if(!isWasmInitialized) {
4935                         throw new Error("initializeWasm() must be awaited first!");
4936                 }
4937                 const nativeResponseValue = wasm.COption_AccessZ_some(o);
4938                 return nativeResponseValue;
4939         }
4940         // struct LDKCOption_AccessZ COption_AccessZ_none(void);
4941         export function COption_AccessZ_none(): number {
4942                 if(!isWasmInitialized) {
4943                         throw new Error("initializeWasm() must be awaited first!");
4944                 }
4945                 const nativeResponseValue = wasm.COption_AccessZ_none();
4946                 return nativeResponseValue;
4947         }
4948         // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
4949         export function COption_AccessZ_free(_res: number): void {
4950                 if(!isWasmInitialized) {
4951                         throw new Error("initializeWasm() must be awaited first!");
4952                 }
4953                 const nativeResponseValue = wasm.COption_AccessZ_free(_res);
4954                 // debug statements here
4955         }
4956         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
4957         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
4958                 if(!isWasmInitialized) {
4959                         throw new Error("initializeWasm() must be awaited first!");
4960                 }
4961                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
4962                 return nativeResponseValue;
4963         }
4964         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
4965         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
4966                 if(!isWasmInitialized) {
4967                         throw new Error("initializeWasm() must be awaited first!");
4968                 }
4969                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
4970                 return nativeResponseValue;
4971         }
4972         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
4973         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
4974                 if(!isWasmInitialized) {
4975                         throw new Error("initializeWasm() must be awaited first!");
4976                 }
4977                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
4978                 // debug statements here
4979         }
4980         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
4981         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
4982                 if(!isWasmInitialized) {
4983                         throw new Error("initializeWasm() must be awaited first!");
4984                 }
4985                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
4986                 return nativeResponseValue;
4987         }
4988         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
4989         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
4990                 if(!isWasmInitialized) {
4991                         throw new Error("initializeWasm() must be awaited first!");
4992                 }
4993                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
4994                 return nativeResponseValue;
4995         }
4996         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
4997         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
4998                 if(!isWasmInitialized) {
4999                         throw new Error("initializeWasm() must be awaited first!");
5000                 }
5001                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
5002                 return nativeResponseValue;
5003         }
5004         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
5005         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
5006                 if(!isWasmInitialized) {
5007                         throw new Error("initializeWasm() must be awaited first!");
5008                 }
5009                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
5010                 // debug statements here
5011         }
5012         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
5013         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
5014                 if(!isWasmInitialized) {
5015                         throw new Error("initializeWasm() must be awaited first!");
5016                 }
5017                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
5018                 return nativeResponseValue;
5019         }
5020         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
5021         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
5022                 if(!isWasmInitialized) {
5023                         throw new Error("initializeWasm() must be awaited first!");
5024                 }
5025                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
5026                 return nativeResponseValue;
5027         }
5028         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
5029         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
5030                 if(!isWasmInitialized) {
5031                         throw new Error("initializeWasm() must be awaited first!");
5032                 }
5033                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
5034                 return nativeResponseValue;
5035         }
5036         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
5037         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
5038                 if(!isWasmInitialized) {
5039                         throw new Error("initializeWasm() must be awaited first!");
5040                 }
5041                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
5042                 // debug statements here
5043         }
5044         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
5045         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
5046                 if(!isWasmInitialized) {
5047                         throw new Error("initializeWasm() must be awaited first!");
5048                 }
5049                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
5050                 return nativeResponseValue;
5051         }
5052         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
5053         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
5054                 if(!isWasmInitialized) {
5055                         throw new Error("initializeWasm() must be awaited first!");
5056                 }
5057                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
5058                 return nativeResponseValue;
5059         }
5060         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
5061         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
5062                 if(!isWasmInitialized) {
5063                         throw new Error("initializeWasm() must be awaited first!");
5064                 }
5065                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
5066                 return nativeResponseValue;
5067         }
5068         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
5069         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
5070                 if(!isWasmInitialized) {
5071                         throw new Error("initializeWasm() must be awaited first!");
5072                 }
5073                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
5074                 // debug statements here
5075         }
5076         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
5077         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
5078                 if(!isWasmInitialized) {
5079                         throw new Error("initializeWasm() must be awaited first!");
5080                 }
5081                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
5082                 return nativeResponseValue;
5083         }
5084         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
5085         export function CVec_u64Z_free(_res: number[]): void {
5086                 if(!isWasmInitialized) {
5087                         throw new Error("initializeWasm() must be awaited first!");
5088                 }
5089                 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
5090                 // debug statements here
5091         }
5092         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
5093         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
5094                 if(!isWasmInitialized) {
5095                         throw new Error("initializeWasm() must be awaited first!");
5096                 }
5097                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
5098                 return nativeResponseValue;
5099         }
5100         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
5101         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
5102                 if(!isWasmInitialized) {
5103                         throw new Error("initializeWasm() must be awaited first!");
5104                 }
5105                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
5106                 return nativeResponseValue;
5107         }
5108         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
5109         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
5110                 if(!isWasmInitialized) {
5111                         throw new Error("initializeWasm() must be awaited first!");
5112                 }
5113                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
5114                 // debug statements here
5115         }
5116         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
5117         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
5118                 if(!isWasmInitialized) {
5119                         throw new Error("initializeWasm() must be awaited first!");
5120                 }
5121                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
5122                 return nativeResponseValue;
5123         }
5124         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
5125         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
5126                 if(!isWasmInitialized) {
5127                         throw new Error("initializeWasm() must be awaited first!");
5128                 }
5129                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
5130                 return nativeResponseValue;
5131         }
5132         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
5133         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
5134                 if(!isWasmInitialized) {
5135                         throw new Error("initializeWasm() must be awaited first!");
5136                 }
5137                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
5138                 return nativeResponseValue;
5139         }
5140         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
5141         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
5142                 if(!isWasmInitialized) {
5143                         throw new Error("initializeWasm() must be awaited first!");
5144                 }
5145                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
5146                 // debug statements here
5147         }
5148         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
5149         export function CResult_NetAddressu8Z_ok(o: number): number {
5150                 if(!isWasmInitialized) {
5151                         throw new Error("initializeWasm() must be awaited first!");
5152                 }
5153                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
5154                 return nativeResponseValue;
5155         }
5156         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
5157         export function CResult_NetAddressu8Z_err(e: number): number {
5158                 if(!isWasmInitialized) {
5159                         throw new Error("initializeWasm() must be awaited first!");
5160                 }
5161                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
5162                 return nativeResponseValue;
5163         }
5164         // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
5165         export function CResult_NetAddressu8Z_free(_res: number): void {
5166                 if(!isWasmInitialized) {
5167                         throw new Error("initializeWasm() must be awaited first!");
5168                 }
5169                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
5170                 // debug statements here
5171         }
5172         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
5173         export function CResult_NetAddressu8Z_clone(orig: number): number {
5174                 if(!isWasmInitialized) {
5175                         throw new Error("initializeWasm() must be awaited first!");
5176                 }
5177                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
5178                 return nativeResponseValue;
5179         }
5180         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
5181         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
5182                 if(!isWasmInitialized) {
5183                         throw new Error("initializeWasm() must be awaited first!");
5184                 }
5185                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
5186                 return nativeResponseValue;
5187         }
5188         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
5189         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
5190                 if(!isWasmInitialized) {
5191                         throw new Error("initializeWasm() must be awaited first!");
5192                 }
5193                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
5194                 return nativeResponseValue;
5195         }
5196         // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
5197         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
5198                 if(!isWasmInitialized) {
5199                         throw new Error("initializeWasm() must be awaited first!");
5200                 }
5201                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
5202                 // debug statements here
5203         }
5204         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
5205         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
5206                 if(!isWasmInitialized) {
5207                         throw new Error("initializeWasm() must be awaited first!");
5208                 }
5209                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
5210                 return nativeResponseValue;
5211         }
5212         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
5213         export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
5214                 if(!isWasmInitialized) {
5215                         throw new Error("initializeWasm() must be awaited first!");
5216                 }
5217                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_ok(o);
5218                 return nativeResponseValue;
5219         }
5220         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
5221         export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
5222                 if(!isWasmInitialized) {
5223                         throw new Error("initializeWasm() must be awaited first!");
5224                 }
5225                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_err(e);
5226                 return nativeResponseValue;
5227         }
5228         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
5229         export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
5230                 if(!isWasmInitialized) {
5231                         throw new Error("initializeWasm() must be awaited first!");
5232                 }
5233                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_free(_res);
5234                 // debug statements here
5235         }
5236         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
5237         export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
5238                 if(!isWasmInitialized) {
5239                         throw new Error("initializeWasm() must be awaited first!");
5240                 }
5241                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone(orig);
5242                 return nativeResponseValue;
5243         }
5244         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
5245         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
5246                 if(!isWasmInitialized) {
5247                         throw new Error("initializeWasm() must be awaited first!");
5248                 }
5249                 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
5250                 // debug statements here
5251         }
5252         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
5253         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
5254                 if(!isWasmInitialized) {
5255                         throw new Error("initializeWasm() must be awaited first!");
5256                 }
5257                 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
5258                 // debug statements here
5259         }
5260         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
5261         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
5262                 if(!isWasmInitialized) {
5263                         throw new Error("initializeWasm() must be awaited first!");
5264                 }
5265                 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
5266                 // debug statements here
5267         }
5268         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
5269         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
5270                 if(!isWasmInitialized) {
5271                         throw new Error("initializeWasm() must be awaited first!");
5272                 }
5273                 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
5274                 // debug statements here
5275         }
5276         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
5277         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
5278                 if(!isWasmInitialized) {
5279                         throw new Error("initializeWasm() must be awaited first!");
5280                 }
5281                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
5282                 return nativeResponseValue;
5283         }
5284         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
5285         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
5286                 if(!isWasmInitialized) {
5287                         throw new Error("initializeWasm() must be awaited first!");
5288                 }
5289                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
5290                 return nativeResponseValue;
5291         }
5292         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
5293         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
5294                 if(!isWasmInitialized) {
5295                         throw new Error("initializeWasm() must be awaited first!");
5296                 }
5297                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
5298                 // debug statements here
5299         }
5300         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
5301         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
5302                 if(!isWasmInitialized) {
5303                         throw new Error("initializeWasm() must be awaited first!");
5304                 }
5305                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
5306                 return nativeResponseValue;
5307         }
5308         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
5309         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
5310                 if(!isWasmInitialized) {
5311                         throw new Error("initializeWasm() must be awaited first!");
5312                 }
5313                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
5314                 return nativeResponseValue;
5315         }
5316         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
5317         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
5318                 if(!isWasmInitialized) {
5319                         throw new Error("initializeWasm() must be awaited first!");
5320                 }
5321                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
5322                 return nativeResponseValue;
5323         }
5324         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
5325         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
5326                 if(!isWasmInitialized) {
5327                         throw new Error("initializeWasm() must be awaited first!");
5328                 }
5329                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
5330                 // debug statements here
5331         }
5332         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
5333         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
5334                 if(!isWasmInitialized) {
5335                         throw new Error("initializeWasm() must be awaited first!");
5336                 }
5337                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
5338                 return nativeResponseValue;
5339         }
5340         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
5341         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
5342                 if(!isWasmInitialized) {
5343                         throw new Error("initializeWasm() must be awaited first!");
5344                 }
5345                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
5346                 return nativeResponseValue;
5347         }
5348         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
5349         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
5350                 if(!isWasmInitialized) {
5351                         throw new Error("initializeWasm() must be awaited first!");
5352                 }
5353                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
5354                 return nativeResponseValue;
5355         }
5356         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
5357         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
5358                 if(!isWasmInitialized) {
5359                         throw new Error("initializeWasm() must be awaited first!");
5360                 }
5361                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
5362                 // debug statements here
5363         }
5364         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
5365         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
5366                 if(!isWasmInitialized) {
5367                         throw new Error("initializeWasm() must be awaited first!");
5368                 }
5369                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
5370                 return nativeResponseValue;
5371         }
5372         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
5373         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
5374                 if(!isWasmInitialized) {
5375                         throw new Error("initializeWasm() must be awaited first!");
5376                 }
5377                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
5378                 return nativeResponseValue;
5379         }
5380         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
5381         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
5382                 if(!isWasmInitialized) {
5383                         throw new Error("initializeWasm() must be awaited first!");
5384                 }
5385                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
5386                 return nativeResponseValue;
5387         }
5388         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
5389         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
5390                 if(!isWasmInitialized) {
5391                         throw new Error("initializeWasm() must be awaited first!");
5392                 }
5393                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
5394                 // debug statements here
5395         }
5396         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
5397         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
5398                 if(!isWasmInitialized) {
5399                         throw new Error("initializeWasm() must be awaited first!");
5400                 }
5401                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
5402                 return nativeResponseValue;
5403         }
5404         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
5405         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: number): number {
5406                 if(!isWasmInitialized) {
5407                         throw new Error("initializeWasm() must be awaited first!");
5408                 }
5409                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o);
5410                 return nativeResponseValue;
5411         }
5412         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
5413         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: number): number {
5414                 if(!isWasmInitialized) {
5415                         throw new Error("initializeWasm() must be awaited first!");
5416                 }
5417                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e);
5418                 return nativeResponseValue;
5419         }
5420         // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
5421         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: number): void {
5422                 if(!isWasmInitialized) {
5423                         throw new Error("initializeWasm() must be awaited first!");
5424                 }
5425                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res);
5426                 // debug statements here
5427         }
5428         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
5429         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: number): number {
5430                 if(!isWasmInitialized) {
5431                         throw new Error("initializeWasm() must be awaited first!");
5432                 }
5433                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig);
5434                 return nativeResponseValue;
5435         }
5436         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
5437         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
5438                 if(!isWasmInitialized) {
5439                         throw new Error("initializeWasm() must be awaited first!");
5440                 }
5441                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
5442                 return nativeResponseValue;
5443         }
5444         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
5445         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
5446                 if(!isWasmInitialized) {
5447                         throw new Error("initializeWasm() must be awaited first!");
5448                 }
5449                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
5450                 return nativeResponseValue;
5451         }
5452         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
5453         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
5454                 if(!isWasmInitialized) {
5455                         throw new Error("initializeWasm() must be awaited first!");
5456                 }
5457                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
5458                 // debug statements here
5459         }
5460         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
5461         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
5462                 if(!isWasmInitialized) {
5463                         throw new Error("initializeWasm() must be awaited first!");
5464                 }
5465                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
5466                 return nativeResponseValue;
5467         }
5468         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
5469         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
5470                 if(!isWasmInitialized) {
5471                         throw new Error("initializeWasm() must be awaited first!");
5472                 }
5473                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
5474                 return nativeResponseValue;
5475         }
5476         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
5477         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
5478                 if(!isWasmInitialized) {
5479                         throw new Error("initializeWasm() must be awaited first!");
5480                 }
5481                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
5482                 return nativeResponseValue;
5483         }
5484         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
5485         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
5486                 if(!isWasmInitialized) {
5487                         throw new Error("initializeWasm() must be awaited first!");
5488                 }
5489                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
5490                 // debug statements here
5491         }
5492         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
5493         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
5494                 if(!isWasmInitialized) {
5495                         throw new Error("initializeWasm() must be awaited first!");
5496                 }
5497                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
5498                 return nativeResponseValue;
5499         }
5500         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
5501         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
5502                 if(!isWasmInitialized) {
5503                         throw new Error("initializeWasm() must be awaited first!");
5504                 }
5505                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
5506                 return nativeResponseValue;
5507         }
5508         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
5509         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
5510                 if(!isWasmInitialized) {
5511                         throw new Error("initializeWasm() must be awaited first!");
5512                 }
5513                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
5514                 return nativeResponseValue;
5515         }
5516         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
5517         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
5518                 if(!isWasmInitialized) {
5519                         throw new Error("initializeWasm() must be awaited first!");
5520                 }
5521                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
5522                 // debug statements here
5523         }
5524         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
5525         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
5526                 if(!isWasmInitialized) {
5527                         throw new Error("initializeWasm() must be awaited first!");
5528                 }
5529                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
5530                 return nativeResponseValue;
5531         }
5532         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
5533         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
5534                 if(!isWasmInitialized) {
5535                         throw new Error("initializeWasm() must be awaited first!");
5536                 }
5537                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
5538                 return nativeResponseValue;
5539         }
5540         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
5541         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
5542                 if(!isWasmInitialized) {
5543                         throw new Error("initializeWasm() must be awaited first!");
5544                 }
5545                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
5546                 return nativeResponseValue;
5547         }
5548         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
5549         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
5550                 if(!isWasmInitialized) {
5551                         throw new Error("initializeWasm() must be awaited first!");
5552                 }
5553                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
5554                 // debug statements here
5555         }
5556         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
5557         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
5558                 if(!isWasmInitialized) {
5559                         throw new Error("initializeWasm() must be awaited first!");
5560                 }
5561                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
5562                 return nativeResponseValue;
5563         }
5564         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
5565         export function CResult_InitDecodeErrorZ_ok(o: number): number {
5566                 if(!isWasmInitialized) {
5567                         throw new Error("initializeWasm() must be awaited first!");
5568                 }
5569                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
5570                 return nativeResponseValue;
5571         }
5572         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
5573         export function CResult_InitDecodeErrorZ_err(e: number): number {
5574                 if(!isWasmInitialized) {
5575                         throw new Error("initializeWasm() must be awaited first!");
5576                 }
5577                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
5578                 return nativeResponseValue;
5579         }
5580         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
5581         export function CResult_InitDecodeErrorZ_free(_res: number): void {
5582                 if(!isWasmInitialized) {
5583                         throw new Error("initializeWasm() must be awaited first!");
5584                 }
5585                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
5586                 // debug statements here
5587         }
5588         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
5589         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
5590                 if(!isWasmInitialized) {
5591                         throw new Error("initializeWasm() must be awaited first!");
5592                 }
5593                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
5594                 return nativeResponseValue;
5595         }
5596         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
5597         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
5598                 if(!isWasmInitialized) {
5599                         throw new Error("initializeWasm() must be awaited first!");
5600                 }
5601                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
5602                 return nativeResponseValue;
5603         }
5604         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
5605         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
5606                 if(!isWasmInitialized) {
5607                         throw new Error("initializeWasm() must be awaited first!");
5608                 }
5609                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
5610                 return nativeResponseValue;
5611         }
5612         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
5613         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
5614                 if(!isWasmInitialized) {
5615                         throw new Error("initializeWasm() must be awaited first!");
5616                 }
5617                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
5618                 // debug statements here
5619         }
5620         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
5621         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
5622                 if(!isWasmInitialized) {
5623                         throw new Error("initializeWasm() must be awaited first!");
5624                 }
5625                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
5626                 return nativeResponseValue;
5627         }
5628         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
5629         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
5630                 if(!isWasmInitialized) {
5631                         throw new Error("initializeWasm() must be awaited first!");
5632                 }
5633                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
5634                 return nativeResponseValue;
5635         }
5636         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
5637         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
5638                 if(!isWasmInitialized) {
5639                         throw new Error("initializeWasm() must be awaited first!");
5640                 }
5641                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
5642                 return nativeResponseValue;
5643         }
5644         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
5645         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
5646                 if(!isWasmInitialized) {
5647                         throw new Error("initializeWasm() must be awaited first!");
5648                 }
5649                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
5650                 // debug statements here
5651         }
5652         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
5653         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
5654                 if(!isWasmInitialized) {
5655                         throw new Error("initializeWasm() must be awaited first!");
5656                 }
5657                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
5658                 return nativeResponseValue;
5659         }
5660         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
5661         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
5662                 if(!isWasmInitialized) {
5663                         throw new Error("initializeWasm() must be awaited first!");
5664                 }
5665                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
5666                 return nativeResponseValue;
5667         }
5668         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
5669         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
5670                 if(!isWasmInitialized) {
5671                         throw new Error("initializeWasm() must be awaited first!");
5672                 }
5673                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
5674                 return nativeResponseValue;
5675         }
5676         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
5677         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
5678                 if(!isWasmInitialized) {
5679                         throw new Error("initializeWasm() must be awaited first!");
5680                 }
5681                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
5682                 // debug statements here
5683         }
5684         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
5685         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
5686                 if(!isWasmInitialized) {
5687                         throw new Error("initializeWasm() must be awaited first!");
5688                 }
5689                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
5690                 return nativeResponseValue;
5691         }
5692         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
5693         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
5694                 if(!isWasmInitialized) {
5695                         throw new Error("initializeWasm() must be awaited first!");
5696                 }
5697                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
5698                 return nativeResponseValue;
5699         }
5700         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5701         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
5702                 if(!isWasmInitialized) {
5703                         throw new Error("initializeWasm() must be awaited first!");
5704                 }
5705                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
5706                 return nativeResponseValue;
5707         }
5708         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
5709         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
5710                 if(!isWasmInitialized) {
5711                         throw new Error("initializeWasm() must be awaited first!");
5712                 }
5713                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
5714                 // debug statements here
5715         }
5716         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
5717         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
5718                 if(!isWasmInitialized) {
5719                         throw new Error("initializeWasm() must be awaited first!");
5720                 }
5721                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
5722                 return nativeResponseValue;
5723         }
5724         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
5725         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
5726                 if(!isWasmInitialized) {
5727                         throw new Error("initializeWasm() must be awaited first!");
5728                 }
5729                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
5730                 return nativeResponseValue;
5731         }
5732         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5733         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
5734                 if(!isWasmInitialized) {
5735                         throw new Error("initializeWasm() must be awaited first!");
5736                 }
5737                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
5738                 return nativeResponseValue;
5739         }
5740         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
5741         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
5742                 if(!isWasmInitialized) {
5743                         throw new Error("initializeWasm() must be awaited first!");
5744                 }
5745                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
5746                 // debug statements here
5747         }
5748         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
5749         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
5750                 if(!isWasmInitialized) {
5751                         throw new Error("initializeWasm() must be awaited first!");
5752                 }
5753                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
5754                 return nativeResponseValue;
5755         }
5756         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
5757         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
5758                 if(!isWasmInitialized) {
5759                         throw new Error("initializeWasm() must be awaited first!");
5760                 }
5761                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
5762                 return nativeResponseValue;
5763         }
5764         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
5765         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
5766                 if(!isWasmInitialized) {
5767                         throw new Error("initializeWasm() must be awaited first!");
5768                 }
5769                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
5770                 return nativeResponseValue;
5771         }
5772         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
5773         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
5774                 if(!isWasmInitialized) {
5775                         throw new Error("initializeWasm() must be awaited first!");
5776                 }
5777                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
5778                 // debug statements here
5779         }
5780         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
5781         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
5782                 if(!isWasmInitialized) {
5783                         throw new Error("initializeWasm() must be awaited first!");
5784                 }
5785                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
5786                 return nativeResponseValue;
5787         }
5788         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
5789         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
5790                 if(!isWasmInitialized) {
5791                         throw new Error("initializeWasm() must be awaited first!");
5792                 }
5793                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
5794                 return nativeResponseValue;
5795         }
5796         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5797         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
5798                 if(!isWasmInitialized) {
5799                         throw new Error("initializeWasm() must be awaited first!");
5800                 }
5801                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
5802                 return nativeResponseValue;
5803         }
5804         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
5805         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
5806                 if(!isWasmInitialized) {
5807                         throw new Error("initializeWasm() must be awaited first!");
5808                 }
5809                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
5810                 // debug statements here
5811         }
5812         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
5813         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
5814                 if(!isWasmInitialized) {
5815                         throw new Error("initializeWasm() must be awaited first!");
5816                 }
5817                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
5818                 return nativeResponseValue;
5819         }
5820         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
5821         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
5822                 if(!isWasmInitialized) {
5823                         throw new Error("initializeWasm() must be awaited first!");
5824                 }
5825                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
5826                 return nativeResponseValue;
5827         }
5828         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5829         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
5830                 if(!isWasmInitialized) {
5831                         throw new Error("initializeWasm() must be awaited first!");
5832                 }
5833                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
5834                 return nativeResponseValue;
5835         }
5836         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
5837         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
5838                 if(!isWasmInitialized) {
5839                         throw new Error("initializeWasm() must be awaited first!");
5840                 }
5841                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
5842                 // debug statements here
5843         }
5844         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
5845         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
5846                 if(!isWasmInitialized) {
5847                         throw new Error("initializeWasm() must be awaited first!");
5848                 }
5849                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
5850                 return nativeResponseValue;
5851         }
5852         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
5853         export function CResult_PingDecodeErrorZ_ok(o: number): number {
5854                 if(!isWasmInitialized) {
5855                         throw new Error("initializeWasm() must be awaited first!");
5856                 }
5857                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
5858                 return nativeResponseValue;
5859         }
5860         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
5861         export function CResult_PingDecodeErrorZ_err(e: number): number {
5862                 if(!isWasmInitialized) {
5863                         throw new Error("initializeWasm() must be awaited first!");
5864                 }
5865                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
5866                 return nativeResponseValue;
5867         }
5868         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
5869         export function CResult_PingDecodeErrorZ_free(_res: number): void {
5870                 if(!isWasmInitialized) {
5871                         throw new Error("initializeWasm() must be awaited first!");
5872                 }
5873                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
5874                 // debug statements here
5875         }
5876         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
5877         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
5878                 if(!isWasmInitialized) {
5879                         throw new Error("initializeWasm() must be awaited first!");
5880                 }
5881                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
5882                 return nativeResponseValue;
5883         }
5884         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
5885         export function CResult_PongDecodeErrorZ_ok(o: number): number {
5886                 if(!isWasmInitialized) {
5887                         throw new Error("initializeWasm() must be awaited first!");
5888                 }
5889                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
5890                 return nativeResponseValue;
5891         }
5892         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
5893         export function CResult_PongDecodeErrorZ_err(e: number): number {
5894                 if(!isWasmInitialized) {
5895                         throw new Error("initializeWasm() must be awaited first!");
5896                 }
5897                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
5898                 return nativeResponseValue;
5899         }
5900         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
5901         export function CResult_PongDecodeErrorZ_free(_res: number): void {
5902                 if(!isWasmInitialized) {
5903                         throw new Error("initializeWasm() must be awaited first!");
5904                 }
5905                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
5906                 // debug statements here
5907         }
5908         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
5909         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
5910                 if(!isWasmInitialized) {
5911                         throw new Error("initializeWasm() must be awaited first!");
5912                 }
5913                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
5914                 return nativeResponseValue;
5915         }
5916         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
5917         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
5918                 if(!isWasmInitialized) {
5919                         throw new Error("initializeWasm() must be awaited first!");
5920                 }
5921                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
5922                 return nativeResponseValue;
5923         }
5924         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5925         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
5926                 if(!isWasmInitialized) {
5927                         throw new Error("initializeWasm() must be awaited first!");
5928                 }
5929                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
5930                 return nativeResponseValue;
5931         }
5932         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
5933         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
5934                 if(!isWasmInitialized) {
5935                         throw new Error("initializeWasm() must be awaited first!");
5936                 }
5937                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
5938                 // debug statements here
5939         }
5940         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5941         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
5942                 if(!isWasmInitialized) {
5943                         throw new Error("initializeWasm() must be awaited first!");
5944                 }
5945                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
5946                 return nativeResponseValue;
5947         }
5948         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
5949         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
5950                 if(!isWasmInitialized) {
5951                         throw new Error("initializeWasm() must be awaited first!");
5952                 }
5953                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
5954                 return nativeResponseValue;
5955         }
5956         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5957         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
5958                 if(!isWasmInitialized) {
5959                         throw new Error("initializeWasm() must be awaited first!");
5960                 }
5961                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
5962                 return nativeResponseValue;
5963         }
5964         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
5965         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
5966                 if(!isWasmInitialized) {
5967                         throw new Error("initializeWasm() must be awaited first!");
5968                 }
5969                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
5970                 // debug statements here
5971         }
5972         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5973         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
5974                 if(!isWasmInitialized) {
5975                         throw new Error("initializeWasm() must be awaited first!");
5976                 }
5977                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
5978                 return nativeResponseValue;
5979         }
5980         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
5981         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
5982                 if(!isWasmInitialized) {
5983                         throw new Error("initializeWasm() must be awaited first!");
5984                 }
5985                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
5986                 return nativeResponseValue;
5987         }
5988         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5989         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
5990                 if(!isWasmInitialized) {
5991                         throw new Error("initializeWasm() must be awaited first!");
5992                 }
5993                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
5994                 return nativeResponseValue;
5995         }
5996         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
5997         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
5998                 if(!isWasmInitialized) {
5999                         throw new Error("initializeWasm() must be awaited first!");
6000                 }
6001                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
6002                 // debug statements here
6003         }
6004         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
6005         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
6006                 if(!isWasmInitialized) {
6007                         throw new Error("initializeWasm() must be awaited first!");
6008                 }
6009                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
6010                 return nativeResponseValue;
6011         }
6012         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
6013         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
6014                 if(!isWasmInitialized) {
6015                         throw new Error("initializeWasm() must be awaited first!");
6016                 }
6017                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
6018                 return nativeResponseValue;
6019         }
6020         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6021         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
6022                 if(!isWasmInitialized) {
6023                         throw new Error("initializeWasm() must be awaited first!");
6024                 }
6025                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
6026                 return nativeResponseValue;
6027         }
6028         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
6029         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
6030                 if(!isWasmInitialized) {
6031                         throw new Error("initializeWasm() must be awaited first!");
6032                 }
6033                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
6034                 // debug statements here
6035         }
6036         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
6037         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
6038                 if(!isWasmInitialized) {
6039                         throw new Error("initializeWasm() must be awaited first!");
6040                 }
6041                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
6042                 return nativeResponseValue;
6043         }
6044         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
6045         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
6046                 if(!isWasmInitialized) {
6047                         throw new Error("initializeWasm() must be awaited first!");
6048                 }
6049                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
6050                 return nativeResponseValue;
6051         }
6052         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
6053         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
6054                 if(!isWasmInitialized) {
6055                         throw new Error("initializeWasm() must be awaited first!");
6056                 }
6057                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
6058                 return nativeResponseValue;
6059         }
6060         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
6061         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
6062                 if(!isWasmInitialized) {
6063                         throw new Error("initializeWasm() must be awaited first!");
6064                 }
6065                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
6066                 // debug statements here
6067         }
6068         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
6069         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
6070                 if(!isWasmInitialized) {
6071                         throw new Error("initializeWasm() must be awaited first!");
6072                 }
6073                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
6074                 return nativeResponseValue;
6075         }
6076         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
6077         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
6078                 if(!isWasmInitialized) {
6079                         throw new Error("initializeWasm() must be awaited first!");
6080                 }
6081                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
6082                 return nativeResponseValue;
6083         }
6084         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6085         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
6086                 if(!isWasmInitialized) {
6087                         throw new Error("initializeWasm() must be awaited first!");
6088                 }
6089                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
6090                 return nativeResponseValue;
6091         }
6092         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
6093         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
6094                 if(!isWasmInitialized) {
6095                         throw new Error("initializeWasm() must be awaited first!");
6096                 }
6097                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
6098                 // debug statements here
6099         }
6100         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6101         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
6102                 if(!isWasmInitialized) {
6103                         throw new Error("initializeWasm() must be awaited first!");
6104                 }
6105                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
6106                 return nativeResponseValue;
6107         }
6108         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
6109         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
6110                 if(!isWasmInitialized) {
6111                         throw new Error("initializeWasm() must be awaited first!");
6112                 }
6113                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
6114                 return nativeResponseValue;
6115         }
6116         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6117         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
6118                 if(!isWasmInitialized) {
6119                         throw new Error("initializeWasm() must be awaited first!");
6120                 }
6121                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
6122                 return nativeResponseValue;
6123         }
6124         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
6125         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
6126                 if(!isWasmInitialized) {
6127                         throw new Error("initializeWasm() must be awaited first!");
6128                 }
6129                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
6130                 // debug statements here
6131         }
6132         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6133         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
6134                 if(!isWasmInitialized) {
6135                         throw new Error("initializeWasm() must be awaited first!");
6136                 }
6137                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
6138                 return nativeResponseValue;
6139         }
6140         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
6141         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
6142                 if(!isWasmInitialized) {
6143                         throw new Error("initializeWasm() must be awaited first!");
6144                 }
6145                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
6146                 return nativeResponseValue;
6147         }
6148         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
6149         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
6150                 if(!isWasmInitialized) {
6151                         throw new Error("initializeWasm() must be awaited first!");
6152                 }
6153                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
6154                 return nativeResponseValue;
6155         }
6156         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
6157         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
6158                 if(!isWasmInitialized) {
6159                         throw new Error("initializeWasm() must be awaited first!");
6160                 }
6161                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
6162                 // debug statements here
6163         }
6164         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
6165         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
6166                 if(!isWasmInitialized) {
6167                         throw new Error("initializeWasm() must be awaited first!");
6168                 }
6169                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
6170                 return nativeResponseValue;
6171         }
6172         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
6173         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
6174                 if(!isWasmInitialized) {
6175                         throw new Error("initializeWasm() must be awaited first!");
6176                 }
6177                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
6178                 return nativeResponseValue;
6179         }
6180         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
6181         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
6182                 if(!isWasmInitialized) {
6183                         throw new Error("initializeWasm() must be awaited first!");
6184                 }
6185                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
6186                 return nativeResponseValue;
6187         }
6188         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
6189         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
6190                 if(!isWasmInitialized) {
6191                         throw new Error("initializeWasm() must be awaited first!");
6192                 }
6193                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
6194                 // debug statements here
6195         }
6196         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
6197         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
6198                 if(!isWasmInitialized) {
6199                         throw new Error("initializeWasm() must be awaited first!");
6200                 }
6201                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
6202                 return nativeResponseValue;
6203         }
6204         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
6205         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
6206                 if(!isWasmInitialized) {
6207                         throw new Error("initializeWasm() must be awaited first!");
6208                 }
6209                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
6210                 return nativeResponseValue;
6211         }
6212         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
6213         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
6214                 if(!isWasmInitialized) {
6215                         throw new Error("initializeWasm() must be awaited first!");
6216                 }
6217                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
6218                 return nativeResponseValue;
6219         }
6220         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
6221         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
6222                 if(!isWasmInitialized) {
6223                         throw new Error("initializeWasm() must be awaited first!");
6224                 }
6225                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
6226                 // debug statements here
6227         }
6228         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
6229         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
6230                 if(!isWasmInitialized) {
6231                         throw new Error("initializeWasm() must be awaited first!");
6232                 }
6233                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
6234                 return nativeResponseValue;
6235         }
6236         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
6237         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
6238                 if(!isWasmInitialized) {
6239                         throw new Error("initializeWasm() must be awaited first!");
6240                 }
6241                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
6242                 return nativeResponseValue;
6243         }
6244         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
6245         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
6246                 if(!isWasmInitialized) {
6247                         throw new Error("initializeWasm() must be awaited first!");
6248                 }
6249                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
6250                 return nativeResponseValue;
6251         }
6252         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
6253         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
6254                 if(!isWasmInitialized) {
6255                         throw new Error("initializeWasm() must be awaited first!");
6256                 }
6257                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
6258                 // debug statements here
6259         }
6260         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
6261         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
6262                 if(!isWasmInitialized) {
6263                         throw new Error("initializeWasm() must be awaited first!");
6264                 }
6265                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
6266                 return nativeResponseValue;
6267         }
6268         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
6269         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
6270                 if(!isWasmInitialized) {
6271                         throw new Error("initializeWasm() must be awaited first!");
6272                 }
6273                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
6274                 return nativeResponseValue;
6275         }
6276         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
6277         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
6278                 if(!isWasmInitialized) {
6279                         throw new Error("initializeWasm() must be awaited first!");
6280                 }
6281                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
6282                 return nativeResponseValue;
6283         }
6284         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
6285         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
6286                 if(!isWasmInitialized) {
6287                         throw new Error("initializeWasm() must be awaited first!");
6288                 }
6289                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
6290                 // debug statements here
6291         }
6292         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
6293         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
6294                 if(!isWasmInitialized) {
6295                         throw new Error("initializeWasm() must be awaited first!");
6296                 }
6297                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
6298                 return nativeResponseValue;
6299         }
6300         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
6301         export function CResult_InvoiceSignOrCreationErrorZ_ok(o: number): number {
6302                 if(!isWasmInitialized) {
6303                         throw new Error("initializeWasm() must be awaited first!");
6304                 }
6305                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_ok(o);
6306                 return nativeResponseValue;
6307         }
6308         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
6309         export function CResult_InvoiceSignOrCreationErrorZ_err(e: number): number {
6310                 if(!isWasmInitialized) {
6311                         throw new Error("initializeWasm() must be awaited first!");
6312                 }
6313                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_err(e);
6314                 return nativeResponseValue;
6315         }
6316         // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
6317         export function CResult_InvoiceSignOrCreationErrorZ_free(_res: number): void {
6318                 if(!isWasmInitialized) {
6319                         throw new Error("initializeWasm() must be awaited first!");
6320                 }
6321                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_free(_res);
6322                 // debug statements here
6323         }
6324         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
6325         export function CResult_InvoiceSignOrCreationErrorZ_clone(orig: number): number {
6326                 if(!isWasmInitialized) {
6327                         throw new Error("initializeWasm() must be awaited first!");
6328                 }
6329                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone(orig);
6330                 return nativeResponseValue;
6331         }
6332         // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
6333         export function COption_FilterZ_some(o: number): number {
6334                 if(!isWasmInitialized) {
6335                         throw new Error("initializeWasm() must be awaited first!");
6336                 }
6337                 const nativeResponseValue = wasm.COption_FilterZ_some(o);
6338                 return nativeResponseValue;
6339         }
6340         // struct LDKCOption_FilterZ COption_FilterZ_none(void);
6341         export function COption_FilterZ_none(): number {
6342                 if(!isWasmInitialized) {
6343                         throw new Error("initializeWasm() must be awaited first!");
6344                 }
6345                 const nativeResponseValue = wasm.COption_FilterZ_none();
6346                 return nativeResponseValue;
6347         }
6348         // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
6349         export function COption_FilterZ_free(_res: number): void {
6350                 if(!isWasmInitialized) {
6351                         throw new Error("initializeWasm() must be awaited first!");
6352                 }
6353                 const nativeResponseValue = wasm.COption_FilterZ_free(_res);
6354                 // debug statements here
6355         }
6356         // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
6357         export function PaymentPurpose_free(this_ptr: number): void {
6358                 if(!isWasmInitialized) {
6359                         throw new Error("initializeWasm() must be awaited first!");
6360                 }
6361                 const nativeResponseValue = wasm.PaymentPurpose_free(this_ptr);
6362                 // debug statements here
6363         }
6364         // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
6365         export function PaymentPurpose_clone(orig: number): number {
6366                 if(!isWasmInitialized) {
6367                         throw new Error("initializeWasm() must be awaited first!");
6368                 }
6369                 const nativeResponseValue = wasm.PaymentPurpose_clone(orig);
6370                 return nativeResponseValue;
6371         }
6372         // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t user_payment_id);
6373         export function PaymentPurpose_invoice_payment(payment_preimage: Uint8Array, payment_secret: Uint8Array, user_payment_id: number): number {
6374                 if(!isWasmInitialized) {
6375                         throw new Error("initializeWasm() must be awaited first!");
6376                 }
6377                 const nativeResponseValue = wasm.PaymentPurpose_invoice_payment(encodeArray(payment_preimage), encodeArray(payment_secret), user_payment_id);
6378                 return nativeResponseValue;
6379         }
6380         // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
6381         export function PaymentPurpose_spontaneous_payment(a: Uint8Array): number {
6382                 if(!isWasmInitialized) {
6383                         throw new Error("initializeWasm() must be awaited first!");
6384                 }
6385                 const nativeResponseValue = wasm.PaymentPurpose_spontaneous_payment(encodeArray(a));
6386                 return nativeResponseValue;
6387         }
6388         // void ClosureReason_free(struct LDKClosureReason this_ptr);
6389         export function ClosureReason_free(this_ptr: number): void {
6390                 if(!isWasmInitialized) {
6391                         throw new Error("initializeWasm() must be awaited first!");
6392                 }
6393                 const nativeResponseValue = wasm.ClosureReason_free(this_ptr);
6394                 // debug statements here
6395         }
6396         // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
6397         export function ClosureReason_clone(orig: number): number {
6398                 if(!isWasmInitialized) {
6399                         throw new Error("initializeWasm() must be awaited first!");
6400                 }
6401                 const nativeResponseValue = wasm.ClosureReason_clone(orig);
6402                 return nativeResponseValue;
6403         }
6404         // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
6405         export function ClosureReason_counterparty_force_closed(peer_msg: String): number {
6406                 if(!isWasmInitialized) {
6407                         throw new Error("initializeWasm() must be awaited first!");
6408                 }
6409                 const nativeResponseValue = wasm.ClosureReason_counterparty_force_closed(peer_msg);
6410                 return nativeResponseValue;
6411         }
6412         // struct LDKClosureReason ClosureReason_holder_force_closed(void);
6413         export function ClosureReason_holder_force_closed(): number {
6414                 if(!isWasmInitialized) {
6415                         throw new Error("initializeWasm() must be awaited first!");
6416                 }
6417                 const nativeResponseValue = wasm.ClosureReason_holder_force_closed();
6418                 return nativeResponseValue;
6419         }
6420         // struct LDKClosureReason ClosureReason_cooperative_closure(void);
6421         export function ClosureReason_cooperative_closure(): number {
6422                 if(!isWasmInitialized) {
6423                         throw new Error("initializeWasm() must be awaited first!");
6424                 }
6425                 const nativeResponseValue = wasm.ClosureReason_cooperative_closure();
6426                 return nativeResponseValue;
6427         }
6428         // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
6429         export function ClosureReason_commitment_tx_confirmed(): number {
6430                 if(!isWasmInitialized) {
6431                         throw new Error("initializeWasm() must be awaited first!");
6432                 }
6433                 const nativeResponseValue = wasm.ClosureReason_commitment_tx_confirmed();
6434                 return nativeResponseValue;
6435         }
6436         // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
6437         export function ClosureReason_processing_error(err: String): number {
6438                 if(!isWasmInitialized) {
6439                         throw new Error("initializeWasm() must be awaited first!");
6440                 }
6441                 const nativeResponseValue = wasm.ClosureReason_processing_error(err);
6442                 return nativeResponseValue;
6443         }
6444         // struct LDKClosureReason ClosureReason_disconnected_peer(void);
6445         export function ClosureReason_disconnected_peer(): number {
6446                 if(!isWasmInitialized) {
6447                         throw new Error("initializeWasm() must be awaited first!");
6448                 }
6449                 const nativeResponseValue = wasm.ClosureReason_disconnected_peer();
6450                 return nativeResponseValue;
6451         }
6452         // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
6453         export function ClosureReason_outdated_channel_manager(): number {
6454                 if(!isWasmInitialized) {
6455                         throw new Error("initializeWasm() must be awaited first!");
6456                 }
6457                 const nativeResponseValue = wasm.ClosureReason_outdated_channel_manager();
6458                 return nativeResponseValue;
6459         }
6460         // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
6461         export function ClosureReason_write(obj: number): Uint8Array {
6462                 if(!isWasmInitialized) {
6463                         throw new Error("initializeWasm() must be awaited first!");
6464                 }
6465                 const nativeResponseValue = wasm.ClosureReason_write(obj);
6466                 return decodeArray(nativeResponseValue);
6467         }
6468         // void Event_free(struct LDKEvent this_ptr);
6469         export function Event_free(this_ptr: number): void {
6470                 if(!isWasmInitialized) {
6471                         throw new Error("initializeWasm() must be awaited first!");
6472                 }
6473                 const nativeResponseValue = wasm.Event_free(this_ptr);
6474                 // debug statements here
6475         }
6476         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
6477         export function Event_clone(orig: number): number {
6478                 if(!isWasmInitialized) {
6479                         throw new Error("initializeWasm() must be awaited first!");
6480                 }
6481                 const nativeResponseValue = wasm.Event_clone(orig);
6482                 return nativeResponseValue;
6483         }
6484         // 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);
6485         export function Event_funding_generation_ready(temporary_channel_id: Uint8Array, channel_value_satoshis: number, output_script: Uint8Array, user_channel_id: number): number {
6486                 if(!isWasmInitialized) {
6487                         throw new Error("initializeWasm() must be awaited first!");
6488                 }
6489                 const nativeResponseValue = wasm.Event_funding_generation_ready(encodeArray(temporary_channel_id), channel_value_satoshis, encodeArray(output_script), user_channel_id);
6490                 return nativeResponseValue;
6491         }
6492         // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
6493         export function Event_payment_received(payment_hash: Uint8Array, amt: number, purpose: number): number {
6494                 if(!isWasmInitialized) {
6495                         throw new Error("initializeWasm() must be awaited first!");
6496                 }
6497                 const nativeResponseValue = wasm.Event_payment_received(encodeArray(payment_hash), amt, purpose);
6498                 return nativeResponseValue;
6499         }
6500         // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_preimage);
6501         export function Event_payment_sent(payment_preimage: Uint8Array): number {
6502                 if(!isWasmInitialized) {
6503                         throw new Error("initializeWasm() must be awaited first!");
6504                 }
6505                 const nativeResponseValue = wasm.Event_payment_sent(encodeArray(payment_preimage));
6506                 return nativeResponseValue;
6507         }
6508         // struct LDKEvent Event_payment_path_failed(struct LDKThirtyTwoBytes payment_hash, bool rejected_by_dest, struct LDKCOption_NetworkUpdateZ network_update, bool all_paths_failed, struct LDKCVec_RouteHopZ path);
6509         export function Event_payment_path_failed(payment_hash: Uint8Array, rejected_by_dest: boolean, network_update: number, all_paths_failed: boolean, path: number[]): number {
6510                 if(!isWasmInitialized) {
6511                         throw new Error("initializeWasm() must be awaited first!");
6512                 }
6513                 const nativeResponseValue = wasm.Event_payment_path_failed(encodeArray(payment_hash), rejected_by_dest, network_update, all_paths_failed, path);
6514                 return nativeResponseValue;
6515         }
6516         // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
6517         export function Event_pending_htlcs_forwardable(time_forwardable: number): number {
6518                 if(!isWasmInitialized) {
6519                         throw new Error("initializeWasm() must be awaited first!");
6520                 }
6521                 const nativeResponseValue = wasm.Event_pending_htlcs_forwardable(time_forwardable);
6522                 return nativeResponseValue;
6523         }
6524         // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
6525         export function Event_spendable_outputs(outputs: number[]): number {
6526                 if(!isWasmInitialized) {
6527                         throw new Error("initializeWasm() must be awaited first!");
6528                 }
6529                 const nativeResponseValue = wasm.Event_spendable_outputs(outputs);
6530                 return nativeResponseValue;
6531         }
6532         // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
6533         export function Event_payment_forwarded(fee_earned_msat: number, claim_from_onchain_tx: boolean): number {
6534                 if(!isWasmInitialized) {
6535                         throw new Error("initializeWasm() must be awaited first!");
6536                 }
6537                 const nativeResponseValue = wasm.Event_payment_forwarded(fee_earned_msat, claim_from_onchain_tx);
6538                 return nativeResponseValue;
6539         }
6540         // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, struct LDKClosureReason reason);
6541         export function Event_channel_closed(channel_id: Uint8Array, reason: number): number {
6542                 if(!isWasmInitialized) {
6543                         throw new Error("initializeWasm() must be awaited first!");
6544                 }
6545                 const nativeResponseValue = wasm.Event_channel_closed(encodeArray(channel_id), reason);
6546                 return nativeResponseValue;
6547         }
6548         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
6549         export function Event_write(obj: number): Uint8Array {
6550                 if(!isWasmInitialized) {
6551                         throw new Error("initializeWasm() must be awaited first!");
6552                 }
6553                 const nativeResponseValue = wasm.Event_write(obj);
6554                 return decodeArray(nativeResponseValue);
6555         }
6556         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
6557         export function MessageSendEvent_free(this_ptr: number): void {
6558                 if(!isWasmInitialized) {
6559                         throw new Error("initializeWasm() must be awaited first!");
6560                 }
6561                 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
6562                 // debug statements here
6563         }
6564         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
6565         export function MessageSendEvent_clone(orig: number): number {
6566                 if(!isWasmInitialized) {
6567                         throw new Error("initializeWasm() must be awaited first!");
6568                 }
6569                 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
6570                 return nativeResponseValue;
6571         }
6572         // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
6573         export function MessageSendEvent_send_accept_channel(node_id: Uint8Array, msg: number): number {
6574                 if(!isWasmInitialized) {
6575                         throw new Error("initializeWasm() must be awaited first!");
6576                 }
6577                 const nativeResponseValue = wasm.MessageSendEvent_send_accept_channel(encodeArray(node_id), msg);
6578                 return nativeResponseValue;
6579         }
6580         // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
6581         export function MessageSendEvent_send_open_channel(node_id: Uint8Array, msg: number): number {
6582                 if(!isWasmInitialized) {
6583                         throw new Error("initializeWasm() must be awaited first!");
6584                 }
6585                 const nativeResponseValue = wasm.MessageSendEvent_send_open_channel(encodeArray(node_id), msg);
6586                 return nativeResponseValue;
6587         }
6588         // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
6589         export function MessageSendEvent_send_funding_created(node_id: Uint8Array, msg: number): number {
6590                 if(!isWasmInitialized) {
6591                         throw new Error("initializeWasm() must be awaited first!");
6592                 }
6593                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_created(encodeArray(node_id), msg);
6594                 return nativeResponseValue;
6595         }
6596         // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
6597         export function MessageSendEvent_send_funding_signed(node_id: Uint8Array, msg: number): number {
6598                 if(!isWasmInitialized) {
6599                         throw new Error("initializeWasm() must be awaited first!");
6600                 }
6601                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_signed(encodeArray(node_id), msg);
6602                 return nativeResponseValue;
6603         }
6604         // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
6605         export function MessageSendEvent_send_funding_locked(node_id: Uint8Array, msg: number): number {
6606                 if(!isWasmInitialized) {
6607                         throw new Error("initializeWasm() must be awaited first!");
6608                 }
6609                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_locked(encodeArray(node_id), msg);
6610                 return nativeResponseValue;
6611         }
6612         // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
6613         export function MessageSendEvent_send_announcement_signatures(node_id: Uint8Array, msg: number): number {
6614                 if(!isWasmInitialized) {
6615                         throw new Error("initializeWasm() must be awaited first!");
6616                 }
6617                 const nativeResponseValue = wasm.MessageSendEvent_send_announcement_signatures(encodeArray(node_id), msg);
6618                 return nativeResponseValue;
6619         }
6620         // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
6621         export function MessageSendEvent_update_htlcs(node_id: Uint8Array, updates: number): number {
6622                 if(!isWasmInitialized) {
6623                         throw new Error("initializeWasm() must be awaited first!");
6624                 }
6625                 const nativeResponseValue = wasm.MessageSendEvent_update_htlcs(encodeArray(node_id), updates);
6626                 return nativeResponseValue;
6627         }
6628         // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
6629         export function MessageSendEvent_send_revoke_and_ack(node_id: Uint8Array, msg: number): number {
6630                 if(!isWasmInitialized) {
6631                         throw new Error("initializeWasm() must be awaited first!");
6632                 }
6633                 const nativeResponseValue = wasm.MessageSendEvent_send_revoke_and_ack(encodeArray(node_id), msg);
6634                 return nativeResponseValue;
6635         }
6636         // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
6637         export function MessageSendEvent_send_closing_signed(node_id: Uint8Array, msg: number): number {
6638                 if(!isWasmInitialized) {
6639                         throw new Error("initializeWasm() must be awaited first!");
6640                 }
6641                 const nativeResponseValue = wasm.MessageSendEvent_send_closing_signed(encodeArray(node_id), msg);
6642                 return nativeResponseValue;
6643         }
6644         // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
6645         export function MessageSendEvent_send_shutdown(node_id: Uint8Array, msg: number): number {
6646                 if(!isWasmInitialized) {
6647                         throw new Error("initializeWasm() must be awaited first!");
6648                 }
6649                 const nativeResponseValue = wasm.MessageSendEvent_send_shutdown(encodeArray(node_id), msg);
6650                 return nativeResponseValue;
6651         }
6652         // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
6653         export function MessageSendEvent_send_channel_reestablish(node_id: Uint8Array, msg: number): number {
6654                 if(!isWasmInitialized) {
6655                         throw new Error("initializeWasm() must be awaited first!");
6656                 }
6657                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_reestablish(encodeArray(node_id), msg);
6658                 return nativeResponseValue;
6659         }
6660         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
6661         export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
6662                 if(!isWasmInitialized) {
6663                         throw new Error("initializeWasm() must be awaited first!");
6664                 }
6665                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
6666                 return nativeResponseValue;
6667         }
6668         // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
6669         export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
6670                 if(!isWasmInitialized) {
6671                         throw new Error("initializeWasm() must be awaited first!");
6672                 }
6673                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_node_announcement(msg);
6674                 return nativeResponseValue;
6675         }
6676         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
6677         export function MessageSendEvent_broadcast_channel_update(msg: number): number {
6678                 if(!isWasmInitialized) {
6679                         throw new Error("initializeWasm() must be awaited first!");
6680                 }
6681                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_update(msg);
6682                 return nativeResponseValue;
6683         }
6684         // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
6685         export function MessageSendEvent_send_channel_update(node_id: Uint8Array, msg: number): number {
6686                 if(!isWasmInitialized) {
6687                         throw new Error("initializeWasm() must be awaited first!");
6688                 }
6689                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_update(encodeArray(node_id), msg);
6690                 return nativeResponseValue;
6691         }
6692         // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
6693         export function MessageSendEvent_handle_error(node_id: Uint8Array, action: number): number {
6694                 if(!isWasmInitialized) {
6695                         throw new Error("initializeWasm() must be awaited first!");
6696                 }
6697                 const nativeResponseValue = wasm.MessageSendEvent_handle_error(encodeArray(node_id), action);
6698                 return nativeResponseValue;
6699         }
6700         // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
6701         export function MessageSendEvent_send_channel_range_query(node_id: Uint8Array, msg: number): number {
6702                 if(!isWasmInitialized) {
6703                         throw new Error("initializeWasm() must be awaited first!");
6704                 }
6705                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_range_query(encodeArray(node_id), msg);
6706                 return nativeResponseValue;
6707         }
6708         // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
6709         export function MessageSendEvent_send_short_ids_query(node_id: Uint8Array, msg: number): number {
6710                 if(!isWasmInitialized) {
6711                         throw new Error("initializeWasm() must be awaited first!");
6712                 }
6713                 const nativeResponseValue = wasm.MessageSendEvent_send_short_ids_query(encodeArray(node_id), msg);
6714                 return nativeResponseValue;
6715         }
6716         // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
6717         export function MessageSendEvent_send_reply_channel_range(node_id: Uint8Array, msg: number): number {
6718                 if(!isWasmInitialized) {
6719                         throw new Error("initializeWasm() must be awaited first!");
6720                 }
6721                 const nativeResponseValue = wasm.MessageSendEvent_send_reply_channel_range(encodeArray(node_id), msg);
6722                 return nativeResponseValue;
6723         }
6724         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
6725         export function MessageSendEventsProvider_free(this_ptr: number): void {
6726                 if(!isWasmInitialized) {
6727                         throw new Error("initializeWasm() must be awaited first!");
6728                 }
6729                 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
6730                 // debug statements here
6731         }
6732         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
6733         export function EventsProvider_free(this_ptr: number): void {
6734                 if(!isWasmInitialized) {
6735                         throw new Error("initializeWasm() must be awaited first!");
6736                 }
6737                 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
6738                 // debug statements here
6739         }
6740         // void EventHandler_free(struct LDKEventHandler this_ptr);
6741         export function EventHandler_free(this_ptr: number): void {
6742                 if(!isWasmInitialized) {
6743                         throw new Error("initializeWasm() must be awaited first!");
6744                 }
6745                 const nativeResponseValue = wasm.EventHandler_free(this_ptr);
6746                 // debug statements here
6747         }
6748         // void APIError_free(struct LDKAPIError this_ptr);
6749         export function APIError_free(this_ptr: number): void {
6750                 if(!isWasmInitialized) {
6751                         throw new Error("initializeWasm() must be awaited first!");
6752                 }
6753                 const nativeResponseValue = wasm.APIError_free(this_ptr);
6754                 // debug statements here
6755         }
6756         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
6757         export function APIError_clone(orig: number): number {
6758                 if(!isWasmInitialized) {
6759                         throw new Error("initializeWasm() must be awaited first!");
6760                 }
6761                 const nativeResponseValue = wasm.APIError_clone(orig);
6762                 return nativeResponseValue;
6763         }
6764         // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
6765         export function APIError_apimisuse_error(err: String): number {
6766                 if(!isWasmInitialized) {
6767                         throw new Error("initializeWasm() must be awaited first!");
6768                 }
6769                 const nativeResponseValue = wasm.APIError_apimisuse_error(err);
6770                 return nativeResponseValue;
6771         }
6772         // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
6773         export function APIError_fee_rate_too_high(err: String, feerate: number): number {
6774                 if(!isWasmInitialized) {
6775                         throw new Error("initializeWasm() must be awaited first!");
6776                 }
6777                 const nativeResponseValue = wasm.APIError_fee_rate_too_high(err, feerate);
6778                 return nativeResponseValue;
6779         }
6780         // struct LDKAPIError APIError_route_error(struct LDKStr err);
6781         export function APIError_route_error(err: String): number {
6782                 if(!isWasmInitialized) {
6783                         throw new Error("initializeWasm() must be awaited first!");
6784                 }
6785                 const nativeResponseValue = wasm.APIError_route_error(err);
6786                 return nativeResponseValue;
6787         }
6788         // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
6789         export function APIError_channel_unavailable(err: String): number {
6790                 if(!isWasmInitialized) {
6791                         throw new Error("initializeWasm() must be awaited first!");
6792                 }
6793                 const nativeResponseValue = wasm.APIError_channel_unavailable(err);
6794                 return nativeResponseValue;
6795         }
6796         // struct LDKAPIError APIError_monitor_update_failed(void);
6797         export function APIError_monitor_update_failed(): number {
6798                 if(!isWasmInitialized) {
6799                         throw new Error("initializeWasm() must be awaited first!");
6800                 }
6801                 const nativeResponseValue = wasm.APIError_monitor_update_failed();
6802                 return nativeResponseValue;
6803         }
6804         // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
6805         export function APIError_incompatible_shutdown_script(script: number): number {
6806                 if(!isWasmInitialized) {
6807                         throw new Error("initializeWasm() must be awaited first!");
6808                 }
6809                 const nativeResponseValue = wasm.APIError_incompatible_shutdown_script(script);
6810                 return nativeResponseValue;
6811         }
6812         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
6813         export function sign(msg: Uint8Array, sk: Uint8Array): number {
6814                 if(!isWasmInitialized) {
6815                         throw new Error("initializeWasm() must be awaited first!");
6816                 }
6817                 const nativeResponseValue = wasm.sign(encodeArray(msg), encodeArray(sk));
6818                 return nativeResponseValue;
6819         }
6820         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
6821         export function recover_pk(msg: Uint8Array, sig: String): number {
6822                 if(!isWasmInitialized) {
6823                         throw new Error("initializeWasm() must be awaited first!");
6824                 }
6825                 const nativeResponseValue = wasm.recover_pk(encodeArray(msg), sig);
6826                 return nativeResponseValue;
6827         }
6828         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
6829         export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
6830                 if(!isWasmInitialized) {
6831                         throw new Error("initializeWasm() must be awaited first!");
6832                 }
6833                 const nativeResponseValue = wasm.verify(encodeArray(msg), sig, encodeArray(pk));
6834                 return nativeResponseValue;
6835         }
6836         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
6837         export function Level_clone(orig: number): Level {
6838                 if(!isWasmInitialized) {
6839                         throw new Error("initializeWasm() must be awaited first!");
6840                 }
6841                 const nativeResponseValue = wasm.Level_clone(orig);
6842                 return nativeResponseValue;
6843         }
6844         // enum LDKLevel Level_trace(void);
6845         export function Level_trace(): Level {
6846                 if(!isWasmInitialized) {
6847                         throw new Error("initializeWasm() must be awaited first!");
6848                 }
6849                 const nativeResponseValue = wasm.Level_trace();
6850                 return nativeResponseValue;
6851         }
6852         // enum LDKLevel Level_debug(void);
6853         export function Level_debug(): Level {
6854                 if(!isWasmInitialized) {
6855                         throw new Error("initializeWasm() must be awaited first!");
6856                 }
6857                 const nativeResponseValue = wasm.Level_debug();
6858                 return nativeResponseValue;
6859         }
6860         // enum LDKLevel Level_info(void);
6861         export function Level_info(): Level {
6862                 if(!isWasmInitialized) {
6863                         throw new Error("initializeWasm() must be awaited first!");
6864                 }
6865                 const nativeResponseValue = wasm.Level_info();
6866                 return nativeResponseValue;
6867         }
6868         // enum LDKLevel Level_warn(void);
6869         export function Level_warn(): Level {
6870                 if(!isWasmInitialized) {
6871                         throw new Error("initializeWasm() must be awaited first!");
6872                 }
6873                 const nativeResponseValue = wasm.Level_warn();
6874                 return nativeResponseValue;
6875         }
6876         // enum LDKLevel Level_error(void);
6877         export function Level_error(): Level {
6878                 if(!isWasmInitialized) {
6879                         throw new Error("initializeWasm() must be awaited first!");
6880                 }
6881                 const nativeResponseValue = wasm.Level_error();
6882                 return nativeResponseValue;
6883         }
6884         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
6885         export function Level_eq(a: number, b: number): boolean {
6886                 if(!isWasmInitialized) {
6887                         throw new Error("initializeWasm() must be awaited first!");
6888                 }
6889                 const nativeResponseValue = wasm.Level_eq(a, b);
6890                 return nativeResponseValue;
6891         }
6892         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
6893         export function Level_hash(o: number): number {
6894                 if(!isWasmInitialized) {
6895                         throw new Error("initializeWasm() must be awaited first!");
6896                 }
6897                 const nativeResponseValue = wasm.Level_hash(o);
6898                 return nativeResponseValue;
6899         }
6900         // MUST_USE_RES enum LDKLevel Level_max(void);
6901         export function Level_max(): Level {
6902                 if(!isWasmInitialized) {
6903                         throw new Error("initializeWasm() must be awaited first!");
6904                 }
6905                 const nativeResponseValue = wasm.Level_max();
6906                 return nativeResponseValue;
6907         }
6908         // void Logger_free(struct LDKLogger this_ptr);
6909         export function Logger_free(this_ptr: number): void {
6910                 if(!isWasmInitialized) {
6911                         throw new Error("initializeWasm() must be awaited first!");
6912                 }
6913                 const nativeResponseValue = wasm.Logger_free(this_ptr);
6914                 // debug statements here
6915         }
6916         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
6917         export function ChannelHandshakeConfig_free(this_obj: number): void {
6918                 if(!isWasmInitialized) {
6919                         throw new Error("initializeWasm() must be awaited first!");
6920                 }
6921                 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
6922                 // debug statements here
6923         }
6924         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
6925         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
6926                 if(!isWasmInitialized) {
6927                         throw new Error("initializeWasm() must be awaited first!");
6928                 }
6929                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
6930                 return nativeResponseValue;
6931         }
6932         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
6933         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
6934                 if(!isWasmInitialized) {
6935                         throw new Error("initializeWasm() must be awaited first!");
6936                 }
6937                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
6938                 // debug statements here
6939         }
6940         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
6941         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
6942                 if(!isWasmInitialized) {
6943                         throw new Error("initializeWasm() must be awaited first!");
6944                 }
6945                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
6946                 return nativeResponseValue;
6947         }
6948         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
6949         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
6950                 if(!isWasmInitialized) {
6951                         throw new Error("initializeWasm() must be awaited first!");
6952                 }
6953                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
6954                 // debug statements here
6955         }
6956         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
6957         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
6958                 if(!isWasmInitialized) {
6959                         throw new Error("initializeWasm() must be awaited first!");
6960                 }
6961                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
6962                 return nativeResponseValue;
6963         }
6964         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
6965         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
6966                 if(!isWasmInitialized) {
6967                         throw new Error("initializeWasm() must be awaited first!");
6968                 }
6969                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
6970                 // debug statements here
6971         }
6972         // 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);
6973         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
6974                 if(!isWasmInitialized) {
6975                         throw new Error("initializeWasm() must be awaited first!");
6976                 }
6977                 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
6978                 return nativeResponseValue;
6979         }
6980         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
6981         export function ChannelHandshakeConfig_clone(orig: number): number {
6982                 if(!isWasmInitialized) {
6983                         throw new Error("initializeWasm() must be awaited first!");
6984                 }
6985                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
6986                 return nativeResponseValue;
6987         }
6988         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
6989         export function ChannelHandshakeConfig_default(): number {
6990                 if(!isWasmInitialized) {
6991                         throw new Error("initializeWasm() must be awaited first!");
6992                 }
6993                 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
6994                 return nativeResponseValue;
6995         }
6996         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
6997         export function ChannelHandshakeLimits_free(this_obj: number): void {
6998                 if(!isWasmInitialized) {
6999                         throw new Error("initializeWasm() must be awaited first!");
7000                 }
7001                 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
7002                 // debug statements here
7003         }
7004         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7005         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
7006                 if(!isWasmInitialized) {
7007                         throw new Error("initializeWasm() must be awaited first!");
7008                 }
7009                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
7010                 return nativeResponseValue;
7011         }
7012         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7013         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
7014                 if(!isWasmInitialized) {
7015                         throw new Error("initializeWasm() must be awaited first!");
7016                 }
7017                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
7018                 // debug statements here
7019         }
7020         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7021         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
7022                 if(!isWasmInitialized) {
7023                         throw new Error("initializeWasm() must be awaited first!");
7024                 }
7025                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
7026                 return nativeResponseValue;
7027         }
7028         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7029         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
7030                 if(!isWasmInitialized) {
7031                         throw new Error("initializeWasm() must be awaited first!");
7032                 }
7033                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
7034                 // debug statements here
7035         }
7036         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7037         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
7038                 if(!isWasmInitialized) {
7039                         throw new Error("initializeWasm() must be awaited first!");
7040                 }
7041                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
7042                 return nativeResponseValue;
7043         }
7044         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7045         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7046                 if(!isWasmInitialized) {
7047                         throw new Error("initializeWasm() must be awaited first!");
7048                 }
7049                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
7050                 // debug statements here
7051         }
7052         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7053         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
7054                 if(!isWasmInitialized) {
7055                         throw new Error("initializeWasm() must be awaited first!");
7056                 }
7057                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
7058                 return nativeResponseValue;
7059         }
7060         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7061         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
7062                 if(!isWasmInitialized) {
7063                         throw new Error("initializeWasm() must be awaited first!");
7064                 }
7065                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
7066                 // debug statements here
7067         }
7068         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7069         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
7070                 if(!isWasmInitialized) {
7071                         throw new Error("initializeWasm() must be awaited first!");
7072                 }
7073                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
7074                 return nativeResponseValue;
7075         }
7076         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
7077         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
7078                 if(!isWasmInitialized) {
7079                         throw new Error("initializeWasm() must be awaited first!");
7080                 }
7081                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
7082                 // debug statements here
7083         }
7084         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7085         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
7086                 if(!isWasmInitialized) {
7087                         throw new Error("initializeWasm() must be awaited first!");
7088                 }
7089                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
7090                 return nativeResponseValue;
7091         }
7092         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
7093         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
7094                 if(!isWasmInitialized) {
7095                         throw new Error("initializeWasm() must be awaited first!");
7096                 }
7097                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
7098                 // debug statements here
7099         }
7100         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7101         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
7102                 if(!isWasmInitialized) {
7103                         throw new Error("initializeWasm() must be awaited first!");
7104                 }
7105                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
7106                 return nativeResponseValue;
7107         }
7108         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
7109         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
7110                 if(!isWasmInitialized) {
7111                         throw new Error("initializeWasm() must be awaited first!");
7112                 }
7113                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
7114                 // debug statements here
7115         }
7116         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7117         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
7118                 if(!isWasmInitialized) {
7119                         throw new Error("initializeWasm() must be awaited first!");
7120                 }
7121                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
7122                 return nativeResponseValue;
7123         }
7124         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
7125         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
7126                 if(!isWasmInitialized) {
7127                         throw new Error("initializeWasm() must be awaited first!");
7128                 }
7129                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
7130                 // debug statements here
7131         }
7132         // 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);
7133         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 {
7134                 if(!isWasmInitialized) {
7135                         throw new Error("initializeWasm() must be awaited first!");
7136                 }
7137                 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);
7138                 return nativeResponseValue;
7139         }
7140         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
7141         export function ChannelHandshakeLimits_clone(orig: number): number {
7142                 if(!isWasmInitialized) {
7143                         throw new Error("initializeWasm() must be awaited first!");
7144                 }
7145                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
7146                 return nativeResponseValue;
7147         }
7148         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
7149         export function ChannelHandshakeLimits_default(): number {
7150                 if(!isWasmInitialized) {
7151                         throw new Error("initializeWasm() must be awaited first!");
7152                 }
7153                 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
7154                 return nativeResponseValue;
7155         }
7156         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
7157         export function ChannelConfig_free(this_obj: number): void {
7158                 if(!isWasmInitialized) {
7159                         throw new Error("initializeWasm() must be awaited first!");
7160                 }
7161                 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
7162                 // debug statements here
7163         }
7164         // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7165         export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
7166                 if(!isWasmInitialized) {
7167                         throw new Error("initializeWasm() must be awaited first!");
7168                 }
7169                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
7170                 return nativeResponseValue;
7171         }
7172         // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
7173         export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
7174                 if(!isWasmInitialized) {
7175                         throw new Error("initializeWasm() must be awaited first!");
7176                 }
7177                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
7178                 // debug statements here
7179         }
7180         // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7181         export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
7182                 if(!isWasmInitialized) {
7183                         throw new Error("initializeWasm() must be awaited first!");
7184                 }
7185                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
7186                 return nativeResponseValue;
7187         }
7188         // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
7189         export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
7190                 if(!isWasmInitialized) {
7191                         throw new Error("initializeWasm() must be awaited first!");
7192                 }
7193                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
7194                 // debug statements here
7195         }
7196         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7197         export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
7198                 if(!isWasmInitialized) {
7199                         throw new Error("initializeWasm() must be awaited first!");
7200                 }
7201                 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
7202                 return nativeResponseValue;
7203         }
7204         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
7205         export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
7206                 if(!isWasmInitialized) {
7207                         throw new Error("initializeWasm() must be awaited first!");
7208                 }
7209                 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
7210                 // debug statements here
7211         }
7212         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7213         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
7214                 if(!isWasmInitialized) {
7215                         throw new Error("initializeWasm() must be awaited first!");
7216                 }
7217                 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
7218                 return nativeResponseValue;
7219         }
7220         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
7221         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
7222                 if(!isWasmInitialized) {
7223                         throw new Error("initializeWasm() must be awaited first!");
7224                 }
7225                 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
7226                 // debug statements here
7227         }
7228         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7229         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
7230                 if(!isWasmInitialized) {
7231                         throw new Error("initializeWasm() must be awaited first!");
7232                 }
7233                 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
7234                 return nativeResponseValue;
7235         }
7236         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
7237         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
7238                 if(!isWasmInitialized) {
7239                         throw new Error("initializeWasm() must be awaited first!");
7240                 }
7241                 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
7242                 // debug statements here
7243         }
7244         // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7245         export function ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr: number): number {
7246                 if(!isWasmInitialized) {
7247                         throw new Error("initializeWasm() must be awaited first!");
7248                 }
7249                 const nativeResponseValue = wasm.ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr);
7250                 return nativeResponseValue;
7251         }
7252         // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
7253         export function ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr: number, val: number): void {
7254                 if(!isWasmInitialized) {
7255                         throw new Error("initializeWasm() must be awaited first!");
7256                 }
7257                 const nativeResponseValue = wasm.ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr, val);
7258                 // debug statements here
7259         }
7260         // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7261         export function ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr: number): number {
7262                 if(!isWasmInitialized) {
7263                         throw new Error("initializeWasm() must be awaited first!");
7264                 }
7265                 const nativeResponseValue = wasm.ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr);
7266                 return nativeResponseValue;
7267         }
7268         // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
7269         export function ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr: number, val: number): void {
7270                 if(!isWasmInitialized) {
7271                         throw new Error("initializeWasm() must be awaited first!");
7272                 }
7273                 const nativeResponseValue = wasm.ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr, val);
7274                 // debug statements here
7275         }
7276         // 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);
7277         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 {
7278                 if(!isWasmInitialized) {
7279                         throw new Error("initializeWasm() must be awaited first!");
7280                 }
7281                 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);
7282                 return nativeResponseValue;
7283         }
7284         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
7285         export function ChannelConfig_clone(orig: number): number {
7286                 if(!isWasmInitialized) {
7287                         throw new Error("initializeWasm() must be awaited first!");
7288                 }
7289                 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
7290                 return nativeResponseValue;
7291         }
7292         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
7293         export function ChannelConfig_default(): number {
7294                 if(!isWasmInitialized) {
7295                         throw new Error("initializeWasm() must be awaited first!");
7296                 }
7297                 const nativeResponseValue = wasm.ChannelConfig_default();
7298                 return nativeResponseValue;
7299         }
7300         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
7301         export function ChannelConfig_write(obj: number): Uint8Array {
7302                 if(!isWasmInitialized) {
7303                         throw new Error("initializeWasm() must be awaited first!");
7304                 }
7305                 const nativeResponseValue = wasm.ChannelConfig_write(obj);
7306                 return decodeArray(nativeResponseValue);
7307         }
7308         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
7309         export function ChannelConfig_read(ser: Uint8Array): number {
7310                 if(!isWasmInitialized) {
7311                         throw new Error("initializeWasm() must be awaited first!");
7312                 }
7313                 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
7314                 return nativeResponseValue;
7315         }
7316         // void UserConfig_free(struct LDKUserConfig this_obj);
7317         export function UserConfig_free(this_obj: number): void {
7318                 if(!isWasmInitialized) {
7319                         throw new Error("initializeWasm() must be awaited first!");
7320                 }
7321                 const nativeResponseValue = wasm.UserConfig_free(this_obj);
7322                 // debug statements here
7323         }
7324         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7325         export function UserConfig_get_own_channel_config(this_ptr: number): number {
7326                 if(!isWasmInitialized) {
7327                         throw new Error("initializeWasm() must be awaited first!");
7328                 }
7329                 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
7330                 return nativeResponseValue;
7331         }
7332         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
7333         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
7334                 if(!isWasmInitialized) {
7335                         throw new Error("initializeWasm() must be awaited first!");
7336                 }
7337                 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
7338                 // debug statements here
7339         }
7340         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7341         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
7342                 if(!isWasmInitialized) {
7343                         throw new Error("initializeWasm() must be awaited first!");
7344                 }
7345                 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
7346                 return nativeResponseValue;
7347         }
7348         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
7349         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
7350                 if(!isWasmInitialized) {
7351                         throw new Error("initializeWasm() must be awaited first!");
7352                 }
7353                 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
7354                 // debug statements here
7355         }
7356         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7357         export function UserConfig_get_channel_options(this_ptr: number): number {
7358                 if(!isWasmInitialized) {
7359                         throw new Error("initializeWasm() must be awaited first!");
7360                 }
7361                 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
7362                 return nativeResponseValue;
7363         }
7364         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
7365         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
7366                 if(!isWasmInitialized) {
7367                         throw new Error("initializeWasm() must be awaited first!");
7368                 }
7369                 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
7370                 // debug statements here
7371         }
7372         // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7373         export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
7374                 if(!isWasmInitialized) {
7375                         throw new Error("initializeWasm() must be awaited first!");
7376                 }
7377                 const nativeResponseValue = wasm.UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
7378                 return nativeResponseValue;
7379         }
7380         // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
7381         export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
7382                 if(!isWasmInitialized) {
7383                         throw new Error("initializeWasm() must be awaited first!");
7384                 }
7385                 const nativeResponseValue = wasm.UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
7386                 // debug statements here
7387         }
7388         // 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);
7389         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 {
7390                 if(!isWasmInitialized) {
7391                         throw new Error("initializeWasm() must be awaited first!");
7392                 }
7393                 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg, accept_forwards_to_priv_channels_arg);
7394                 return nativeResponseValue;
7395         }
7396         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
7397         export function UserConfig_clone(orig: number): number {
7398                 if(!isWasmInitialized) {
7399                         throw new Error("initializeWasm() must be awaited first!");
7400                 }
7401                 const nativeResponseValue = wasm.UserConfig_clone(orig);
7402                 return nativeResponseValue;
7403         }
7404         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
7405         export function UserConfig_default(): number {
7406                 if(!isWasmInitialized) {
7407                         throw new Error("initializeWasm() must be awaited first!");
7408                 }
7409                 const nativeResponseValue = wasm.UserConfig_default();
7410                 return nativeResponseValue;
7411         }
7412         // void BestBlock_free(struct LDKBestBlock this_obj);
7413         export function BestBlock_free(this_obj: number): void {
7414                 if(!isWasmInitialized) {
7415                         throw new Error("initializeWasm() must be awaited first!");
7416                 }
7417                 const nativeResponseValue = wasm.BestBlock_free(this_obj);
7418                 // debug statements here
7419         }
7420         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
7421         export function BestBlock_clone(orig: number): number {
7422                 if(!isWasmInitialized) {
7423                         throw new Error("initializeWasm() must be awaited first!");
7424                 }
7425                 const nativeResponseValue = wasm.BestBlock_clone(orig);
7426                 return nativeResponseValue;
7427         }
7428         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
7429         export function BestBlock_from_genesis(network: Network): number {
7430                 if(!isWasmInitialized) {
7431                         throw new Error("initializeWasm() must be awaited first!");
7432                 }
7433                 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
7434                 return nativeResponseValue;
7435         }
7436         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
7437         export function BestBlock_new(block_hash: Uint8Array, height: number): number {
7438                 if(!isWasmInitialized) {
7439                         throw new Error("initializeWasm() must be awaited first!");
7440                 }
7441                 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
7442                 return nativeResponseValue;
7443         }
7444         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
7445         export function BestBlock_block_hash(this_arg: number): Uint8Array {
7446                 if(!isWasmInitialized) {
7447                         throw new Error("initializeWasm() must be awaited first!");
7448                 }
7449                 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
7450                 return decodeArray(nativeResponseValue);
7451         }
7452         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
7453         export function BestBlock_height(this_arg: number): number {
7454                 if(!isWasmInitialized) {
7455                         throw new Error("initializeWasm() must be awaited first!");
7456                 }
7457                 const nativeResponseValue = wasm.BestBlock_height(this_arg);
7458                 return nativeResponseValue;
7459         }
7460         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
7461         export function AccessError_clone(orig: number): AccessError {
7462                 if(!isWasmInitialized) {
7463                         throw new Error("initializeWasm() must be awaited first!");
7464                 }
7465                 const nativeResponseValue = wasm.AccessError_clone(orig);
7466                 return nativeResponseValue;
7467         }
7468         // enum LDKAccessError AccessError_unknown_chain(void);
7469         export function AccessError_unknown_chain(): AccessError {
7470                 if(!isWasmInitialized) {
7471                         throw new Error("initializeWasm() must be awaited first!");
7472                 }
7473                 const nativeResponseValue = wasm.AccessError_unknown_chain();
7474                 return nativeResponseValue;
7475         }
7476         // enum LDKAccessError AccessError_unknown_tx(void);
7477         export function AccessError_unknown_tx(): AccessError {
7478                 if(!isWasmInitialized) {
7479                         throw new Error("initializeWasm() must be awaited first!");
7480                 }
7481                 const nativeResponseValue = wasm.AccessError_unknown_tx();
7482                 return nativeResponseValue;
7483         }
7484         // void Access_free(struct LDKAccess this_ptr);
7485         export function Access_free(this_ptr: number): void {
7486                 if(!isWasmInitialized) {
7487                         throw new Error("initializeWasm() must be awaited first!");
7488                 }
7489                 const nativeResponseValue = wasm.Access_free(this_ptr);
7490                 // debug statements here
7491         }
7492         // void Listen_free(struct LDKListen this_ptr);
7493         export function Listen_free(this_ptr: number): void {
7494                 if(!isWasmInitialized) {
7495                         throw new Error("initializeWasm() must be awaited first!");
7496                 }
7497                 const nativeResponseValue = wasm.Listen_free(this_ptr);
7498                 // debug statements here
7499         }
7500         // void Confirm_free(struct LDKConfirm this_ptr);
7501         export function Confirm_free(this_ptr: number): void {
7502                 if(!isWasmInitialized) {
7503                         throw new Error("initializeWasm() must be awaited first!");
7504                 }
7505                 const nativeResponseValue = wasm.Confirm_free(this_ptr);
7506                 // debug statements here
7507         }
7508         // void Watch_free(struct LDKWatch this_ptr);
7509         export function Watch_free(this_ptr: number): void {
7510                 if(!isWasmInitialized) {
7511                         throw new Error("initializeWasm() must be awaited first!");
7512                 }
7513                 const nativeResponseValue = wasm.Watch_free(this_ptr);
7514                 // debug statements here
7515         }
7516         // void Filter_free(struct LDKFilter this_ptr);
7517         export function Filter_free(this_ptr: number): void {
7518                 if(!isWasmInitialized) {
7519                         throw new Error("initializeWasm() must be awaited first!");
7520                 }
7521                 const nativeResponseValue = wasm.Filter_free(this_ptr);
7522                 // debug statements here
7523         }
7524         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
7525         export function WatchedOutput_free(this_obj: number): void {
7526                 if(!isWasmInitialized) {
7527                         throw new Error("initializeWasm() must be awaited first!");
7528                 }
7529                 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
7530                 // debug statements here
7531         }
7532         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
7533         export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
7534                 if(!isWasmInitialized) {
7535                         throw new Error("initializeWasm() must be awaited first!");
7536                 }
7537                 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
7538                 return decodeArray(nativeResponseValue);
7539         }
7540         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7541         export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
7542                 if(!isWasmInitialized) {
7543                         throw new Error("initializeWasm() must be awaited first!");
7544                 }
7545                 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
7546                 // debug statements here
7547         }
7548         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
7549         export function WatchedOutput_get_outpoint(this_ptr: number): number {
7550                 if(!isWasmInitialized) {
7551                         throw new Error("initializeWasm() must be awaited first!");
7552                 }
7553                 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
7554                 return nativeResponseValue;
7555         }
7556         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
7557         export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
7558                 if(!isWasmInitialized) {
7559                         throw new Error("initializeWasm() must be awaited first!");
7560                 }
7561                 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
7562                 // debug statements here
7563         }
7564         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
7565         export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
7566                 if(!isWasmInitialized) {
7567                         throw new Error("initializeWasm() must be awaited first!");
7568                 }
7569                 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
7570                 return decodeArray(nativeResponseValue);
7571         }
7572         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7573         export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
7574                 if(!isWasmInitialized) {
7575                         throw new Error("initializeWasm() must be awaited first!");
7576                 }
7577                 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
7578                 // debug statements here
7579         }
7580         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
7581         export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
7582                 if(!isWasmInitialized) {
7583                         throw new Error("initializeWasm() must be awaited first!");
7584                 }
7585                 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
7586                 return nativeResponseValue;
7587         }
7588         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
7589         export function WatchedOutput_clone(orig: number): number {
7590                 if(!isWasmInitialized) {
7591                         throw new Error("initializeWasm() must be awaited first!");
7592                 }
7593                 const nativeResponseValue = wasm.WatchedOutput_clone(orig);
7594                 return nativeResponseValue;
7595         }
7596         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
7597         export function WatchedOutput_hash(o: number): number {
7598                 if(!isWasmInitialized) {
7599                         throw new Error("initializeWasm() must be awaited first!");
7600                 }
7601                 const nativeResponseValue = wasm.WatchedOutput_hash(o);
7602                 return nativeResponseValue;
7603         }
7604         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
7605         export function BroadcasterInterface_free(this_ptr: number): void {
7606                 if(!isWasmInitialized) {
7607                         throw new Error("initializeWasm() must be awaited first!");
7608                 }
7609                 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
7610                 // debug statements here
7611         }
7612         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
7613         export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
7614                 if(!isWasmInitialized) {
7615                         throw new Error("initializeWasm() must be awaited first!");
7616                 }
7617                 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
7618                 return nativeResponseValue;
7619         }
7620         // enum LDKConfirmationTarget ConfirmationTarget_background(void);
7621         export function ConfirmationTarget_background(): ConfirmationTarget {
7622                 if(!isWasmInitialized) {
7623                         throw new Error("initializeWasm() must be awaited first!");
7624                 }
7625                 const nativeResponseValue = wasm.ConfirmationTarget_background();
7626                 return nativeResponseValue;
7627         }
7628         // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
7629         export function ConfirmationTarget_normal(): ConfirmationTarget {
7630                 if(!isWasmInitialized) {
7631                         throw new Error("initializeWasm() must be awaited first!");
7632                 }
7633                 const nativeResponseValue = wasm.ConfirmationTarget_normal();
7634                 return nativeResponseValue;
7635         }
7636         // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
7637         export function ConfirmationTarget_high_priority(): ConfirmationTarget {
7638                 if(!isWasmInitialized) {
7639                         throw new Error("initializeWasm() must be awaited first!");
7640                 }
7641                 const nativeResponseValue = wasm.ConfirmationTarget_high_priority();
7642                 return nativeResponseValue;
7643         }
7644         // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
7645         export function ConfirmationTarget_eq(a: number, b: number): boolean {
7646                 if(!isWasmInitialized) {
7647                         throw new Error("initializeWasm() must be awaited first!");
7648                 }
7649                 const nativeResponseValue = wasm.ConfirmationTarget_eq(a, b);
7650                 return nativeResponseValue;
7651         }
7652         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
7653         export function FeeEstimator_free(this_ptr: number): void {
7654                 if(!isWasmInitialized) {
7655                         throw new Error("initializeWasm() must be awaited first!");
7656                 }
7657                 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
7658                 // debug statements here
7659         }
7660         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
7661         export function ChainMonitor_free(this_obj: number): void {
7662                 if(!isWasmInitialized) {
7663                         throw new Error("initializeWasm() must be awaited first!");
7664                 }
7665                 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
7666                 // debug statements here
7667         }
7668         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
7669         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
7670                 if(!isWasmInitialized) {
7671                         throw new Error("initializeWasm() must be awaited first!");
7672                 }
7673                 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
7674                 return nativeResponseValue;
7675         }
7676         // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
7677         export function ChainMonitor_get_claimable_balances(this_arg: number, ignored_channels: number[]): number[] {
7678                 if(!isWasmInitialized) {
7679                         throw new Error("initializeWasm() must be awaited first!");
7680                 }
7681                 const nativeResponseValue = wasm.ChainMonitor_get_claimable_balances(this_arg, ignored_channels);
7682                 return nativeResponseValue;
7683         }
7684         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
7685         export function ChainMonitor_as_Listen(this_arg: number): number {
7686                 if(!isWasmInitialized) {
7687                         throw new Error("initializeWasm() must be awaited first!");
7688                 }
7689                 const nativeResponseValue = wasm.ChainMonitor_as_Listen(this_arg);
7690                 return nativeResponseValue;
7691         }
7692         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
7693         export function ChainMonitor_as_Confirm(this_arg: number): number {
7694                 if(!isWasmInitialized) {
7695                         throw new Error("initializeWasm() must be awaited first!");
7696                 }
7697                 const nativeResponseValue = wasm.ChainMonitor_as_Confirm(this_arg);
7698                 return nativeResponseValue;
7699         }
7700         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
7701         export function ChainMonitor_as_Watch(this_arg: number): number {
7702                 if(!isWasmInitialized) {
7703                         throw new Error("initializeWasm() must be awaited first!");
7704                 }
7705                 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
7706                 return nativeResponseValue;
7707         }
7708         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
7709         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
7710                 if(!isWasmInitialized) {
7711                         throw new Error("initializeWasm() must be awaited first!");
7712                 }
7713                 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
7714                 return nativeResponseValue;
7715         }
7716         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
7717         export function ChannelMonitorUpdate_free(this_obj: number): void {
7718                 if(!isWasmInitialized) {
7719                         throw new Error("initializeWasm() must be awaited first!");
7720                 }
7721                 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
7722                 // debug statements here
7723         }
7724         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
7725         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
7726                 if(!isWasmInitialized) {
7727                         throw new Error("initializeWasm() must be awaited first!");
7728                 }
7729                 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
7730                 return nativeResponseValue;
7731         }
7732         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
7733         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
7734                 if(!isWasmInitialized) {
7735                         throw new Error("initializeWasm() must be awaited first!");
7736                 }
7737                 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
7738                 // debug statements here
7739         }
7740         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
7741         export function ChannelMonitorUpdate_clone(orig: number): number {
7742                 if(!isWasmInitialized) {
7743                         throw new Error("initializeWasm() must be awaited first!");
7744                 }
7745                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
7746                 return nativeResponseValue;
7747         }
7748         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
7749         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
7750                 if(!isWasmInitialized) {
7751                         throw new Error("initializeWasm() must be awaited first!");
7752                 }
7753                 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
7754                 return decodeArray(nativeResponseValue);
7755         }
7756         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
7757         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
7758                 if(!isWasmInitialized) {
7759                         throw new Error("initializeWasm() must be awaited first!");
7760                 }
7761                 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
7762                 return nativeResponseValue;
7763         }
7764         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
7765         export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
7766                 if(!isWasmInitialized) {
7767                         throw new Error("initializeWasm() must be awaited first!");
7768                 }
7769                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
7770                 return nativeResponseValue;
7771         }
7772         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
7773         export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
7774                 if(!isWasmInitialized) {
7775                         throw new Error("initializeWasm() must be awaited first!");
7776                 }
7777                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_temporary_failure();
7778                 return nativeResponseValue;
7779         }
7780         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
7781         export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
7782                 if(!isWasmInitialized) {
7783                         throw new Error("initializeWasm() must be awaited first!");
7784                 }
7785                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_permanent_failure();
7786                 return nativeResponseValue;
7787         }
7788         // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
7789         export function MonitorUpdateError_free(this_obj: number): void {
7790                 if(!isWasmInitialized) {
7791                         throw new Error("initializeWasm() must be awaited first!");
7792                 }
7793                 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
7794                 // debug statements here
7795         }
7796         // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
7797         export function MonitorUpdateError_clone(orig: number): number {
7798                 if(!isWasmInitialized) {
7799                         throw new Error("initializeWasm() must be awaited first!");
7800                 }
7801                 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
7802                 return nativeResponseValue;
7803         }
7804         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
7805         export function MonitorEvent_free(this_ptr: number): void {
7806                 if(!isWasmInitialized) {
7807                         throw new Error("initializeWasm() must be awaited first!");
7808                 }
7809                 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
7810                 // debug statements here
7811         }
7812         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
7813         export function MonitorEvent_clone(orig: number): number {
7814                 if(!isWasmInitialized) {
7815                         throw new Error("initializeWasm() must be awaited first!");
7816                 }
7817                 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
7818                 return nativeResponseValue;
7819         }
7820         // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
7821         export function MonitorEvent_htlcevent(a: number): number {
7822                 if(!isWasmInitialized) {
7823                         throw new Error("initializeWasm() must be awaited first!");
7824                 }
7825                 const nativeResponseValue = wasm.MonitorEvent_htlcevent(a);
7826                 return nativeResponseValue;
7827         }
7828         // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
7829         export function MonitorEvent_commitment_tx_confirmed(a: number): number {
7830                 if(!isWasmInitialized) {
7831                         throw new Error("initializeWasm() must be awaited first!");
7832                 }
7833                 const nativeResponseValue = wasm.MonitorEvent_commitment_tx_confirmed(a);
7834                 return nativeResponseValue;
7835         }
7836         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
7837         export function HTLCUpdate_free(this_obj: number): void {
7838                 if(!isWasmInitialized) {
7839                         throw new Error("initializeWasm() must be awaited first!");
7840                 }
7841                 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
7842                 // debug statements here
7843         }
7844         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
7845         export function HTLCUpdate_clone(orig: number): number {
7846                 if(!isWasmInitialized) {
7847                         throw new Error("initializeWasm() must be awaited first!");
7848                 }
7849                 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
7850                 return nativeResponseValue;
7851         }
7852         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
7853         export function HTLCUpdate_write(obj: number): Uint8Array {
7854                 if(!isWasmInitialized) {
7855                         throw new Error("initializeWasm() must be awaited first!");
7856                 }
7857                 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
7858                 return decodeArray(nativeResponseValue);
7859         }
7860         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
7861         export function HTLCUpdate_read(ser: Uint8Array): number {
7862                 if(!isWasmInitialized) {
7863                         throw new Error("initializeWasm() must be awaited first!");
7864                 }
7865                 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
7866                 return nativeResponseValue;
7867         }
7868         // void Balance_free(struct LDKBalance this_ptr);
7869         export function Balance_free(this_ptr: number): void {
7870                 if(!isWasmInitialized) {
7871                         throw new Error("initializeWasm() must be awaited first!");
7872                 }
7873                 const nativeResponseValue = wasm.Balance_free(this_ptr);
7874                 // debug statements here
7875         }
7876         // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
7877         export function Balance_clone(orig: number): number {
7878                 if(!isWasmInitialized) {
7879                         throw new Error("initializeWasm() must be awaited first!");
7880                 }
7881                 const nativeResponseValue = wasm.Balance_clone(orig);
7882                 return nativeResponseValue;
7883         }
7884         // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
7885         export function Balance_claimable_on_channel_close(claimable_amount_satoshis: number): number {
7886                 if(!isWasmInitialized) {
7887                         throw new Error("initializeWasm() must be awaited first!");
7888                 }
7889                 const nativeResponseValue = wasm.Balance_claimable_on_channel_close(claimable_amount_satoshis);
7890                 return nativeResponseValue;
7891         }
7892         // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
7893         export function Balance_claimable_awaiting_confirmations(claimable_amount_satoshis: number, confirmation_height: number): number {
7894                 if(!isWasmInitialized) {
7895                         throw new Error("initializeWasm() must be awaited first!");
7896                 }
7897                 const nativeResponseValue = wasm.Balance_claimable_awaiting_confirmations(claimable_amount_satoshis, confirmation_height);
7898                 return nativeResponseValue;
7899         }
7900         // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
7901         export function Balance_contentious_claimable(claimable_amount_satoshis: number, timeout_height: number): number {
7902                 if(!isWasmInitialized) {
7903                         throw new Error("initializeWasm() must be awaited first!");
7904                 }
7905                 const nativeResponseValue = wasm.Balance_contentious_claimable(claimable_amount_satoshis, timeout_height);
7906                 return nativeResponseValue;
7907         }
7908         // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
7909         export function Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis: number, claimable_height: number): number {
7910                 if(!isWasmInitialized) {
7911                         throw new Error("initializeWasm() must be awaited first!");
7912                 }
7913                 const nativeResponseValue = wasm.Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis, claimable_height);
7914                 return nativeResponseValue;
7915         }
7916         // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
7917         export function Balance_eq(a: number, b: number): boolean {
7918                 if(!isWasmInitialized) {
7919                         throw new Error("initializeWasm() must be awaited first!");
7920                 }
7921                 const nativeResponseValue = wasm.Balance_eq(a, b);
7922                 return nativeResponseValue;
7923         }
7924         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
7925         export function ChannelMonitor_free(this_obj: number): void {
7926                 if(!isWasmInitialized) {
7927                         throw new Error("initializeWasm() must be awaited first!");
7928                 }
7929                 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
7930                 // debug statements here
7931         }
7932         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
7933         export function ChannelMonitor_clone(orig: number): number {
7934                 if(!isWasmInitialized) {
7935                         throw new Error("initializeWasm() must be awaited first!");
7936                 }
7937                 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
7938                 return nativeResponseValue;
7939         }
7940         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
7941         export function ChannelMonitor_write(obj: number): Uint8Array {
7942                 if(!isWasmInitialized) {
7943                         throw new Error("initializeWasm() must be awaited first!");
7944                 }
7945                 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
7946                 return decodeArray(nativeResponseValue);
7947         }
7948         // 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);
7949         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
7950                 if(!isWasmInitialized) {
7951                         throw new Error("initializeWasm() must be awaited first!");
7952                 }
7953                 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
7954                 return nativeResponseValue;
7955         }
7956         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7957         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
7958                 if(!isWasmInitialized) {
7959                         throw new Error("initializeWasm() must be awaited first!");
7960                 }
7961                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
7962                 return nativeResponseValue;
7963         }
7964         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7965         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
7966                 if(!isWasmInitialized) {
7967                         throw new Error("initializeWasm() must be awaited first!");
7968                 }
7969                 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
7970                 return nativeResponseValue;
7971         }
7972         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7973         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
7974                 if(!isWasmInitialized) {
7975                         throw new Error("initializeWasm() must be awaited first!");
7976                 }
7977                 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
7978                 return nativeResponseValue;
7979         }
7980         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
7981         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
7982                 if(!isWasmInitialized) {
7983                         throw new Error("initializeWasm() must be awaited first!");
7984                 }
7985                 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
7986                 // debug statements here
7987         }
7988         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7989         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
7990                 if(!isWasmInitialized) {
7991                         throw new Error("initializeWasm() must be awaited first!");
7992                 }
7993                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
7994                 return nativeResponseValue;
7995         }
7996         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7997         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
7998                 if(!isWasmInitialized) {
7999                         throw new Error("initializeWasm() must be awaited first!");
8000                 }
8001                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
8002                 return nativeResponseValue;
8003         }
8004         // 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);
8005         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
8006                 if(!isWasmInitialized) {
8007                         throw new Error("initializeWasm() must be awaited first!");
8008                 }
8009                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
8010                 return nativeResponseValue;
8011         }
8012         // 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);
8013         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8014                 if(!isWasmInitialized) {
8015                         throw new Error("initializeWasm() must be awaited first!");
8016                 }
8017                 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
8018                 return nativeResponseValue;
8019         }
8020         // 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);
8021         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
8022                 if(!isWasmInitialized) {
8023                         throw new Error("initializeWasm() must be awaited first!");
8024                 }
8025                 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
8026                 // debug statements here
8027         }
8028         // 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);
8029         export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8030                 if(!isWasmInitialized) {
8031                         throw new Error("initializeWasm() must be awaited first!");
8032                 }
8033                 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
8034                 return nativeResponseValue;
8035         }
8036         // 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);
8037         export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
8038                 if(!isWasmInitialized) {
8039                         throw new Error("initializeWasm() must be awaited first!");
8040                 }
8041                 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
8042                 // debug statements here
8043         }
8044         // 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);
8045         export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8046                 if(!isWasmInitialized) {
8047                         throw new Error("initializeWasm() must be awaited first!");
8048                 }
8049                 const nativeResponseValue = wasm.ChannelMonitor_best_block_updated(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
8050                 return nativeResponseValue;
8051         }
8052         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8053         export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
8054                 if(!isWasmInitialized) {
8055                         throw new Error("initializeWasm() must be awaited first!");
8056                 }
8057                 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
8058                 return nativeResponseValue;
8059         }
8060         // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8061         export function ChannelMonitor_current_best_block(this_arg: number): number {
8062                 if(!isWasmInitialized) {
8063                         throw new Error("initializeWasm() must be awaited first!");
8064                 }
8065                 const nativeResponseValue = wasm.ChannelMonitor_current_best_block(this_arg);
8066                 return nativeResponseValue;
8067         }
8068         // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8069         export function ChannelMonitor_get_claimable_balances(this_arg: number): number[] {
8070                 if(!isWasmInitialized) {
8071                         throw new Error("initializeWasm() must be awaited first!");
8072                 }
8073                 const nativeResponseValue = wasm.ChannelMonitor_get_claimable_balances(this_arg);
8074                 return nativeResponseValue;
8075         }
8076         // void Persist_free(struct LDKPersist this_ptr);
8077         export function Persist_free(this_ptr: number): void {
8078                 if(!isWasmInitialized) {
8079                         throw new Error("initializeWasm() must be awaited first!");
8080                 }
8081                 const nativeResponseValue = wasm.Persist_free(this_ptr);
8082                 // debug statements here
8083         }
8084         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
8085         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
8086                 if(!isWasmInitialized) {
8087                         throw new Error("initializeWasm() must be awaited first!");
8088                 }
8089                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
8090                 return nativeResponseValue;
8091         }
8092         // void OutPoint_free(struct LDKOutPoint this_obj);
8093         export function OutPoint_free(this_obj: number): void {
8094                 if(!isWasmInitialized) {
8095                         throw new Error("initializeWasm() must be awaited first!");
8096                 }
8097                 const nativeResponseValue = wasm.OutPoint_free(this_obj);
8098                 // debug statements here
8099         }
8100         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
8101         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
8102                 if(!isWasmInitialized) {
8103                         throw new Error("initializeWasm() must be awaited first!");
8104                 }
8105                 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
8106                 return decodeArray(nativeResponseValue);
8107         }
8108         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8109         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
8110                 if(!isWasmInitialized) {
8111                         throw new Error("initializeWasm() must be awaited first!");
8112                 }
8113                 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
8114                 // debug statements here
8115         }
8116         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
8117         export function OutPoint_get_index(this_ptr: number): number {
8118                 if(!isWasmInitialized) {
8119                         throw new Error("initializeWasm() must be awaited first!");
8120                 }
8121                 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
8122                 return nativeResponseValue;
8123         }
8124         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
8125         export function OutPoint_set_index(this_ptr: number, val: number): void {
8126                 if(!isWasmInitialized) {
8127                         throw new Error("initializeWasm() must be awaited first!");
8128                 }
8129                 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
8130                 // debug statements here
8131         }
8132         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
8133         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
8134                 if(!isWasmInitialized) {
8135                         throw new Error("initializeWasm() must be awaited first!");
8136                 }
8137                 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
8138                 return nativeResponseValue;
8139         }
8140         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
8141         export function OutPoint_clone(orig: number): number {
8142                 if(!isWasmInitialized) {
8143                         throw new Error("initializeWasm() must be awaited first!");
8144                 }
8145                 const nativeResponseValue = wasm.OutPoint_clone(orig);
8146                 return nativeResponseValue;
8147         }
8148         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
8149         export function OutPoint_eq(a: number, b: number): boolean {
8150                 if(!isWasmInitialized) {
8151                         throw new Error("initializeWasm() must be awaited first!");
8152                 }
8153                 const nativeResponseValue = wasm.OutPoint_eq(a, b);
8154                 return nativeResponseValue;
8155         }
8156         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
8157         export function OutPoint_hash(o: number): number {
8158                 if(!isWasmInitialized) {
8159                         throw new Error("initializeWasm() must be awaited first!");
8160                 }
8161                 const nativeResponseValue = wasm.OutPoint_hash(o);
8162                 return nativeResponseValue;
8163         }
8164         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
8165         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
8166                 if(!isWasmInitialized) {
8167                         throw new Error("initializeWasm() must be awaited first!");
8168                 }
8169                 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
8170                 return decodeArray(nativeResponseValue);
8171         }
8172         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
8173         export function OutPoint_write(obj: number): Uint8Array {
8174                 if(!isWasmInitialized) {
8175                         throw new Error("initializeWasm() must be awaited first!");
8176                 }
8177                 const nativeResponseValue = wasm.OutPoint_write(obj);
8178                 return decodeArray(nativeResponseValue);
8179         }
8180         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
8181         export function OutPoint_read(ser: Uint8Array): number {
8182                 if(!isWasmInitialized) {
8183                         throw new Error("initializeWasm() must be awaited first!");
8184                 }
8185                 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
8186                 return nativeResponseValue;
8187         }
8188         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
8189         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
8190                 if(!isWasmInitialized) {
8191                         throw new Error("initializeWasm() must be awaited first!");
8192                 }
8193                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
8194                 // debug statements here
8195         }
8196         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8197         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
8198                 if(!isWasmInitialized) {
8199                         throw new Error("initializeWasm() must be awaited first!");
8200                 }
8201                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
8202                 return nativeResponseValue;
8203         }
8204         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8205         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
8206                 if(!isWasmInitialized) {
8207                         throw new Error("initializeWasm() must be awaited first!");
8208                 }
8209                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
8210                 // debug statements here
8211         }
8212         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8213         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
8214                 if(!isWasmInitialized) {
8215                         throw new Error("initializeWasm() must be awaited first!");
8216                 }
8217                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
8218                 return decodeArray(nativeResponseValue);
8219         }
8220         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8221         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8222                 if(!isWasmInitialized) {
8223                         throw new Error("initializeWasm() must be awaited first!");
8224                 }
8225                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
8226                 // debug statements here
8227         }
8228         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8229         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
8230                 if(!isWasmInitialized) {
8231                         throw new Error("initializeWasm() must be awaited first!");
8232                 }
8233                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
8234                 return nativeResponseValue;
8235         }
8236         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
8237         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
8238                 if(!isWasmInitialized) {
8239                         throw new Error("initializeWasm() must be awaited first!");
8240                 }
8241                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
8242                 // debug statements here
8243         }
8244         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
8245         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
8246                 if(!isWasmInitialized) {
8247                         throw new Error("initializeWasm() must be awaited first!");
8248                 }
8249                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
8250                 // debug statements here
8251         }
8252         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8253         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
8254                 if(!isWasmInitialized) {
8255                         throw new Error("initializeWasm() must be awaited first!");
8256                 }
8257                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
8258                 return decodeArray(nativeResponseValue);
8259         }
8260         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8261         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
8262                 if(!isWasmInitialized) {
8263                         throw new Error("initializeWasm() must be awaited first!");
8264                 }
8265                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
8266                 // debug statements here
8267         }
8268         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
8269         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
8270                 if(!isWasmInitialized) {
8271                         throw new Error("initializeWasm() must be awaited first!");
8272                 }
8273                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
8274                 return decodeArray(nativeResponseValue);
8275         }
8276         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8277         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
8278                 if(!isWasmInitialized) {
8279                         throw new Error("initializeWasm() must be awaited first!");
8280                 }
8281                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
8282                 // debug statements here
8283         }
8284         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8285         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
8286                 if(!isWasmInitialized) {
8287                         throw new Error("initializeWasm() must be awaited first!");
8288                 }
8289                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
8290                 return nativeResponseValue;
8291         }
8292         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
8293         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
8294                 if(!isWasmInitialized) {
8295                         throw new Error("initializeWasm() must be awaited first!");
8296                 }
8297                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
8298                 // debug statements here
8299         }
8300         // 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);
8301         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 {
8302                 if(!isWasmInitialized) {
8303                         throw new Error("initializeWasm() must be awaited first!");
8304                 }
8305                 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);
8306                 return nativeResponseValue;
8307         }
8308         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
8309         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
8310                 if(!isWasmInitialized) {
8311                         throw new Error("initializeWasm() must be awaited first!");
8312                 }
8313                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
8314                 return nativeResponseValue;
8315         }
8316         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
8317         export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
8318                 if(!isWasmInitialized) {
8319                         throw new Error("initializeWasm() must be awaited first!");
8320                 }
8321                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_write(obj);
8322                 return decodeArray(nativeResponseValue);
8323         }
8324         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
8325         export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
8326                 if(!isWasmInitialized) {
8327                         throw new Error("initializeWasm() must be awaited first!");
8328                 }
8329                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_read(encodeArray(ser));
8330                 return nativeResponseValue;
8331         }
8332         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
8333         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
8334                 if(!isWasmInitialized) {
8335                         throw new Error("initializeWasm() must be awaited first!");
8336                 }
8337                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
8338                 // debug statements here
8339         }
8340         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8341         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
8342                 if(!isWasmInitialized) {
8343                         throw new Error("initializeWasm() must be awaited first!");
8344                 }
8345                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
8346                 return nativeResponseValue;
8347         }
8348         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8349         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
8350                 if(!isWasmInitialized) {
8351                         throw new Error("initializeWasm() must be awaited first!");
8352                 }
8353                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
8354                 // debug statements here
8355         }
8356         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
8357         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
8358                 if(!isWasmInitialized) {
8359                         throw new Error("initializeWasm() must be awaited first!");
8360                 }
8361                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
8362                 // debug statements here
8363         }
8364         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
8365         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
8366                 if(!isWasmInitialized) {
8367                         throw new Error("initializeWasm() must be awaited first!");
8368                 }
8369                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
8370                 return decodeArray(nativeResponseValue);
8371         }
8372         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8373         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
8374                 if(!isWasmInitialized) {
8375                         throw new Error("initializeWasm() must be awaited first!");
8376                 }
8377                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
8378                 // debug statements here
8379         }
8380         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8381         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
8382                 if(!isWasmInitialized) {
8383                         throw new Error("initializeWasm() must be awaited first!");
8384                 }
8385                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
8386                 return nativeResponseValue;
8387         }
8388         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
8389         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
8390                 if(!isWasmInitialized) {
8391                         throw new Error("initializeWasm() must be awaited first!");
8392                 }
8393                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
8394                 // debug statements here
8395         }
8396         // 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);
8397         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
8398                 if(!isWasmInitialized) {
8399                         throw new Error("initializeWasm() must be awaited first!");
8400                 }
8401                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
8402                 return nativeResponseValue;
8403         }
8404         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
8405         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
8406                 if(!isWasmInitialized) {
8407                         throw new Error("initializeWasm() must be awaited first!");
8408                 }
8409                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
8410                 return nativeResponseValue;
8411         }
8412         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
8413         export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
8414                 if(!isWasmInitialized) {
8415                         throw new Error("initializeWasm() must be awaited first!");
8416                 }
8417                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_write(obj);
8418                 return decodeArray(nativeResponseValue);
8419         }
8420         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
8421         export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
8422                 if(!isWasmInitialized) {
8423                         throw new Error("initializeWasm() must be awaited first!");
8424                 }
8425                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_read(encodeArray(ser));
8426                 return nativeResponseValue;
8427         }
8428         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
8429         export function SpendableOutputDescriptor_free(this_ptr: number): void {
8430                 if(!isWasmInitialized) {
8431                         throw new Error("initializeWasm() must be awaited first!");
8432                 }
8433                 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
8434                 // debug statements here
8435         }
8436         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
8437         export function SpendableOutputDescriptor_clone(orig: number): number {
8438                 if(!isWasmInitialized) {
8439                         throw new Error("initializeWasm() must be awaited first!");
8440                 }
8441                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
8442                 return nativeResponseValue;
8443         }
8444         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
8445         export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
8446                 if(!isWasmInitialized) {
8447                         throw new Error("initializeWasm() must be awaited first!");
8448                 }
8449                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_output(outpoint, output);
8450                 return nativeResponseValue;
8451         }
8452         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
8453         export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
8454                 if(!isWasmInitialized) {
8455                         throw new Error("initializeWasm() must be awaited first!");
8456                 }
8457                 const nativeResponseValue = wasm.SpendableOutputDescriptor_delayed_payment_output(a);
8458                 return nativeResponseValue;
8459         }
8460         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
8461         export function SpendableOutputDescriptor_static_payment_output(a: number): number {
8462                 if(!isWasmInitialized) {
8463                         throw new Error("initializeWasm() must be awaited first!");
8464                 }
8465                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_payment_output(a);
8466                 return nativeResponseValue;
8467         }
8468         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
8469         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
8470                 if(!isWasmInitialized) {
8471                         throw new Error("initializeWasm() must be awaited first!");
8472                 }
8473                 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
8474                 return decodeArray(nativeResponseValue);
8475         }
8476         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
8477         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
8478                 if(!isWasmInitialized) {
8479                         throw new Error("initializeWasm() must be awaited first!");
8480                 }
8481                 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
8482                 return nativeResponseValue;
8483         }
8484         // void BaseSign_free(struct LDKBaseSign this_ptr);
8485         export function BaseSign_free(this_ptr: number): void {
8486                 if(!isWasmInitialized) {
8487                         throw new Error("initializeWasm() must be awaited first!");
8488                 }
8489                 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
8490                 // debug statements here
8491         }
8492         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
8493         export function Sign_clone(orig: number): number {
8494                 if(!isWasmInitialized) {
8495                         throw new Error("initializeWasm() must be awaited first!");
8496                 }
8497                 const nativeResponseValue = wasm.Sign_clone(orig);
8498                 return nativeResponseValue;
8499         }
8500         // void Sign_free(struct LDKSign this_ptr);
8501         export function Sign_free(this_ptr: number): void {
8502                 if(!isWasmInitialized) {
8503                         throw new Error("initializeWasm() must be awaited first!");
8504                 }
8505                 const nativeResponseValue = wasm.Sign_free(this_ptr);
8506                 // debug statements here
8507         }
8508         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
8509         export function KeysInterface_free(this_ptr: number): void {
8510                 if(!isWasmInitialized) {
8511                         throw new Error("initializeWasm() must be awaited first!");
8512                 }
8513                 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
8514                 // debug statements here
8515         }
8516         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
8517         export function InMemorySigner_free(this_obj: number): void {
8518                 if(!isWasmInitialized) {
8519                         throw new Error("initializeWasm() must be awaited first!");
8520                 }
8521                 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
8522                 // debug statements here
8523         }
8524         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
8525         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
8526                 if(!isWasmInitialized) {
8527                         throw new Error("initializeWasm() must be awaited first!");
8528                 }
8529                 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
8530                 return decodeArray(nativeResponseValue);
8531         }
8532         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
8533         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
8534                 if(!isWasmInitialized) {
8535                         throw new Error("initializeWasm() must be awaited first!");
8536                 }
8537                 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
8538                 // debug statements here
8539         }
8540         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
8541         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
8542                 if(!isWasmInitialized) {
8543                         throw new Error("initializeWasm() must be awaited first!");
8544                 }
8545                 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
8546                 return decodeArray(nativeResponseValue);
8547         }
8548         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
8549         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
8550                 if(!isWasmInitialized) {
8551                         throw new Error("initializeWasm() must be awaited first!");
8552                 }
8553                 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
8554                 // debug statements here
8555         }
8556         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
8557         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
8558                 if(!isWasmInitialized) {
8559                         throw new Error("initializeWasm() must be awaited first!");
8560                 }
8561                 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
8562                 return decodeArray(nativeResponseValue);
8563         }
8564         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
8565         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
8566                 if(!isWasmInitialized) {
8567                         throw new Error("initializeWasm() must be awaited first!");
8568                 }
8569                 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
8570                 // debug statements here
8571         }
8572         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
8573         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
8574                 if(!isWasmInitialized) {
8575                         throw new Error("initializeWasm() must be awaited first!");
8576                 }
8577                 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
8578                 return decodeArray(nativeResponseValue);
8579         }
8580         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
8581         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
8582                 if(!isWasmInitialized) {
8583                         throw new Error("initializeWasm() must be awaited first!");
8584                 }
8585                 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
8586                 // debug statements here
8587         }
8588         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
8589         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
8590                 if(!isWasmInitialized) {
8591                         throw new Error("initializeWasm() must be awaited first!");
8592                 }
8593                 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
8594                 return decodeArray(nativeResponseValue);
8595         }
8596         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
8597         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
8598                 if(!isWasmInitialized) {
8599                         throw new Error("initializeWasm() must be awaited first!");
8600                 }
8601                 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
8602                 // debug statements here
8603         }
8604         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
8605         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
8606                 if(!isWasmInitialized) {
8607                         throw new Error("initializeWasm() must be awaited first!");
8608                 }
8609                 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
8610                 return decodeArray(nativeResponseValue);
8611         }
8612         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8613         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
8614                 if(!isWasmInitialized) {
8615                         throw new Error("initializeWasm() must be awaited first!");
8616                 }
8617                 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
8618                 // debug statements here
8619         }
8620         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
8621         export function InMemorySigner_clone(orig: number): number {
8622                 if(!isWasmInitialized) {
8623                         throw new Error("initializeWasm() must be awaited first!");
8624                 }
8625                 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
8626                 return nativeResponseValue;
8627         }
8628         // 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);
8629         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 {
8630                 if(!isWasmInitialized) {
8631                         throw new Error("initializeWasm() must be awaited first!");
8632                 }
8633                 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));
8634                 return nativeResponseValue;
8635         }
8636         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8637         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
8638                 if(!isWasmInitialized) {
8639                         throw new Error("initializeWasm() must be awaited first!");
8640                 }
8641                 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
8642                 return nativeResponseValue;
8643         }
8644         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8645         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
8646                 if(!isWasmInitialized) {
8647                         throw new Error("initializeWasm() must be awaited first!");
8648                 }
8649                 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
8650                 return nativeResponseValue;
8651         }
8652         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8653         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
8654                 if(!isWasmInitialized) {
8655                         throw new Error("initializeWasm() must be awaited first!");
8656                 }
8657                 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
8658                 return nativeResponseValue;
8659         }
8660         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8661         export function InMemorySigner_is_outbound(this_arg: number): boolean {
8662                 if(!isWasmInitialized) {
8663                         throw new Error("initializeWasm() must be awaited first!");
8664                 }
8665                 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
8666                 return nativeResponseValue;
8667         }
8668         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8669         export function InMemorySigner_funding_outpoint(this_arg: number): number {
8670                 if(!isWasmInitialized) {
8671                         throw new Error("initializeWasm() must be awaited first!");
8672                 }
8673                 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
8674                 return nativeResponseValue;
8675         }
8676         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8677         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
8678                 if(!isWasmInitialized) {
8679                         throw new Error("initializeWasm() must be awaited first!");
8680                 }
8681                 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
8682                 return nativeResponseValue;
8683         }
8684         // 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);
8685         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
8686                 if(!isWasmInitialized) {
8687                         throw new Error("initializeWasm() must be awaited first!");
8688                 }
8689                 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
8690                 return nativeResponseValue;
8691         }
8692         // 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);
8693         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
8694                 if(!isWasmInitialized) {
8695                         throw new Error("initializeWasm() must be awaited first!");
8696                 }
8697                 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
8698                 return nativeResponseValue;
8699         }
8700         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8701         export function InMemorySigner_as_BaseSign(this_arg: number): number {
8702                 if(!isWasmInitialized) {
8703                         throw new Error("initializeWasm() must be awaited first!");
8704                 }
8705                 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
8706                 return nativeResponseValue;
8707         }
8708         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8709         export function InMemorySigner_as_Sign(this_arg: number): number {
8710                 if(!isWasmInitialized) {
8711                         throw new Error("initializeWasm() must be awaited first!");
8712                 }
8713                 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
8714                 return nativeResponseValue;
8715         }
8716         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
8717         export function InMemorySigner_write(obj: number): Uint8Array {
8718                 if(!isWasmInitialized) {
8719                         throw new Error("initializeWasm() must be awaited first!");
8720                 }
8721                 const nativeResponseValue = wasm.InMemorySigner_write(obj);
8722                 return decodeArray(nativeResponseValue);
8723         }
8724         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
8725         export function InMemorySigner_read(ser: Uint8Array): number {
8726                 if(!isWasmInitialized) {
8727                         throw new Error("initializeWasm() must be awaited first!");
8728                 }
8729                 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
8730                 return nativeResponseValue;
8731         }
8732         // void KeysManager_free(struct LDKKeysManager this_obj);
8733         export function KeysManager_free(this_obj: number): void {
8734                 if(!isWasmInitialized) {
8735                         throw new Error("initializeWasm() must be awaited first!");
8736                 }
8737                 const nativeResponseValue = wasm.KeysManager_free(this_obj);
8738                 // debug statements here
8739         }
8740         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
8741         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
8742                 if(!isWasmInitialized) {
8743                         throw new Error("initializeWasm() must be awaited first!");
8744                 }
8745                 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
8746                 return nativeResponseValue;
8747         }
8748         // 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]);
8749         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
8750                 if(!isWasmInitialized) {
8751                         throw new Error("initializeWasm() must be awaited first!");
8752                 }
8753                 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
8754                 return nativeResponseValue;
8755         }
8756         // 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);
8757         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
8758                 if(!isWasmInitialized) {
8759                         throw new Error("initializeWasm() must be awaited first!");
8760                 }
8761                 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
8762                 return nativeResponseValue;
8763         }
8764         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
8765         export function KeysManager_as_KeysInterface(this_arg: number): number {
8766                 if(!isWasmInitialized) {
8767                         throw new Error("initializeWasm() must be awaited first!");
8768                 }
8769                 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
8770                 return nativeResponseValue;
8771         }
8772         // void ChannelManager_free(struct LDKChannelManager this_obj);
8773         export function ChannelManager_free(this_obj: number): void {
8774                 if(!isWasmInitialized) {
8775                         throw new Error("initializeWasm() must be awaited first!");
8776                 }
8777                 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
8778                 // debug statements here
8779         }
8780         // void ChainParameters_free(struct LDKChainParameters this_obj);
8781         export function ChainParameters_free(this_obj: number): void {
8782                 if(!isWasmInitialized) {
8783                         throw new Error("initializeWasm() must be awaited first!");
8784                 }
8785                 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
8786                 // debug statements here
8787         }
8788         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
8789         export function ChainParameters_get_network(this_ptr: number): Network {
8790                 if(!isWasmInitialized) {
8791                         throw new Error("initializeWasm() must be awaited first!");
8792                 }
8793                 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
8794                 return nativeResponseValue;
8795         }
8796         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
8797         export function ChainParameters_set_network(this_ptr: number, val: Network): void {
8798                 if(!isWasmInitialized) {
8799                         throw new Error("initializeWasm() must be awaited first!");
8800                 }
8801                 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
8802                 // debug statements here
8803         }
8804         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
8805         export function ChainParameters_get_best_block(this_ptr: number): number {
8806                 if(!isWasmInitialized) {
8807                         throw new Error("initializeWasm() must be awaited first!");
8808                 }
8809                 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
8810                 return nativeResponseValue;
8811         }
8812         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
8813         export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
8814                 if(!isWasmInitialized) {
8815                         throw new Error("initializeWasm() must be awaited first!");
8816                 }
8817                 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
8818                 // debug statements here
8819         }
8820         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
8821         export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
8822                 if(!isWasmInitialized) {
8823                         throw new Error("initializeWasm() must be awaited first!");
8824                 }
8825                 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
8826                 return nativeResponseValue;
8827         }
8828         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
8829         export function ChainParameters_clone(orig: number): number {
8830                 if(!isWasmInitialized) {
8831                         throw new Error("initializeWasm() must be awaited first!");
8832                 }
8833                 const nativeResponseValue = wasm.ChainParameters_clone(orig);
8834                 return nativeResponseValue;
8835         }
8836         // void CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
8837         export function CounterpartyForwardingInfo_free(this_obj: number): void {
8838                 if(!isWasmInitialized) {
8839                         throw new Error("initializeWasm() must be awaited first!");
8840                 }
8841                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_free(this_obj);
8842                 // debug statements here
8843         }
8844         // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
8845         export function CounterpartyForwardingInfo_get_fee_base_msat(this_ptr: number): number {
8846                 if(!isWasmInitialized) {
8847                         throw new Error("initializeWasm() must be awaited first!");
8848                 }
8849                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_base_msat(this_ptr);
8850                 return nativeResponseValue;
8851         }
8852         // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
8853         export function CounterpartyForwardingInfo_set_fee_base_msat(this_ptr: number, val: number): void {
8854                 if(!isWasmInitialized) {
8855                         throw new Error("initializeWasm() must be awaited first!");
8856                 }
8857                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_base_msat(this_ptr, val);
8858                 // debug statements here
8859         }
8860         // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
8861         export function CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr: number): number {
8862                 if(!isWasmInitialized) {
8863                         throw new Error("initializeWasm() must be awaited first!");
8864                 }
8865                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr);
8866                 return nativeResponseValue;
8867         }
8868         // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
8869         export function CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr: number, val: number): void {
8870                 if(!isWasmInitialized) {
8871                         throw new Error("initializeWasm() must be awaited first!");
8872                 }
8873                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr, val);
8874                 // debug statements here
8875         }
8876         // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
8877         export function CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr: number): number {
8878                 if(!isWasmInitialized) {
8879                         throw new Error("initializeWasm() must be awaited first!");
8880                 }
8881                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr);
8882                 return nativeResponseValue;
8883         }
8884         // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
8885         export function CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
8886                 if(!isWasmInitialized) {
8887                         throw new Error("initializeWasm() must be awaited first!");
8888                 }
8889                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr, val);
8890                 // debug statements here
8891         }
8892         // MUST_USE_RES struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_new(uint32_t fee_base_msat_arg, uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg);
8893         export function CounterpartyForwardingInfo_new(fee_base_msat_arg: number, fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number): number {
8894                 if(!isWasmInitialized) {
8895                         throw new Error("initializeWasm() must be awaited first!");
8896                 }
8897                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
8898                 return nativeResponseValue;
8899         }
8900         // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
8901         export function CounterpartyForwardingInfo_clone(orig: number): number {
8902                 if(!isWasmInitialized) {
8903                         throw new Error("initializeWasm() must be awaited first!");
8904                 }
8905                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_clone(orig);
8906                 return nativeResponseValue;
8907         }
8908         // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
8909         export function ChannelCounterparty_free(this_obj: number): void {
8910                 if(!isWasmInitialized) {
8911                         throw new Error("initializeWasm() must be awaited first!");
8912                 }
8913                 const nativeResponseValue = wasm.ChannelCounterparty_free(this_obj);
8914                 // debug statements here
8915         }
8916         // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
8917         export function ChannelCounterparty_get_node_id(this_ptr: number): Uint8Array {
8918                 if(!isWasmInitialized) {
8919                         throw new Error("initializeWasm() must be awaited first!");
8920                 }
8921                 const nativeResponseValue = wasm.ChannelCounterparty_get_node_id(this_ptr);
8922                 return decodeArray(nativeResponseValue);
8923         }
8924         // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8925         export function ChannelCounterparty_set_node_id(this_ptr: number, val: Uint8Array): void {
8926                 if(!isWasmInitialized) {
8927                         throw new Error("initializeWasm() must be awaited first!");
8928                 }
8929                 const nativeResponseValue = wasm.ChannelCounterparty_set_node_id(this_ptr, encodeArray(val));
8930                 // debug statements here
8931         }
8932         // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
8933         export function ChannelCounterparty_get_features(this_ptr: number): number {
8934                 if(!isWasmInitialized) {
8935                         throw new Error("initializeWasm() must be awaited first!");
8936                 }
8937                 const nativeResponseValue = wasm.ChannelCounterparty_get_features(this_ptr);
8938                 return nativeResponseValue;
8939         }
8940         // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
8941         export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
8942                 if(!isWasmInitialized) {
8943                         throw new Error("initializeWasm() must be awaited first!");
8944                 }
8945                 const nativeResponseValue = wasm.ChannelCounterparty_set_features(this_ptr, val);
8946                 // debug statements here
8947         }
8948         // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
8949         export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): number {
8950                 if(!isWasmInitialized) {
8951                         throw new Error("initializeWasm() must be awaited first!");
8952                 }
8953                 const nativeResponseValue = wasm.ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
8954                 return nativeResponseValue;
8955         }
8956         // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
8957         export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
8958                 if(!isWasmInitialized) {
8959                         throw new Error("initializeWasm() must be awaited first!");
8960                 }
8961                 const nativeResponseValue = wasm.ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
8962                 // debug statements here
8963         }
8964         // struct LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
8965         export function ChannelCounterparty_get_forwarding_info(this_ptr: number): number {
8966                 if(!isWasmInitialized) {
8967                         throw new Error("initializeWasm() must be awaited first!");
8968                 }
8969                 const nativeResponseValue = wasm.ChannelCounterparty_get_forwarding_info(this_ptr);
8970                 return nativeResponseValue;
8971         }
8972         // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
8973         export function ChannelCounterparty_set_forwarding_info(this_ptr: number, val: number): void {
8974                 if(!isWasmInitialized) {
8975                         throw new Error("initializeWasm() must be awaited first!");
8976                 }
8977                 const nativeResponseValue = wasm.ChannelCounterparty_set_forwarding_info(this_ptr, val);
8978                 // debug statements here
8979         }
8980         // MUST_USE_RES struct LDKChannelCounterparty ChannelCounterparty_new(struct LDKPublicKey node_id_arg, struct LDKInitFeatures features_arg, uint64_t unspendable_punishment_reserve_arg, struct LDKCounterpartyForwardingInfo forwarding_info_arg);
8981         export function ChannelCounterparty_new(node_id_arg: Uint8Array, features_arg: number, unspendable_punishment_reserve_arg: number, forwarding_info_arg: number): number {
8982                 if(!isWasmInitialized) {
8983                         throw new Error("initializeWasm() must be awaited first!");
8984                 }
8985                 const nativeResponseValue = wasm.ChannelCounterparty_new(encodeArray(node_id_arg), features_arg, unspendable_punishment_reserve_arg, forwarding_info_arg);
8986                 return nativeResponseValue;
8987         }
8988         // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
8989         export function ChannelCounterparty_clone(orig: number): number {
8990                 if(!isWasmInitialized) {
8991                         throw new Error("initializeWasm() must be awaited first!");
8992                 }
8993                 const nativeResponseValue = wasm.ChannelCounterparty_clone(orig);
8994                 return nativeResponseValue;
8995         }
8996         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
8997         export function ChannelDetails_free(this_obj: number): void {
8998                 if(!isWasmInitialized) {
8999                         throw new Error("initializeWasm() must be awaited first!");
9000                 }
9001                 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
9002                 // debug statements here
9003         }
9004         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
9005         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
9006                 if(!isWasmInitialized) {
9007                         throw new Error("initializeWasm() must be awaited first!");
9008                 }
9009                 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
9010                 return decodeArray(nativeResponseValue);
9011         }
9012         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9013         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
9014                 if(!isWasmInitialized) {
9015                         throw new Error("initializeWasm() must be awaited first!");
9016                 }
9017                 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
9018                 // debug statements here
9019         }
9020         // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9021         export function ChannelDetails_get_counterparty(this_ptr: number): number {
9022                 if(!isWasmInitialized) {
9023                         throw new Error("initializeWasm() must be awaited first!");
9024                 }
9025                 const nativeResponseValue = wasm.ChannelDetails_get_counterparty(this_ptr);
9026                 return nativeResponseValue;
9027         }
9028         // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
9029         export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
9030                 if(!isWasmInitialized) {
9031                         throw new Error("initializeWasm() must be awaited first!");
9032                 }
9033                 const nativeResponseValue = wasm.ChannelDetails_set_counterparty(this_ptr, val);
9034                 // debug statements here
9035         }
9036         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9037         export function ChannelDetails_get_funding_txo(this_ptr: number): number {
9038                 if(!isWasmInitialized) {
9039                         throw new Error("initializeWasm() must be awaited first!");
9040                 }
9041                 const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
9042                 return nativeResponseValue;
9043         }
9044         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
9045         export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
9046                 if(!isWasmInitialized) {
9047                         throw new Error("initializeWasm() must be awaited first!");
9048                 }
9049                 const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
9050                 // debug statements here
9051         }
9052         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9053         export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
9054                 if(!isWasmInitialized) {
9055                         throw new Error("initializeWasm() must be awaited first!");
9056                 }
9057                 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
9058                 return nativeResponseValue;
9059         }
9060         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
9061         export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
9062                 if(!isWasmInitialized) {
9063                         throw new Error("initializeWasm() must be awaited first!");
9064                 }
9065                 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
9066                 // debug statements here
9067         }
9068         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9069         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
9070                 if(!isWasmInitialized) {
9071                         throw new Error("initializeWasm() must be awaited first!");
9072                 }
9073                 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
9074                 return nativeResponseValue;
9075         }
9076         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9077         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
9078                 if(!isWasmInitialized) {
9079                         throw new Error("initializeWasm() must be awaited first!");
9080                 }
9081                 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
9082                 // debug statements here
9083         }
9084         // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9085         export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
9086                 if(!isWasmInitialized) {
9087                         throw new Error("initializeWasm() must be awaited first!");
9088                 }
9089                 const nativeResponseValue = wasm.ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
9090                 return nativeResponseValue;
9091         }
9092         // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
9093         export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
9094                 if(!isWasmInitialized) {
9095                         throw new Error("initializeWasm() must be awaited first!");
9096                 }
9097                 const nativeResponseValue = wasm.ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
9098                 // debug statements here
9099         }
9100         // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9101         export function ChannelDetails_get_user_id(this_ptr: number): number {
9102                 if(!isWasmInitialized) {
9103                         throw new Error("initializeWasm() must be awaited first!");
9104                 }
9105                 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
9106                 return nativeResponseValue;
9107         }
9108         // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9109         export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
9110                 if(!isWasmInitialized) {
9111                         throw new Error("initializeWasm() must be awaited first!");
9112                 }
9113                 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
9114                 // debug statements here
9115         }
9116         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9117         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
9118                 if(!isWasmInitialized) {
9119                         throw new Error("initializeWasm() must be awaited first!");
9120                 }
9121                 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
9122                 return nativeResponseValue;
9123         }
9124         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9125         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
9126                 if(!isWasmInitialized) {
9127                         throw new Error("initializeWasm() must be awaited first!");
9128                 }
9129                 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
9130                 // debug statements here
9131         }
9132         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9133         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
9134                 if(!isWasmInitialized) {
9135                         throw new Error("initializeWasm() must be awaited first!");
9136                 }
9137                 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
9138                 return nativeResponseValue;
9139         }
9140         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9141         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
9142                 if(!isWasmInitialized) {
9143                         throw new Error("initializeWasm() must be awaited first!");
9144                 }
9145                 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
9146                 // debug statements here
9147         }
9148         // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9149         export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
9150                 if(!isWasmInitialized) {
9151                         throw new Error("initializeWasm() must be awaited first!");
9152                 }
9153                 const nativeResponseValue = wasm.ChannelDetails_get_confirmations_required(this_ptr);
9154                 return nativeResponseValue;
9155         }
9156         // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
9157         export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
9158                 if(!isWasmInitialized) {
9159                         throw new Error("initializeWasm() must be awaited first!");
9160                 }
9161                 const nativeResponseValue = wasm.ChannelDetails_set_confirmations_required(this_ptr, val);
9162                 // debug statements here
9163         }
9164         // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9165         export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
9166                 if(!isWasmInitialized) {
9167                         throw new Error("initializeWasm() must be awaited first!");
9168                 }
9169                 const nativeResponseValue = wasm.ChannelDetails_get_force_close_spend_delay(this_ptr);
9170                 return nativeResponseValue;
9171         }
9172         // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
9173         export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
9174                 if(!isWasmInitialized) {
9175                         throw new Error("initializeWasm() must be awaited first!");
9176                 }
9177                 const nativeResponseValue = wasm.ChannelDetails_set_force_close_spend_delay(this_ptr, val);
9178                 // debug statements here
9179         }
9180         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9181         export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
9182                 if(!isWasmInitialized) {
9183                         throw new Error("initializeWasm() must be awaited first!");
9184                 }
9185                 const nativeResponseValue = wasm.ChannelDetails_get_is_outbound(this_ptr);
9186                 return nativeResponseValue;
9187         }
9188         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9189         export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
9190                 if(!isWasmInitialized) {
9191                         throw new Error("initializeWasm() must be awaited first!");
9192                 }
9193                 const nativeResponseValue = wasm.ChannelDetails_set_is_outbound(this_ptr, val);
9194                 // debug statements here
9195         }
9196         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9197         export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
9198                 if(!isWasmInitialized) {
9199                         throw new Error("initializeWasm() must be awaited first!");
9200                 }
9201                 const nativeResponseValue = wasm.ChannelDetails_get_is_funding_locked(this_ptr);
9202                 return nativeResponseValue;
9203         }
9204         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9205         export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
9206                 if(!isWasmInitialized) {
9207                         throw new Error("initializeWasm() must be awaited first!");
9208                 }
9209                 const nativeResponseValue = wasm.ChannelDetails_set_is_funding_locked(this_ptr, val);
9210                 // debug statements here
9211         }
9212         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9213         export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
9214                 if(!isWasmInitialized) {
9215                         throw new Error("initializeWasm() must be awaited first!");
9216                 }
9217                 const nativeResponseValue = wasm.ChannelDetails_get_is_usable(this_ptr);
9218                 return nativeResponseValue;
9219         }
9220         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9221         export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
9222                 if(!isWasmInitialized) {
9223                         throw new Error("initializeWasm() must be awaited first!");
9224                 }
9225                 const nativeResponseValue = wasm.ChannelDetails_set_is_usable(this_ptr, val);
9226                 // debug statements here
9227         }
9228         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9229         export function ChannelDetails_get_is_public(this_ptr: number): boolean {
9230                 if(!isWasmInitialized) {
9231                         throw new Error("initializeWasm() must be awaited first!");
9232                 }
9233                 const nativeResponseValue = wasm.ChannelDetails_get_is_public(this_ptr);
9234                 return nativeResponseValue;
9235         }
9236         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9237         export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
9238                 if(!isWasmInitialized) {
9239                         throw new Error("initializeWasm() must be awaited first!");
9240                 }
9241                 const nativeResponseValue = wasm.ChannelDetails_set_is_public(this_ptr, val);
9242                 // debug statements here
9243         }
9244         // 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);
9245         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 {
9246                 if(!isWasmInitialized) {
9247                         throw new Error("initializeWasm() must be awaited first!");
9248                 }
9249                 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);
9250                 return nativeResponseValue;
9251         }
9252         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
9253         export function ChannelDetails_clone(orig: number): number {
9254                 if(!isWasmInitialized) {
9255                         throw new Error("initializeWasm() must be awaited first!");
9256                 }
9257                 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
9258                 return nativeResponseValue;
9259         }
9260         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
9261         export function PaymentSendFailure_free(this_ptr: number): void {
9262                 if(!isWasmInitialized) {
9263                         throw new Error("initializeWasm() must be awaited first!");
9264                 }
9265                 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
9266                 // debug statements here
9267         }
9268         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
9269         export function PaymentSendFailure_clone(orig: number): number {
9270                 if(!isWasmInitialized) {
9271                         throw new Error("initializeWasm() must be awaited first!");
9272                 }
9273                 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
9274                 return nativeResponseValue;
9275         }
9276         // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
9277         export function PaymentSendFailure_parameter_error(a: number): number {
9278                 if(!isWasmInitialized) {
9279                         throw new Error("initializeWasm() must be awaited first!");
9280                 }
9281                 const nativeResponseValue = wasm.PaymentSendFailure_parameter_error(a);
9282                 return nativeResponseValue;
9283         }
9284         // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
9285         export function PaymentSendFailure_path_parameter_error(a: number[]): number {
9286                 if(!isWasmInitialized) {
9287                         throw new Error("initializeWasm() must be awaited first!");
9288                 }
9289                 const nativeResponseValue = wasm.PaymentSendFailure_path_parameter_error(a);
9290                 return nativeResponseValue;
9291         }
9292         // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
9293         export function PaymentSendFailure_all_failed_retry_safe(a: number[]): number {
9294                 if(!isWasmInitialized) {
9295                         throw new Error("initializeWasm() must be awaited first!");
9296                 }
9297                 const nativeResponseValue = wasm.PaymentSendFailure_all_failed_retry_safe(a);
9298                 return nativeResponseValue;
9299         }
9300         // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ a);
9301         export function PaymentSendFailure_partial_failure(a: number[]): number {
9302                 if(!isWasmInitialized) {
9303                         throw new Error("initializeWasm() must be awaited first!");
9304                 }
9305                 const nativeResponseValue = wasm.PaymentSendFailure_partial_failure(a);
9306                 return nativeResponseValue;
9307         }
9308         // 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);
9309         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
9310                 if(!isWasmInitialized) {
9311                         throw new Error("initializeWasm() must be awaited first!");
9312                 }
9313                 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
9314                 return nativeResponseValue;
9315         }
9316         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
9317         export function ChannelManager_get_current_default_configuration(this_arg: number): number {
9318                 if(!isWasmInitialized) {
9319                         throw new Error("initializeWasm() must be awaited first!");
9320                 }
9321                 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
9322                 return nativeResponseValue;
9323         }
9324         // 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);
9325         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 {
9326                 if(!isWasmInitialized) {
9327                         throw new Error("initializeWasm() must be awaited first!");
9328                 }
9329                 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
9330                 return nativeResponseValue;
9331         }
9332         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
9333         export function ChannelManager_list_channels(this_arg: number): number[] {
9334                 if(!isWasmInitialized) {
9335                         throw new Error("initializeWasm() must be awaited first!");
9336                 }
9337                 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
9338                 return nativeResponseValue;
9339         }
9340         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
9341         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
9342                 if(!isWasmInitialized) {
9343                         throw new Error("initializeWasm() must be awaited first!");
9344                 }
9345                 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
9346                 return nativeResponseValue;
9347         }
9348         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
9349         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
9350                 if(!isWasmInitialized) {
9351                         throw new Error("initializeWasm() must be awaited first!");
9352                 }
9353                 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
9354                 return nativeResponseValue;
9355         }
9356         // 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);
9357         export function ChannelManager_close_channel_with_target_feerate(this_arg: number, channel_id: Uint8Array, target_feerate_sats_per_1000_weight: number): number {
9358                 if(!isWasmInitialized) {
9359                         throw new Error("initializeWasm() must be awaited first!");
9360                 }
9361                 const nativeResponseValue = wasm.ChannelManager_close_channel_with_target_feerate(this_arg, encodeArray(channel_id), target_feerate_sats_per_1000_weight);
9362                 return nativeResponseValue;
9363         }
9364         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
9365         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
9366                 if(!isWasmInitialized) {
9367                         throw new Error("initializeWasm() must be awaited first!");
9368                 }
9369                 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
9370                 return nativeResponseValue;
9371         }
9372         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
9373         export function ChannelManager_force_close_all_channels(this_arg: number): void {
9374                 if(!isWasmInitialized) {
9375                         throw new Error("initializeWasm() must be awaited first!");
9376                 }
9377                 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
9378                 // debug statements here
9379         }
9380         // 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);
9381         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
9382                 if(!isWasmInitialized) {
9383                         throw new Error("initializeWasm() must be awaited first!");
9384                 }
9385                 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
9386                 return nativeResponseValue;
9387         }
9388         // 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);
9389         export function ChannelManager_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: Uint8Array): number {
9390                 if(!isWasmInitialized) {
9391                         throw new Error("initializeWasm() must be awaited first!");
9392                 }
9393                 const nativeResponseValue = wasm.ChannelManager_send_spontaneous_payment(this_arg, route, encodeArray(payment_preimage));
9394                 return nativeResponseValue;
9395         }
9396         // 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);
9397         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
9398                 if(!isWasmInitialized) {
9399                         throw new Error("initializeWasm() must be awaited first!");
9400                 }
9401                 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
9402                 return nativeResponseValue;
9403         }
9404         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
9405         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
9406                 if(!isWasmInitialized) {
9407                         throw new Error("initializeWasm() must be awaited first!");
9408                 }
9409                 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
9410                 // debug statements here
9411         }
9412         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
9413         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
9414                 if(!isWasmInitialized) {
9415                         throw new Error("initializeWasm() must be awaited first!");
9416                 }
9417                 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
9418                 // debug statements here
9419         }
9420         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
9421         export function ChannelManager_timer_tick_occurred(this_arg: number): void {
9422                 if(!isWasmInitialized) {
9423                         throw new Error("initializeWasm() must be awaited first!");
9424                 }
9425                 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
9426                 // debug statements here
9427         }
9428         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
9429         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
9430                 if(!isWasmInitialized) {
9431                         throw new Error("initializeWasm() must be awaited first!");
9432                 }
9433                 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash));
9434                 return nativeResponseValue;
9435         }
9436         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
9437         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
9438                 if(!isWasmInitialized) {
9439                         throw new Error("initializeWasm() must be awaited first!");
9440                 }
9441                 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage));
9442                 return nativeResponseValue;
9443         }
9444         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
9445         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
9446                 if(!isWasmInitialized) {
9447                         throw new Error("initializeWasm() must be awaited first!");
9448                 }
9449                 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
9450                 return decodeArray(nativeResponseValue);
9451         }
9452         // 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);
9453         export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
9454                 if(!isWasmInitialized) {
9455                         throw new Error("initializeWasm() must be awaited first!");
9456                 }
9457                 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
9458                 // debug statements here
9459         }
9460         // 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);
9461         export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
9462                 if(!isWasmInitialized) {
9463                         throw new Error("initializeWasm() must be awaited first!");
9464                 }
9465                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs, user_payment_id);
9466                 return nativeResponseValue;
9467         }
9468         // 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);
9469         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 {
9470                 if(!isWasmInitialized) {
9471                         throw new Error("initializeWasm() must be awaited first!");
9472                 }
9473                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_for_hash(this_arg, encodeArray(payment_hash), min_value_msat, invoice_expiry_delta_secs, user_payment_id);
9474                 return nativeResponseValue;
9475         }
9476         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
9477         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
9478                 if(!isWasmInitialized) {
9479                         throw new Error("initializeWasm() must be awaited first!");
9480                 }
9481                 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
9482                 return nativeResponseValue;
9483         }
9484         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
9485         export function ChannelManager_as_EventsProvider(this_arg: number): number {
9486                 if(!isWasmInitialized) {
9487                         throw new Error("initializeWasm() must be awaited first!");
9488                 }
9489                 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
9490                 return nativeResponseValue;
9491         }
9492         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
9493         export function ChannelManager_as_Listen(this_arg: number): number {
9494                 if(!isWasmInitialized) {
9495                         throw new Error("initializeWasm() must be awaited first!");
9496                 }
9497                 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
9498                 return nativeResponseValue;
9499         }
9500         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
9501         export function ChannelManager_as_Confirm(this_arg: number): number {
9502                 if(!isWasmInitialized) {
9503                         throw new Error("initializeWasm() must be awaited first!");
9504                 }
9505                 const nativeResponseValue = wasm.ChannelManager_as_Confirm(this_arg);
9506                 return nativeResponseValue;
9507         }
9508         // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
9509         export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
9510                 if(!isWasmInitialized) {
9511                         throw new Error("initializeWasm() must be awaited first!");
9512                 }
9513                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
9514                 return nativeResponseValue;
9515         }
9516         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
9517         export function ChannelManager_await_persistable_update(this_arg: number): void {
9518                 if(!isWasmInitialized) {
9519                         throw new Error("initializeWasm() must be awaited first!");
9520                 }
9521                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
9522                 // debug statements here
9523         }
9524         // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
9525         export function ChannelManager_current_best_block(this_arg: number): number {
9526                 if(!isWasmInitialized) {
9527                         throw new Error("initializeWasm() must be awaited first!");
9528                 }
9529                 const nativeResponseValue = wasm.ChannelManager_current_best_block(this_arg);
9530                 return nativeResponseValue;
9531         }
9532         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
9533         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
9534                 if(!isWasmInitialized) {
9535                         throw new Error("initializeWasm() must be awaited first!");
9536                 }
9537                 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
9538                 return nativeResponseValue;
9539         }
9540         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
9541         export function ChannelManager_write(obj: number): Uint8Array {
9542                 if(!isWasmInitialized) {
9543                         throw new Error("initializeWasm() must be awaited first!");
9544                 }
9545                 const nativeResponseValue = wasm.ChannelManager_write(obj);
9546                 return decodeArray(nativeResponseValue);
9547         }
9548         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
9549         export function ChannelManagerReadArgs_free(this_obj: number): void {
9550                 if(!isWasmInitialized) {
9551                         throw new Error("initializeWasm() must be awaited first!");
9552                 }
9553                 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
9554                 // debug statements here
9555         }
9556         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
9557         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
9558                 if(!isWasmInitialized) {
9559                         throw new Error("initializeWasm() must be awaited first!");
9560                 }
9561                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
9562                 return nativeResponseValue;
9563         }
9564         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
9565         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
9566                 if(!isWasmInitialized) {
9567                         throw new Error("initializeWasm() must be awaited first!");
9568                 }
9569                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
9570                 // debug statements here
9571         }
9572         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
9573         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
9574                 if(!isWasmInitialized) {
9575                         throw new Error("initializeWasm() must be awaited first!");
9576                 }
9577                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
9578                 return nativeResponseValue;
9579         }
9580         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
9581         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
9582                 if(!isWasmInitialized) {
9583                         throw new Error("initializeWasm() must be awaited first!");
9584                 }
9585                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
9586                 // debug statements here
9587         }
9588         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
9589         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
9590                 if(!isWasmInitialized) {
9591                         throw new Error("initializeWasm() must be awaited first!");
9592                 }
9593                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
9594                 return nativeResponseValue;
9595         }
9596         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
9597         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
9598                 if(!isWasmInitialized) {
9599                         throw new Error("initializeWasm() must be awaited first!");
9600                 }
9601                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
9602                 // debug statements here
9603         }
9604         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
9605         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
9606                 if(!isWasmInitialized) {
9607                         throw new Error("initializeWasm() must be awaited first!");
9608                 }
9609                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
9610                 return nativeResponseValue;
9611         }
9612         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
9613         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
9614                 if(!isWasmInitialized) {
9615                         throw new Error("initializeWasm() must be awaited first!");
9616                 }
9617                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
9618                 // debug statements here
9619         }
9620         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
9621         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
9622                 if(!isWasmInitialized) {
9623                         throw new Error("initializeWasm() must be awaited first!");
9624                 }
9625                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
9626                 return nativeResponseValue;
9627         }
9628         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
9629         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
9630                 if(!isWasmInitialized) {
9631                         throw new Error("initializeWasm() must be awaited first!");
9632                 }
9633                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
9634                 // debug statements here
9635         }
9636         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
9637         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
9638                 if(!isWasmInitialized) {
9639                         throw new Error("initializeWasm() must be awaited first!");
9640                 }
9641                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
9642                 return nativeResponseValue;
9643         }
9644         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
9645         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
9646                 if(!isWasmInitialized) {
9647                         throw new Error("initializeWasm() must be awaited first!");
9648                 }
9649                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
9650                 // debug statements here
9651         }
9652         // 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);
9653         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 {
9654                 if(!isWasmInitialized) {
9655                         throw new Error("initializeWasm() must be awaited first!");
9656                 }
9657                 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
9658                 return nativeResponseValue;
9659         }
9660         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
9661         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
9662                 if(!isWasmInitialized) {
9663                         throw new Error("initializeWasm() must be awaited first!");
9664                 }
9665                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
9666                 return nativeResponseValue;
9667         }
9668         // void DecodeError_free(struct LDKDecodeError this_obj);
9669         export function DecodeError_free(this_obj: number): void {
9670                 if(!isWasmInitialized) {
9671                         throw new Error("initializeWasm() must be awaited first!");
9672                 }
9673                 const nativeResponseValue = wasm.DecodeError_free(this_obj);
9674                 // debug statements here
9675         }
9676         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
9677         export function DecodeError_clone(orig: number): number {
9678                 if(!isWasmInitialized) {
9679                         throw new Error("initializeWasm() must be awaited first!");
9680                 }
9681                 const nativeResponseValue = wasm.DecodeError_clone(orig);
9682                 return nativeResponseValue;
9683         }
9684         // void Init_free(struct LDKInit this_obj);
9685         export function Init_free(this_obj: number): void {
9686                 if(!isWasmInitialized) {
9687                         throw new Error("initializeWasm() must be awaited first!");
9688                 }
9689                 const nativeResponseValue = wasm.Init_free(this_obj);
9690                 // debug statements here
9691         }
9692         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
9693         export function Init_get_features(this_ptr: number): number {
9694                 if(!isWasmInitialized) {
9695                         throw new Error("initializeWasm() must be awaited first!");
9696                 }
9697                 const nativeResponseValue = wasm.Init_get_features(this_ptr);
9698                 return nativeResponseValue;
9699         }
9700         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
9701         export function Init_set_features(this_ptr: number, val: number): void {
9702                 if(!isWasmInitialized) {
9703                         throw new Error("initializeWasm() must be awaited first!");
9704                 }
9705                 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
9706                 // debug statements here
9707         }
9708         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
9709         export function Init_new(features_arg: number): number {
9710                 if(!isWasmInitialized) {
9711                         throw new Error("initializeWasm() must be awaited first!");
9712                 }
9713                 const nativeResponseValue = wasm.Init_new(features_arg);
9714                 return nativeResponseValue;
9715         }
9716         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
9717         export function Init_clone(orig: number): number {
9718                 if(!isWasmInitialized) {
9719                         throw new Error("initializeWasm() must be awaited first!");
9720                 }
9721                 const nativeResponseValue = wasm.Init_clone(orig);
9722                 return nativeResponseValue;
9723         }
9724         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
9725         export function ErrorMessage_free(this_obj: number): void {
9726                 if(!isWasmInitialized) {
9727                         throw new Error("initializeWasm() must be awaited first!");
9728                 }
9729                 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
9730                 // debug statements here
9731         }
9732         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
9733         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
9734                 if(!isWasmInitialized) {
9735                         throw new Error("initializeWasm() must be awaited first!");
9736                 }
9737                 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
9738                 return decodeArray(nativeResponseValue);
9739         }
9740         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9741         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
9742                 if(!isWasmInitialized) {
9743                         throw new Error("initializeWasm() must be awaited first!");
9744                 }
9745                 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
9746                 // debug statements here
9747         }
9748         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
9749         export function ErrorMessage_get_data(this_ptr: number): String {
9750                 if(!isWasmInitialized) {
9751                         throw new Error("initializeWasm() must be awaited first!");
9752                 }
9753                 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
9754                 return nativeResponseValue;
9755         }
9756         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
9757         export function ErrorMessage_set_data(this_ptr: number, val: String): void {
9758                 if(!isWasmInitialized) {
9759                         throw new Error("initializeWasm() must be awaited first!");
9760                 }
9761                 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, val);
9762                 // debug statements here
9763         }
9764         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
9765         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
9766                 if(!isWasmInitialized) {
9767                         throw new Error("initializeWasm() must be awaited first!");
9768                 }
9769                 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), data_arg);
9770                 return nativeResponseValue;
9771         }
9772         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
9773         export function ErrorMessage_clone(orig: number): number {
9774                 if(!isWasmInitialized) {
9775                         throw new Error("initializeWasm() must be awaited first!");
9776                 }
9777                 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
9778                 return nativeResponseValue;
9779         }
9780         // void Ping_free(struct LDKPing this_obj);
9781         export function Ping_free(this_obj: number): void {
9782                 if(!isWasmInitialized) {
9783                         throw new Error("initializeWasm() must be awaited first!");
9784                 }
9785                 const nativeResponseValue = wasm.Ping_free(this_obj);
9786                 // debug statements here
9787         }
9788         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
9789         export function Ping_get_ponglen(this_ptr: number): number {
9790                 if(!isWasmInitialized) {
9791                         throw new Error("initializeWasm() must be awaited first!");
9792                 }
9793                 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
9794                 return nativeResponseValue;
9795         }
9796         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
9797         export function Ping_set_ponglen(this_ptr: number, val: number): void {
9798                 if(!isWasmInitialized) {
9799                         throw new Error("initializeWasm() must be awaited first!");
9800                 }
9801                 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
9802                 // debug statements here
9803         }
9804         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
9805         export function Ping_get_byteslen(this_ptr: number): number {
9806                 if(!isWasmInitialized) {
9807                         throw new Error("initializeWasm() must be awaited first!");
9808                 }
9809                 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
9810                 return nativeResponseValue;
9811         }
9812         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
9813         export function Ping_set_byteslen(this_ptr: number, val: number): void {
9814                 if(!isWasmInitialized) {
9815                         throw new Error("initializeWasm() must be awaited first!");
9816                 }
9817                 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
9818                 // debug statements here
9819         }
9820         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
9821         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
9822                 if(!isWasmInitialized) {
9823                         throw new Error("initializeWasm() must be awaited first!");
9824                 }
9825                 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
9826                 return nativeResponseValue;
9827         }
9828         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
9829         export function Ping_clone(orig: number): number {
9830                 if(!isWasmInitialized) {
9831                         throw new Error("initializeWasm() must be awaited first!");
9832                 }
9833                 const nativeResponseValue = wasm.Ping_clone(orig);
9834                 return nativeResponseValue;
9835         }
9836         // void Pong_free(struct LDKPong this_obj);
9837         export function Pong_free(this_obj: number): void {
9838                 if(!isWasmInitialized) {
9839                         throw new Error("initializeWasm() must be awaited first!");
9840                 }
9841                 const nativeResponseValue = wasm.Pong_free(this_obj);
9842                 // debug statements here
9843         }
9844         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
9845         export function Pong_get_byteslen(this_ptr: number): number {
9846                 if(!isWasmInitialized) {
9847                         throw new Error("initializeWasm() must be awaited first!");
9848                 }
9849                 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
9850                 return nativeResponseValue;
9851         }
9852         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
9853         export function Pong_set_byteslen(this_ptr: number, val: number): void {
9854                 if(!isWasmInitialized) {
9855                         throw new Error("initializeWasm() must be awaited first!");
9856                 }
9857                 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
9858                 // debug statements here
9859         }
9860         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
9861         export function Pong_new(byteslen_arg: number): number {
9862                 if(!isWasmInitialized) {
9863                         throw new Error("initializeWasm() must be awaited first!");
9864                 }
9865                 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
9866                 return nativeResponseValue;
9867         }
9868         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
9869         export function Pong_clone(orig: number): number {
9870                 if(!isWasmInitialized) {
9871                         throw new Error("initializeWasm() must be awaited first!");
9872                 }
9873                 const nativeResponseValue = wasm.Pong_clone(orig);
9874                 return nativeResponseValue;
9875         }
9876         // void OpenChannel_free(struct LDKOpenChannel this_obj);
9877         export function OpenChannel_free(this_obj: number): void {
9878                 if(!isWasmInitialized) {
9879                         throw new Error("initializeWasm() must be awaited first!");
9880                 }
9881                 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
9882                 // debug statements here
9883         }
9884         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
9885         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
9886                 if(!isWasmInitialized) {
9887                         throw new Error("initializeWasm() must be awaited first!");
9888                 }
9889                 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
9890                 return decodeArray(nativeResponseValue);
9891         }
9892         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9893         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9894                 if(!isWasmInitialized) {
9895                         throw new Error("initializeWasm() must be awaited first!");
9896                 }
9897                 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
9898                 // debug statements here
9899         }
9900         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
9901         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
9902                 if(!isWasmInitialized) {
9903                         throw new Error("initializeWasm() must be awaited first!");
9904                 }
9905                 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
9906                 return decodeArray(nativeResponseValue);
9907         }
9908         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9909         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
9910                 if(!isWasmInitialized) {
9911                         throw new Error("initializeWasm() must be awaited first!");
9912                 }
9913                 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
9914                 // debug statements here
9915         }
9916         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9917         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
9918                 if(!isWasmInitialized) {
9919                         throw new Error("initializeWasm() must be awaited first!");
9920                 }
9921                 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
9922                 return nativeResponseValue;
9923         }
9924         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9925         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
9926                 if(!isWasmInitialized) {
9927                         throw new Error("initializeWasm() must be awaited first!");
9928                 }
9929                 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
9930                 // debug statements here
9931         }
9932         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9933         export function OpenChannel_get_push_msat(this_ptr: number): number {
9934                 if(!isWasmInitialized) {
9935                         throw new Error("initializeWasm() must be awaited first!");
9936                 }
9937                 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
9938                 return nativeResponseValue;
9939         }
9940         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9941         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
9942                 if(!isWasmInitialized) {
9943                         throw new Error("initializeWasm() must be awaited first!");
9944                 }
9945                 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
9946                 // debug statements here
9947         }
9948         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9949         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
9950                 if(!isWasmInitialized) {
9951                         throw new Error("initializeWasm() must be awaited first!");
9952                 }
9953                 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
9954                 return nativeResponseValue;
9955         }
9956         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9957         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
9958                 if(!isWasmInitialized) {
9959                         throw new Error("initializeWasm() must be awaited first!");
9960                 }
9961                 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
9962                 // debug statements here
9963         }
9964         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9965         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
9966                 if(!isWasmInitialized) {
9967                         throw new Error("initializeWasm() must be awaited first!");
9968                 }
9969                 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
9970                 return nativeResponseValue;
9971         }
9972         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9973         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
9974                 if(!isWasmInitialized) {
9975                         throw new Error("initializeWasm() must be awaited first!");
9976                 }
9977                 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
9978                 // debug statements here
9979         }
9980         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9981         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
9982                 if(!isWasmInitialized) {
9983                         throw new Error("initializeWasm() must be awaited first!");
9984                 }
9985                 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
9986                 return nativeResponseValue;
9987         }
9988         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9989         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
9990                 if(!isWasmInitialized) {
9991                         throw new Error("initializeWasm() must be awaited first!");
9992                 }
9993                 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
9994                 // debug statements here
9995         }
9996         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9997         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
9998                 if(!isWasmInitialized) {
9999                         throw new Error("initializeWasm() must be awaited first!");
10000                 }
10001                 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
10002                 return nativeResponseValue;
10003         }
10004         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10005         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
10006                 if(!isWasmInitialized) {
10007                         throw new Error("initializeWasm() must be awaited first!");
10008                 }
10009                 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
10010                 // debug statements here
10011         }
10012         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10013         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
10014                 if(!isWasmInitialized) {
10015                         throw new Error("initializeWasm() must be awaited first!");
10016                 }
10017                 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
10018                 return nativeResponseValue;
10019         }
10020         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
10021         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
10022                 if(!isWasmInitialized) {
10023                         throw new Error("initializeWasm() must be awaited first!");
10024                 }
10025                 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
10026                 // debug statements here
10027         }
10028         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10029         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
10030                 if(!isWasmInitialized) {
10031                         throw new Error("initializeWasm() must be awaited first!");
10032                 }
10033                 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
10034                 return nativeResponseValue;
10035         }
10036         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
10037         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
10038                 if(!isWasmInitialized) {
10039                         throw new Error("initializeWasm() must be awaited first!");
10040                 }
10041                 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
10042                 // debug statements here
10043         }
10044         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10045         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
10046                 if(!isWasmInitialized) {
10047                         throw new Error("initializeWasm() must be awaited first!");
10048                 }
10049                 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
10050                 return nativeResponseValue;
10051         }
10052         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
10053         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
10054                 if(!isWasmInitialized) {
10055                         throw new Error("initializeWasm() must be awaited first!");
10056                 }
10057                 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
10058                 // debug statements here
10059         }
10060         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10061         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
10062                 if(!isWasmInitialized) {
10063                         throw new Error("initializeWasm() must be awaited first!");
10064                 }
10065                 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
10066                 return decodeArray(nativeResponseValue);
10067         }
10068         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10069         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10070                 if(!isWasmInitialized) {
10071                         throw new Error("initializeWasm() must be awaited first!");
10072                 }
10073                 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
10074                 // debug statements here
10075         }
10076         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10077         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
10078                 if(!isWasmInitialized) {
10079                         throw new Error("initializeWasm() must be awaited first!");
10080                 }
10081                 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
10082                 return decodeArray(nativeResponseValue);
10083         }
10084         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10085         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10086                 if(!isWasmInitialized) {
10087                         throw new Error("initializeWasm() must be awaited first!");
10088                 }
10089                 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
10090                 // debug statements here
10091         }
10092         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10093         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
10094                 if(!isWasmInitialized) {
10095                         throw new Error("initializeWasm() must be awaited first!");
10096                 }
10097                 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
10098                 return decodeArray(nativeResponseValue);
10099         }
10100         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10101         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
10102                 if(!isWasmInitialized) {
10103                         throw new Error("initializeWasm() must be awaited first!");
10104                 }
10105                 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
10106                 // debug statements here
10107         }
10108         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10109         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10110                 if(!isWasmInitialized) {
10111                         throw new Error("initializeWasm() must be awaited first!");
10112                 }
10113                 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
10114                 return decodeArray(nativeResponseValue);
10115         }
10116         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10117         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10118                 if(!isWasmInitialized) {
10119                         throw new Error("initializeWasm() must be awaited first!");
10120                 }
10121                 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10122                 // debug statements here
10123         }
10124         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10125         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
10126                 if(!isWasmInitialized) {
10127                         throw new Error("initializeWasm() must be awaited first!");
10128                 }
10129                 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
10130                 return decodeArray(nativeResponseValue);
10131         }
10132         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10133         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10134                 if(!isWasmInitialized) {
10135                         throw new Error("initializeWasm() must be awaited first!");
10136                 }
10137                 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
10138                 // debug statements here
10139         }
10140         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10141         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
10142                 if(!isWasmInitialized) {
10143                         throw new Error("initializeWasm() must be awaited first!");
10144                 }
10145                 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
10146                 return decodeArray(nativeResponseValue);
10147         }
10148         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10149         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10150                 if(!isWasmInitialized) {
10151                         throw new Error("initializeWasm() must be awaited first!");
10152                 }
10153                 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
10154                 // debug statements here
10155         }
10156         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10157         export function OpenChannel_get_channel_flags(this_ptr: number): number {
10158                 if(!isWasmInitialized) {
10159                         throw new Error("initializeWasm() must be awaited first!");
10160                 }
10161                 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
10162                 return nativeResponseValue;
10163         }
10164         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
10165         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
10166                 if(!isWasmInitialized) {
10167                         throw new Error("initializeWasm() must be awaited first!");
10168                 }
10169                 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
10170                 // debug statements here
10171         }
10172         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
10173         export function OpenChannel_clone(orig: number): number {
10174                 if(!isWasmInitialized) {
10175                         throw new Error("initializeWasm() must be awaited first!");
10176                 }
10177                 const nativeResponseValue = wasm.OpenChannel_clone(orig);
10178                 return nativeResponseValue;
10179         }
10180         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
10181         export function AcceptChannel_free(this_obj: number): void {
10182                 if(!isWasmInitialized) {
10183                         throw new Error("initializeWasm() must be awaited first!");
10184                 }
10185                 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
10186                 // debug statements here
10187         }
10188         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
10189         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
10190                 if(!isWasmInitialized) {
10191                         throw new Error("initializeWasm() must be awaited first!");
10192                 }
10193                 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
10194                 return decodeArray(nativeResponseValue);
10195         }
10196         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10197         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
10198                 if(!isWasmInitialized) {
10199                         throw new Error("initializeWasm() must be awaited first!");
10200                 }
10201                 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
10202                 // debug statements here
10203         }
10204         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10205         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
10206                 if(!isWasmInitialized) {
10207                         throw new Error("initializeWasm() must be awaited first!");
10208                 }
10209                 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
10210                 return nativeResponseValue;
10211         }
10212         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10213         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
10214                 if(!isWasmInitialized) {
10215                         throw new Error("initializeWasm() must be awaited first!");
10216                 }
10217                 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
10218                 // debug statements here
10219         }
10220         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10221         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
10222                 if(!isWasmInitialized) {
10223                         throw new Error("initializeWasm() must be awaited first!");
10224                 }
10225                 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
10226                 return nativeResponseValue;
10227         }
10228         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10229         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
10230                 if(!isWasmInitialized) {
10231                         throw new Error("initializeWasm() must be awaited first!");
10232                 }
10233                 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
10234                 // debug statements here
10235         }
10236         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10237         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
10238                 if(!isWasmInitialized) {
10239                         throw new Error("initializeWasm() must be awaited first!");
10240                 }
10241                 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
10242                 return nativeResponseValue;
10243         }
10244         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10245         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
10246                 if(!isWasmInitialized) {
10247                         throw new Error("initializeWasm() must be awaited first!");
10248                 }
10249                 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
10250                 // debug statements here
10251         }
10252         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10253         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
10254                 if(!isWasmInitialized) {
10255                         throw new Error("initializeWasm() must be awaited first!");
10256                 }
10257                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
10258                 return nativeResponseValue;
10259         }
10260         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10261         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
10262                 if(!isWasmInitialized) {
10263                         throw new Error("initializeWasm() must be awaited first!");
10264                 }
10265                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
10266                 // debug statements here
10267         }
10268         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10269         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
10270                 if(!isWasmInitialized) {
10271                         throw new Error("initializeWasm() must be awaited first!");
10272                 }
10273                 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
10274                 return nativeResponseValue;
10275         }
10276         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
10277         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
10278                 if(!isWasmInitialized) {
10279                         throw new Error("initializeWasm() must be awaited first!");
10280                 }
10281                 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
10282                 // debug statements here
10283         }
10284         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10285         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
10286                 if(!isWasmInitialized) {
10287                         throw new Error("initializeWasm() must be awaited first!");
10288                 }
10289                 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
10290                 return nativeResponseValue;
10291         }
10292         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
10293         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
10294                 if(!isWasmInitialized) {
10295                         throw new Error("initializeWasm() must be awaited first!");
10296                 }
10297                 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
10298                 // debug statements here
10299         }
10300         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10301         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
10302                 if(!isWasmInitialized) {
10303                         throw new Error("initializeWasm() must be awaited first!");
10304                 }
10305                 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
10306                 return nativeResponseValue;
10307         }
10308         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
10309         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
10310                 if(!isWasmInitialized) {
10311                         throw new Error("initializeWasm() must be awaited first!");
10312                 }
10313                 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
10314                 // debug statements here
10315         }
10316         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10317         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
10318                 if(!isWasmInitialized) {
10319                         throw new Error("initializeWasm() must be awaited first!");
10320                 }
10321                 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
10322                 return decodeArray(nativeResponseValue);
10323         }
10324         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10325         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10326                 if(!isWasmInitialized) {
10327                         throw new Error("initializeWasm() must be awaited first!");
10328                 }
10329                 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
10330                 // debug statements here
10331         }
10332         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10333         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
10334                 if(!isWasmInitialized) {
10335                         throw new Error("initializeWasm() must be awaited first!");
10336                 }
10337                 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
10338                 return decodeArray(nativeResponseValue);
10339         }
10340         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10341         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10342                 if(!isWasmInitialized) {
10343                         throw new Error("initializeWasm() must be awaited first!");
10344                 }
10345                 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
10346                 // debug statements here
10347         }
10348         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10349         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
10350                 if(!isWasmInitialized) {
10351                         throw new Error("initializeWasm() must be awaited first!");
10352                 }
10353                 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
10354                 return decodeArray(nativeResponseValue);
10355         }
10356         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10357         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
10358                 if(!isWasmInitialized) {
10359                         throw new Error("initializeWasm() must be awaited first!");
10360                 }
10361                 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
10362                 // debug statements here
10363         }
10364         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10365         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10366                 if(!isWasmInitialized) {
10367                         throw new Error("initializeWasm() must be awaited first!");
10368                 }
10369                 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
10370                 return decodeArray(nativeResponseValue);
10371         }
10372         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10373         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10374                 if(!isWasmInitialized) {
10375                         throw new Error("initializeWasm() must be awaited first!");
10376                 }
10377                 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10378                 // debug statements here
10379         }
10380         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10381         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
10382                 if(!isWasmInitialized) {
10383                         throw new Error("initializeWasm() must be awaited first!");
10384                 }
10385                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
10386                 return decodeArray(nativeResponseValue);
10387         }
10388         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10389         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10390                 if(!isWasmInitialized) {
10391                         throw new Error("initializeWasm() must be awaited first!");
10392                 }
10393                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
10394                 // debug statements here
10395         }
10396         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10397         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
10398                 if(!isWasmInitialized) {
10399                         throw new Error("initializeWasm() must be awaited first!");
10400                 }
10401                 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
10402                 return decodeArray(nativeResponseValue);
10403         }
10404         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10405         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10406                 if(!isWasmInitialized) {
10407                         throw new Error("initializeWasm() must be awaited first!");
10408                 }
10409                 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
10410                 // debug statements here
10411         }
10412         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
10413         export function AcceptChannel_clone(orig: number): number {
10414                 if(!isWasmInitialized) {
10415                         throw new Error("initializeWasm() must be awaited first!");
10416                 }
10417                 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
10418                 return nativeResponseValue;
10419         }
10420         // void FundingCreated_free(struct LDKFundingCreated this_obj);
10421         export function FundingCreated_free(this_obj: number): void {
10422                 if(!isWasmInitialized) {
10423                         throw new Error("initializeWasm() must be awaited first!");
10424                 }
10425                 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
10426                 // debug statements here
10427         }
10428         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
10429         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
10430                 if(!isWasmInitialized) {
10431                         throw new Error("initializeWasm() must be awaited first!");
10432                 }
10433                 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
10434                 return decodeArray(nativeResponseValue);
10435         }
10436         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10437         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
10438                 if(!isWasmInitialized) {
10439                         throw new Error("initializeWasm() must be awaited first!");
10440                 }
10441                 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
10442                 // debug statements here
10443         }
10444         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
10445         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
10446                 if(!isWasmInitialized) {
10447                         throw new Error("initializeWasm() must be awaited first!");
10448                 }
10449                 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
10450                 return decodeArray(nativeResponseValue);
10451         }
10452         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10453         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
10454                 if(!isWasmInitialized) {
10455                         throw new Error("initializeWasm() must be awaited first!");
10456                 }
10457                 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
10458                 // debug statements here
10459         }
10460         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
10461         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
10462                 if(!isWasmInitialized) {
10463                         throw new Error("initializeWasm() must be awaited first!");
10464                 }
10465                 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
10466                 return nativeResponseValue;
10467         }
10468         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
10469         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
10470                 if(!isWasmInitialized) {
10471                         throw new Error("initializeWasm() must be awaited first!");
10472                 }
10473                 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
10474                 // debug statements here
10475         }
10476         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
10477         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
10478                 if(!isWasmInitialized) {
10479                         throw new Error("initializeWasm() must be awaited first!");
10480                 }
10481                 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
10482                 return decodeArray(nativeResponseValue);
10483         }
10484         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
10485         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
10486                 if(!isWasmInitialized) {
10487                         throw new Error("initializeWasm() must be awaited first!");
10488                 }
10489                 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
10490                 // debug statements here
10491         }
10492         // 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);
10493         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
10494                 if(!isWasmInitialized) {
10495                         throw new Error("initializeWasm() must be awaited first!");
10496                 }
10497                 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
10498                 return nativeResponseValue;
10499         }
10500         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
10501         export function FundingCreated_clone(orig: number): number {
10502                 if(!isWasmInitialized) {
10503                         throw new Error("initializeWasm() must be awaited first!");
10504                 }
10505                 const nativeResponseValue = wasm.FundingCreated_clone(orig);
10506                 return nativeResponseValue;
10507         }
10508         // void FundingSigned_free(struct LDKFundingSigned this_obj);
10509         export function FundingSigned_free(this_obj: number): void {
10510                 if(!isWasmInitialized) {
10511                         throw new Error("initializeWasm() must be awaited first!");
10512                 }
10513                 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
10514                 // debug statements here
10515         }
10516         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
10517         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
10518                 if(!isWasmInitialized) {
10519                         throw new Error("initializeWasm() must be awaited first!");
10520                 }
10521                 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
10522                 return decodeArray(nativeResponseValue);
10523         }
10524         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10525         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
10526                 if(!isWasmInitialized) {
10527                         throw new Error("initializeWasm() must be awaited first!");
10528                 }
10529                 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
10530                 // debug statements here
10531         }
10532         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
10533         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
10534                 if(!isWasmInitialized) {
10535                         throw new Error("initializeWasm() must be awaited first!");
10536                 }
10537                 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
10538                 return decodeArray(nativeResponseValue);
10539         }
10540         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
10541         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
10542                 if(!isWasmInitialized) {
10543                         throw new Error("initializeWasm() must be awaited first!");
10544                 }
10545                 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
10546                 // debug statements here
10547         }
10548         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
10549         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
10550                 if(!isWasmInitialized) {
10551                         throw new Error("initializeWasm() must be awaited first!");
10552                 }
10553                 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
10554                 return nativeResponseValue;
10555         }
10556         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
10557         export function FundingSigned_clone(orig: number): number {
10558                 if(!isWasmInitialized) {
10559                         throw new Error("initializeWasm() must be awaited first!");
10560                 }
10561                 const nativeResponseValue = wasm.FundingSigned_clone(orig);
10562                 return nativeResponseValue;
10563         }
10564         // void FundingLocked_free(struct LDKFundingLocked this_obj);
10565         export function FundingLocked_free(this_obj: number): void {
10566                 if(!isWasmInitialized) {
10567                         throw new Error("initializeWasm() must be awaited first!");
10568                 }
10569                 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
10570                 // debug statements here
10571         }
10572         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
10573         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
10574                 if(!isWasmInitialized) {
10575                         throw new Error("initializeWasm() must be awaited first!");
10576                 }
10577                 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
10578                 return decodeArray(nativeResponseValue);
10579         }
10580         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10581         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
10582                 if(!isWasmInitialized) {
10583                         throw new Error("initializeWasm() must be awaited first!");
10584                 }
10585                 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
10586                 // debug statements here
10587         }
10588         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
10589         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
10590                 if(!isWasmInitialized) {
10591                         throw new Error("initializeWasm() must be awaited first!");
10592                 }
10593                 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
10594                 return decodeArray(nativeResponseValue);
10595         }
10596         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10597         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10598                 if(!isWasmInitialized) {
10599                         throw new Error("initializeWasm() must be awaited first!");
10600                 }
10601                 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
10602                 // debug statements here
10603         }
10604         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
10605         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
10606                 if(!isWasmInitialized) {
10607                         throw new Error("initializeWasm() must be awaited first!");
10608                 }
10609                 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
10610                 return nativeResponseValue;
10611         }
10612         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
10613         export function FundingLocked_clone(orig: number): number {
10614                 if(!isWasmInitialized) {
10615                         throw new Error("initializeWasm() must be awaited first!");
10616                 }
10617                 const nativeResponseValue = wasm.FundingLocked_clone(orig);
10618                 return nativeResponseValue;
10619         }
10620         // void Shutdown_free(struct LDKShutdown this_obj);
10621         export function Shutdown_free(this_obj: number): void {
10622                 if(!isWasmInitialized) {
10623                         throw new Error("initializeWasm() must be awaited first!");
10624                 }
10625                 const nativeResponseValue = wasm.Shutdown_free(this_obj);
10626                 // debug statements here
10627         }
10628         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
10629         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
10630                 if(!isWasmInitialized) {
10631                         throw new Error("initializeWasm() must be awaited first!");
10632                 }
10633                 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
10634                 return decodeArray(nativeResponseValue);
10635         }
10636         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10637         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
10638                 if(!isWasmInitialized) {
10639                         throw new Error("initializeWasm() must be awaited first!");
10640                 }
10641                 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
10642                 // debug statements here
10643         }
10644         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
10645         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
10646                 if(!isWasmInitialized) {
10647                         throw new Error("initializeWasm() must be awaited first!");
10648                 }
10649                 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
10650                 return decodeArray(nativeResponseValue);
10651         }
10652         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
10653         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
10654                 if(!isWasmInitialized) {
10655                         throw new Error("initializeWasm() must be awaited first!");
10656                 }
10657                 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
10658                 // debug statements here
10659         }
10660         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
10661         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
10662                 if(!isWasmInitialized) {
10663                         throw new Error("initializeWasm() must be awaited first!");
10664                 }
10665                 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
10666                 return nativeResponseValue;
10667         }
10668         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
10669         export function Shutdown_clone(orig: number): number {
10670                 if(!isWasmInitialized) {
10671                         throw new Error("initializeWasm() must be awaited first!");
10672                 }
10673                 const nativeResponseValue = wasm.Shutdown_clone(orig);
10674                 return nativeResponseValue;
10675         }
10676         // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
10677         export function ClosingSignedFeeRange_free(this_obj: number): void {
10678                 if(!isWasmInitialized) {
10679                         throw new Error("initializeWasm() must be awaited first!");
10680                 }
10681                 const nativeResponseValue = wasm.ClosingSignedFeeRange_free(this_obj);
10682                 // debug statements here
10683         }
10684         // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
10685         export function ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr: number): number {
10686                 if(!isWasmInitialized) {
10687                         throw new Error("initializeWasm() must be awaited first!");
10688                 }
10689                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr);
10690                 return nativeResponseValue;
10691         }
10692         // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
10693         export function ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr: number, val: number): void {
10694                 if(!isWasmInitialized) {
10695                         throw new Error("initializeWasm() must be awaited first!");
10696                 }
10697                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr, val);
10698                 // debug statements here
10699         }
10700         // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
10701         export function ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr: number): number {
10702                 if(!isWasmInitialized) {
10703                         throw new Error("initializeWasm() must be awaited first!");
10704                 }
10705                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr);
10706                 return nativeResponseValue;
10707         }
10708         // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
10709         export function ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr: number, val: number): void {
10710                 if(!isWasmInitialized) {
10711                         throw new Error("initializeWasm() must be awaited first!");
10712                 }
10713                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr, val);
10714                 // debug statements here
10715         }
10716         // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
10717         export function ClosingSignedFeeRange_new(min_fee_satoshis_arg: number, max_fee_satoshis_arg: number): number {
10718                 if(!isWasmInitialized) {
10719                         throw new Error("initializeWasm() must be awaited first!");
10720                 }
10721                 const nativeResponseValue = wasm.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
10722                 return nativeResponseValue;
10723         }
10724         // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
10725         export function ClosingSignedFeeRange_clone(orig: number): number {
10726                 if(!isWasmInitialized) {
10727                         throw new Error("initializeWasm() must be awaited first!");
10728                 }
10729                 const nativeResponseValue = wasm.ClosingSignedFeeRange_clone(orig);
10730                 return nativeResponseValue;
10731         }
10732         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
10733         export function ClosingSigned_free(this_obj: number): void {
10734                 if(!isWasmInitialized) {
10735                         throw new Error("initializeWasm() must be awaited first!");
10736                 }
10737                 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
10738                 // debug statements here
10739         }
10740         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
10741         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
10742                 if(!isWasmInitialized) {
10743                         throw new Error("initializeWasm() must be awaited first!");
10744                 }
10745                 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
10746                 return decodeArray(nativeResponseValue);
10747         }
10748         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10749         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
10750                 if(!isWasmInitialized) {
10751                         throw new Error("initializeWasm() must be awaited first!");
10752                 }
10753                 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
10754                 // debug statements here
10755         }
10756         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
10757         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
10758                 if(!isWasmInitialized) {
10759                         throw new Error("initializeWasm() must be awaited first!");
10760                 }
10761                 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
10762                 return nativeResponseValue;
10763         }
10764         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
10765         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
10766                 if(!isWasmInitialized) {
10767                         throw new Error("initializeWasm() must be awaited first!");
10768                 }
10769                 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
10770                 // debug statements here
10771         }
10772         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
10773         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
10774                 if(!isWasmInitialized) {
10775                         throw new Error("initializeWasm() must be awaited first!");
10776                 }
10777                 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
10778                 return decodeArray(nativeResponseValue);
10779         }
10780         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
10781         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
10782                 if(!isWasmInitialized) {
10783                         throw new Error("initializeWasm() must be awaited first!");
10784                 }
10785                 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
10786                 // debug statements here
10787         }
10788         // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
10789         export function ClosingSigned_get_fee_range(this_ptr: number): number {
10790                 if(!isWasmInitialized) {
10791                         throw new Error("initializeWasm() must be awaited first!");
10792                 }
10793                 const nativeResponseValue = wasm.ClosingSigned_get_fee_range(this_ptr);
10794                 return nativeResponseValue;
10795         }
10796         // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
10797         export function ClosingSigned_set_fee_range(this_ptr: number, val: number): void {
10798                 if(!isWasmInitialized) {
10799                         throw new Error("initializeWasm() must be awaited first!");
10800                 }
10801                 const nativeResponseValue = wasm.ClosingSigned_set_fee_range(this_ptr, val);
10802                 // debug statements here
10803         }
10804         // 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);
10805         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array, fee_range_arg: number): number {
10806                 if(!isWasmInitialized) {
10807                         throw new Error("initializeWasm() must be awaited first!");
10808                 }
10809                 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg), fee_range_arg);
10810                 return nativeResponseValue;
10811         }
10812         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
10813         export function ClosingSigned_clone(orig: number): number {
10814                 if(!isWasmInitialized) {
10815                         throw new Error("initializeWasm() must be awaited first!");
10816                 }
10817                 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
10818                 return nativeResponseValue;
10819         }
10820         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
10821         export function UpdateAddHTLC_free(this_obj: number): void {
10822                 if(!isWasmInitialized) {
10823                         throw new Error("initializeWasm() must be awaited first!");
10824                 }
10825                 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
10826                 // debug statements here
10827         }
10828         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
10829         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
10830                 if(!isWasmInitialized) {
10831                         throw new Error("initializeWasm() must be awaited first!");
10832                 }
10833                 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
10834                 return decodeArray(nativeResponseValue);
10835         }
10836         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10837         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
10838                 if(!isWasmInitialized) {
10839                         throw new Error("initializeWasm() must be awaited first!");
10840                 }
10841                 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
10842                 // debug statements here
10843         }
10844         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
10845         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
10846                 if(!isWasmInitialized) {
10847                         throw new Error("initializeWasm() must be awaited first!");
10848                 }
10849                 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
10850                 return nativeResponseValue;
10851         }
10852         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
10853         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
10854                 if(!isWasmInitialized) {
10855                         throw new Error("initializeWasm() must be awaited first!");
10856                 }
10857                 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
10858                 // debug statements here
10859         }
10860         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
10861         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
10862                 if(!isWasmInitialized) {
10863                         throw new Error("initializeWasm() must be awaited first!");
10864                 }
10865                 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
10866                 return nativeResponseValue;
10867         }
10868         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
10869         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
10870                 if(!isWasmInitialized) {
10871                         throw new Error("initializeWasm() must be awaited first!");
10872                 }
10873                 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
10874                 // debug statements here
10875         }
10876         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
10877         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
10878                 if(!isWasmInitialized) {
10879                         throw new Error("initializeWasm() must be awaited first!");
10880                 }
10881                 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
10882                 return decodeArray(nativeResponseValue);
10883         }
10884         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10885         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
10886                 if(!isWasmInitialized) {
10887                         throw new Error("initializeWasm() must be awaited first!");
10888                 }
10889                 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
10890                 // debug statements here
10891         }
10892         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
10893         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
10894                 if(!isWasmInitialized) {
10895                         throw new Error("initializeWasm() must be awaited first!");
10896                 }
10897                 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
10898                 return nativeResponseValue;
10899         }
10900         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
10901         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
10902                 if(!isWasmInitialized) {
10903                         throw new Error("initializeWasm() must be awaited first!");
10904                 }
10905                 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
10906                 // debug statements here
10907         }
10908         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
10909         export function UpdateAddHTLC_clone(orig: number): number {
10910                 if(!isWasmInitialized) {
10911                         throw new Error("initializeWasm() must be awaited first!");
10912                 }
10913                 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
10914                 return nativeResponseValue;
10915         }
10916         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
10917         export function UpdateFulfillHTLC_free(this_obj: number): void {
10918                 if(!isWasmInitialized) {
10919                         throw new Error("initializeWasm() must be awaited first!");
10920                 }
10921                 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
10922                 // debug statements here
10923         }
10924         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
10925         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
10926                 if(!isWasmInitialized) {
10927                         throw new Error("initializeWasm() must be awaited first!");
10928                 }
10929                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
10930                 return decodeArray(nativeResponseValue);
10931         }
10932         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10933         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
10934                 if(!isWasmInitialized) {
10935                         throw new Error("initializeWasm() must be awaited first!");
10936                 }
10937                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
10938                 // debug statements here
10939         }
10940         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
10941         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
10942                 if(!isWasmInitialized) {
10943                         throw new Error("initializeWasm() must be awaited first!");
10944                 }
10945                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
10946                 return nativeResponseValue;
10947         }
10948         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
10949         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
10950                 if(!isWasmInitialized) {
10951                         throw new Error("initializeWasm() must be awaited first!");
10952                 }
10953                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
10954                 // debug statements here
10955         }
10956         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
10957         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
10958                 if(!isWasmInitialized) {
10959                         throw new Error("initializeWasm() must be awaited first!");
10960                 }
10961                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
10962                 return decodeArray(nativeResponseValue);
10963         }
10964         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10965         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
10966                 if(!isWasmInitialized) {
10967                         throw new Error("initializeWasm() must be awaited first!");
10968                 }
10969                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
10970                 // debug statements here
10971         }
10972         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
10973         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
10974                 if(!isWasmInitialized) {
10975                         throw new Error("initializeWasm() must be awaited first!");
10976                 }
10977                 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
10978                 return nativeResponseValue;
10979         }
10980         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
10981         export function UpdateFulfillHTLC_clone(orig: number): number {
10982                 if(!isWasmInitialized) {
10983                         throw new Error("initializeWasm() must be awaited first!");
10984                 }
10985                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
10986                 return nativeResponseValue;
10987         }
10988         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
10989         export function UpdateFailHTLC_free(this_obj: number): void {
10990                 if(!isWasmInitialized) {
10991                         throw new Error("initializeWasm() must be awaited first!");
10992                 }
10993                 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
10994                 // debug statements here
10995         }
10996         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
10997         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
10998                 if(!isWasmInitialized) {
10999                         throw new Error("initializeWasm() must be awaited first!");
11000                 }
11001                 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
11002                 return decodeArray(nativeResponseValue);
11003         }
11004         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11005         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11006                 if(!isWasmInitialized) {
11007                         throw new Error("initializeWasm() must be awaited first!");
11008                 }
11009                 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
11010                 // debug statements here
11011         }
11012         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
11013         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
11014                 if(!isWasmInitialized) {
11015                         throw new Error("initializeWasm() must be awaited first!");
11016                 }
11017                 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
11018                 return nativeResponseValue;
11019         }
11020         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
11021         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
11022                 if(!isWasmInitialized) {
11023                         throw new Error("initializeWasm() must be awaited first!");
11024                 }
11025                 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
11026                 // debug statements here
11027         }
11028         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
11029         export function UpdateFailHTLC_clone(orig: number): number {
11030                 if(!isWasmInitialized) {
11031                         throw new Error("initializeWasm() must be awaited first!");
11032                 }
11033                 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
11034                 return nativeResponseValue;
11035         }
11036         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
11037         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
11038                 if(!isWasmInitialized) {
11039                         throw new Error("initializeWasm() must be awaited first!");
11040                 }
11041                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
11042                 // debug statements here
11043         }
11044         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
11045         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
11046                 if(!isWasmInitialized) {
11047                         throw new Error("initializeWasm() must be awaited first!");
11048                 }
11049                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
11050                 return decodeArray(nativeResponseValue);
11051         }
11052         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11053         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11054                 if(!isWasmInitialized) {
11055                         throw new Error("initializeWasm() must be awaited first!");
11056                 }
11057                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
11058                 // debug statements here
11059         }
11060         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
11061         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
11062                 if(!isWasmInitialized) {
11063                         throw new Error("initializeWasm() must be awaited first!");
11064                 }
11065                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
11066                 return nativeResponseValue;
11067         }
11068         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
11069         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
11070                 if(!isWasmInitialized) {
11071                         throw new Error("initializeWasm() must be awaited first!");
11072                 }
11073                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
11074                 // debug statements here
11075         }
11076         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
11077         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
11078                 if(!isWasmInitialized) {
11079                         throw new Error("initializeWasm() must be awaited first!");
11080                 }
11081                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
11082                 return nativeResponseValue;
11083         }
11084         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
11085         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
11086                 if(!isWasmInitialized) {
11087                         throw new Error("initializeWasm() must be awaited first!");
11088                 }
11089                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
11090                 // debug statements here
11091         }
11092         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
11093         export function UpdateFailMalformedHTLC_clone(orig: number): number {
11094                 if(!isWasmInitialized) {
11095                         throw new Error("initializeWasm() must be awaited first!");
11096                 }
11097                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
11098                 return nativeResponseValue;
11099         }
11100         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
11101         export function CommitmentSigned_free(this_obj: number): void {
11102                 if(!isWasmInitialized) {
11103                         throw new Error("initializeWasm() must be awaited first!");
11104                 }
11105                 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
11106                 // debug statements here
11107         }
11108         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
11109         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
11110                 if(!isWasmInitialized) {
11111                         throw new Error("initializeWasm() must be awaited first!");
11112                 }
11113                 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
11114                 return decodeArray(nativeResponseValue);
11115         }
11116         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11117         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
11118                 if(!isWasmInitialized) {
11119                         throw new Error("initializeWasm() must be awaited first!");
11120                 }
11121                 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
11122                 // debug statements here
11123         }
11124         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
11125         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
11126                 if(!isWasmInitialized) {
11127                         throw new Error("initializeWasm() must be awaited first!");
11128                 }
11129                 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
11130                 return decodeArray(nativeResponseValue);
11131         }
11132         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
11133         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
11134                 if(!isWasmInitialized) {
11135                         throw new Error("initializeWasm() must be awaited first!");
11136                 }
11137                 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
11138                 // debug statements here
11139         }
11140         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
11141         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
11142                 if(!isWasmInitialized) {
11143                         throw new Error("initializeWasm() must be awaited first!");
11144                 }
11145                 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
11146                 // debug statements here
11147         }
11148         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
11149         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
11150                 if(!isWasmInitialized) {
11151                         throw new Error("initializeWasm() must be awaited first!");
11152                 }
11153                 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
11154                 return nativeResponseValue;
11155         }
11156         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
11157         export function CommitmentSigned_clone(orig: number): number {
11158                 if(!isWasmInitialized) {
11159                         throw new Error("initializeWasm() must be awaited first!");
11160                 }
11161                 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
11162                 return nativeResponseValue;
11163         }
11164         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
11165         export function RevokeAndACK_free(this_obj: number): void {
11166                 if(!isWasmInitialized) {
11167                         throw new Error("initializeWasm() must be awaited first!");
11168                 }
11169                 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
11170                 // debug statements here
11171         }
11172         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
11173         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
11174                 if(!isWasmInitialized) {
11175                         throw new Error("initializeWasm() must be awaited first!");
11176                 }
11177                 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
11178                 return decodeArray(nativeResponseValue);
11179         }
11180         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11181         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
11182                 if(!isWasmInitialized) {
11183                         throw new Error("initializeWasm() must be awaited first!");
11184                 }
11185                 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
11186                 // debug statements here
11187         }
11188         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
11189         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
11190                 if(!isWasmInitialized) {
11191                         throw new Error("initializeWasm() must be awaited first!");
11192                 }
11193                 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
11194                 return decodeArray(nativeResponseValue);
11195         }
11196         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11197         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
11198                 if(!isWasmInitialized) {
11199                         throw new Error("initializeWasm() must be awaited first!");
11200                 }
11201                 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
11202                 // debug statements here
11203         }
11204         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
11205         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
11206                 if(!isWasmInitialized) {
11207                         throw new Error("initializeWasm() must be awaited first!");
11208                 }
11209                 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
11210                 return decodeArray(nativeResponseValue);
11211         }
11212         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11213         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11214                 if(!isWasmInitialized) {
11215                         throw new Error("initializeWasm() must be awaited first!");
11216                 }
11217                 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
11218                 // debug statements here
11219         }
11220         // 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);
11221         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
11222                 if(!isWasmInitialized) {
11223                         throw new Error("initializeWasm() must be awaited first!");
11224                 }
11225                 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
11226                 return nativeResponseValue;
11227         }
11228         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
11229         export function RevokeAndACK_clone(orig: number): number {
11230                 if(!isWasmInitialized) {
11231                         throw new Error("initializeWasm() must be awaited first!");
11232                 }
11233                 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
11234                 return nativeResponseValue;
11235         }
11236         // void UpdateFee_free(struct LDKUpdateFee this_obj);
11237         export function UpdateFee_free(this_obj: number): void {
11238                 if(!isWasmInitialized) {
11239                         throw new Error("initializeWasm() must be awaited first!");
11240                 }
11241                 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
11242                 // debug statements here
11243         }
11244         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
11245         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
11246                 if(!isWasmInitialized) {
11247                         throw new Error("initializeWasm() must be awaited first!");
11248                 }
11249                 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
11250                 return decodeArray(nativeResponseValue);
11251         }
11252         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11253         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
11254                 if(!isWasmInitialized) {
11255                         throw new Error("initializeWasm() must be awaited first!");
11256                 }
11257                 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
11258                 // debug statements here
11259         }
11260         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
11261         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
11262                 if(!isWasmInitialized) {
11263                         throw new Error("initializeWasm() must be awaited first!");
11264                 }
11265                 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
11266                 return nativeResponseValue;
11267         }
11268         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
11269         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
11270                 if(!isWasmInitialized) {
11271                         throw new Error("initializeWasm() must be awaited first!");
11272                 }
11273                 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
11274                 // debug statements here
11275         }
11276         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
11277         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
11278                 if(!isWasmInitialized) {
11279                         throw new Error("initializeWasm() must be awaited first!");
11280                 }
11281                 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
11282                 return nativeResponseValue;
11283         }
11284         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
11285         export function UpdateFee_clone(orig: number): number {
11286                 if(!isWasmInitialized) {
11287                         throw new Error("initializeWasm() must be awaited first!");
11288                 }
11289                 const nativeResponseValue = wasm.UpdateFee_clone(orig);
11290                 return nativeResponseValue;
11291         }
11292         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
11293         export function DataLossProtect_free(this_obj: number): void {
11294                 if(!isWasmInitialized) {
11295                         throw new Error("initializeWasm() must be awaited first!");
11296                 }
11297                 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
11298                 // debug statements here
11299         }
11300         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
11301         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
11302                 if(!isWasmInitialized) {
11303                         throw new Error("initializeWasm() must be awaited first!");
11304                 }
11305                 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
11306                 return decodeArray(nativeResponseValue);
11307         }
11308         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11309         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
11310                 if(!isWasmInitialized) {
11311                         throw new Error("initializeWasm() must be awaited first!");
11312                 }
11313                 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
11314                 // debug statements here
11315         }
11316         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
11317         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
11318                 if(!isWasmInitialized) {
11319                         throw new Error("initializeWasm() must be awaited first!");
11320                 }
11321                 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
11322                 return decodeArray(nativeResponseValue);
11323         }
11324         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11325         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11326                 if(!isWasmInitialized) {
11327                         throw new Error("initializeWasm() must be awaited first!");
11328                 }
11329                 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
11330                 // debug statements here
11331         }
11332         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
11333         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
11334                 if(!isWasmInitialized) {
11335                         throw new Error("initializeWasm() must be awaited first!");
11336                 }
11337                 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
11338                 return nativeResponseValue;
11339         }
11340         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
11341         export function DataLossProtect_clone(orig: number): number {
11342                 if(!isWasmInitialized) {
11343                         throw new Error("initializeWasm() must be awaited first!");
11344                 }
11345                 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
11346                 return nativeResponseValue;
11347         }
11348         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
11349         export function ChannelReestablish_free(this_obj: number): void {
11350                 if(!isWasmInitialized) {
11351                         throw new Error("initializeWasm() must be awaited first!");
11352                 }
11353                 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
11354                 // debug statements here
11355         }
11356         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
11357         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
11358                 if(!isWasmInitialized) {
11359                         throw new Error("initializeWasm() must be awaited first!");
11360                 }
11361                 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
11362                 return decodeArray(nativeResponseValue);
11363         }
11364         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11365         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
11366                 if(!isWasmInitialized) {
11367                         throw new Error("initializeWasm() must be awaited first!");
11368                 }
11369                 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
11370                 // debug statements here
11371         }
11372         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
11373         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
11374                 if(!isWasmInitialized) {
11375                         throw new Error("initializeWasm() must be awaited first!");
11376                 }
11377                 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
11378                 return nativeResponseValue;
11379         }
11380         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
11381         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
11382                 if(!isWasmInitialized) {
11383                         throw new Error("initializeWasm() must be awaited first!");
11384                 }
11385                 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
11386                 // debug statements here
11387         }
11388         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
11389         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
11390                 if(!isWasmInitialized) {
11391                         throw new Error("initializeWasm() must be awaited first!");
11392                 }
11393                 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
11394                 return nativeResponseValue;
11395         }
11396         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
11397         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
11398                 if(!isWasmInitialized) {
11399                         throw new Error("initializeWasm() must be awaited first!");
11400                 }
11401                 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
11402                 // debug statements here
11403         }
11404         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
11405         export function ChannelReestablish_clone(orig: number): number {
11406                 if(!isWasmInitialized) {
11407                         throw new Error("initializeWasm() must be awaited first!");
11408                 }
11409                 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
11410                 return nativeResponseValue;
11411         }
11412         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
11413         export function AnnouncementSignatures_free(this_obj: number): void {
11414                 if(!isWasmInitialized) {
11415                         throw new Error("initializeWasm() must be awaited first!");
11416                 }
11417                 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
11418                 // debug statements here
11419         }
11420         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
11421         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
11422                 if(!isWasmInitialized) {
11423                         throw new Error("initializeWasm() must be awaited first!");
11424                 }
11425                 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
11426                 return decodeArray(nativeResponseValue);
11427         }
11428         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11429         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
11430                 if(!isWasmInitialized) {
11431                         throw new Error("initializeWasm() must be awaited first!");
11432                 }
11433                 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
11434                 // debug statements here
11435         }
11436         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
11437         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
11438                 if(!isWasmInitialized) {
11439                         throw new Error("initializeWasm() must be awaited first!");
11440                 }
11441                 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
11442                 return nativeResponseValue;
11443         }
11444         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
11445         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
11446                 if(!isWasmInitialized) {
11447                         throw new Error("initializeWasm() must be awaited first!");
11448                 }
11449                 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
11450                 // debug statements here
11451         }
11452         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
11453         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
11454                 if(!isWasmInitialized) {
11455                         throw new Error("initializeWasm() must be awaited first!");
11456                 }
11457                 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
11458                 return decodeArray(nativeResponseValue);
11459         }
11460         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
11461         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
11462                 if(!isWasmInitialized) {
11463                         throw new Error("initializeWasm() must be awaited first!");
11464                 }
11465                 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
11466                 // debug statements here
11467         }
11468         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
11469         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
11470                 if(!isWasmInitialized) {
11471                         throw new Error("initializeWasm() must be awaited first!");
11472                 }
11473                 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
11474                 return decodeArray(nativeResponseValue);
11475         }
11476         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
11477         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
11478                 if(!isWasmInitialized) {
11479                         throw new Error("initializeWasm() must be awaited first!");
11480                 }
11481                 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
11482                 // debug statements here
11483         }
11484         // 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);
11485         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
11486                 if(!isWasmInitialized) {
11487                         throw new Error("initializeWasm() must be awaited first!");
11488                 }
11489                 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
11490                 return nativeResponseValue;
11491         }
11492         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
11493         export function AnnouncementSignatures_clone(orig: number): number {
11494                 if(!isWasmInitialized) {
11495                         throw new Error("initializeWasm() must be awaited first!");
11496                 }
11497                 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
11498                 return nativeResponseValue;
11499         }
11500         // void NetAddress_free(struct LDKNetAddress this_ptr);
11501         export function NetAddress_free(this_ptr: number): void {
11502                 if(!isWasmInitialized) {
11503                         throw new Error("initializeWasm() must be awaited first!");
11504                 }
11505                 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
11506                 // debug statements here
11507         }
11508         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
11509         export function NetAddress_clone(orig: number): number {
11510                 if(!isWasmInitialized) {
11511                         throw new Error("initializeWasm() must be awaited first!");
11512                 }
11513                 const nativeResponseValue = wasm.NetAddress_clone(orig);
11514                 return nativeResponseValue;
11515         }
11516         // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
11517         export function NetAddress_ipv4(addr: Uint8Array, port: number): number {
11518                 if(!isWasmInitialized) {
11519                         throw new Error("initializeWasm() must be awaited first!");
11520                 }
11521                 const nativeResponseValue = wasm.NetAddress_ipv4(encodeArray(addr), port);
11522                 return nativeResponseValue;
11523         }
11524         // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
11525         export function NetAddress_ipv6(addr: Uint8Array, port: number): number {
11526                 if(!isWasmInitialized) {
11527                         throw new Error("initializeWasm() must be awaited first!");
11528                 }
11529                 const nativeResponseValue = wasm.NetAddress_ipv6(encodeArray(addr), port);
11530                 return nativeResponseValue;
11531         }
11532         // struct LDKNetAddress NetAddress_onion_v2(struct LDKTenBytes addr, uint16_t port);
11533         export function NetAddress_onion_v2(addr: Uint8Array, port: number): number {
11534                 if(!isWasmInitialized) {
11535                         throw new Error("initializeWasm() must be awaited first!");
11536                 }
11537                 const nativeResponseValue = wasm.NetAddress_onion_v2(encodeArray(addr), port);
11538                 return nativeResponseValue;
11539         }
11540         // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
11541         export function NetAddress_onion_v3(ed25519_pubkey: Uint8Array, checksum: number, version: number, port: number): number {
11542                 if(!isWasmInitialized) {
11543                         throw new Error("initializeWasm() must be awaited first!");
11544                 }
11545                 const nativeResponseValue = wasm.NetAddress_onion_v3(encodeArray(ed25519_pubkey), checksum, version, port);
11546                 return nativeResponseValue;
11547         }
11548         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
11549         export function NetAddress_write(obj: number): Uint8Array {
11550                 if(!isWasmInitialized) {
11551                         throw new Error("initializeWasm() must be awaited first!");
11552                 }
11553                 const nativeResponseValue = wasm.NetAddress_write(obj);
11554                 return decodeArray(nativeResponseValue);
11555         }
11556         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
11557         export function Result_read(ser: Uint8Array): number {
11558                 if(!isWasmInitialized) {
11559                         throw new Error("initializeWasm() must be awaited first!");
11560                 }
11561                 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
11562                 return nativeResponseValue;
11563         }
11564         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
11565         export function NetAddress_read(ser: Uint8Array): number {
11566                 if(!isWasmInitialized) {
11567                         throw new Error("initializeWasm() must be awaited first!");
11568                 }
11569                 const nativeResponseValue = wasm.NetAddress_read(encodeArray(ser));
11570                 return nativeResponseValue;
11571         }
11572         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
11573         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
11574                 if(!isWasmInitialized) {
11575                         throw new Error("initializeWasm() must be awaited first!");
11576                 }
11577                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
11578                 // debug statements here
11579         }
11580         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
11581         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
11582                 if(!isWasmInitialized) {
11583                         throw new Error("initializeWasm() must be awaited first!");
11584                 }
11585                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
11586                 return nativeResponseValue;
11587         }
11588         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
11589         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
11590                 if(!isWasmInitialized) {
11591                         throw new Error("initializeWasm() must be awaited first!");
11592                 }
11593                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
11594                 // debug statements here
11595         }
11596         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
11597         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
11598                 if(!isWasmInitialized) {
11599                         throw new Error("initializeWasm() must be awaited first!");
11600                 }
11601                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
11602                 return nativeResponseValue;
11603         }
11604         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
11605         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
11606                 if(!isWasmInitialized) {
11607                         throw new Error("initializeWasm() must be awaited first!");
11608                 }
11609                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
11610                 // debug statements here
11611         }
11612         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
11613         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
11614                 if(!isWasmInitialized) {
11615                         throw new Error("initializeWasm() must be awaited first!");
11616                 }
11617                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
11618                 return decodeArray(nativeResponseValue);
11619         }
11620         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11621         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
11622                 if(!isWasmInitialized) {
11623                         throw new Error("initializeWasm() must be awaited first!");
11624                 }
11625                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
11626                 // debug statements here
11627         }
11628         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
11629         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
11630                 if(!isWasmInitialized) {
11631                         throw new Error("initializeWasm() must be awaited first!");
11632                 }
11633                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
11634                 return decodeArray(nativeResponseValue);
11635         }
11636         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
11637         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
11638                 if(!isWasmInitialized) {
11639                         throw new Error("initializeWasm() must be awaited first!");
11640                 }
11641                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
11642                 // debug statements here
11643         }
11644         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
11645         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
11646                 if(!isWasmInitialized) {
11647                         throw new Error("initializeWasm() must be awaited first!");
11648                 }
11649                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
11650                 return decodeArray(nativeResponseValue);
11651         }
11652         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11653         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
11654                 if(!isWasmInitialized) {
11655                         throw new Error("initializeWasm() must be awaited first!");
11656                 }
11657                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
11658                 // debug statements here
11659         }
11660         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
11661         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
11662                 if(!isWasmInitialized) {
11663                         throw new Error("initializeWasm() must be awaited first!");
11664                 }
11665                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
11666                 // debug statements here
11667         }
11668         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
11669         export function UnsignedNodeAnnouncement_clone(orig: number): number {
11670                 if(!isWasmInitialized) {
11671                         throw new Error("initializeWasm() must be awaited first!");
11672                 }
11673                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
11674                 return nativeResponseValue;
11675         }
11676         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
11677         export function NodeAnnouncement_free(this_obj: number): void {
11678                 if(!isWasmInitialized) {
11679                         throw new Error("initializeWasm() must be awaited first!");
11680                 }
11681                 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
11682                 // debug statements here
11683         }
11684         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
11685         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
11686                 if(!isWasmInitialized) {
11687                         throw new Error("initializeWasm() must be awaited first!");
11688                 }
11689                 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
11690                 return decodeArray(nativeResponseValue);
11691         }
11692         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
11693         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
11694                 if(!isWasmInitialized) {
11695                         throw new Error("initializeWasm() must be awaited first!");
11696                 }
11697                 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
11698                 // debug statements here
11699         }
11700         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
11701         export function NodeAnnouncement_get_contents(this_ptr: number): number {
11702                 if(!isWasmInitialized) {
11703                         throw new Error("initializeWasm() must be awaited first!");
11704                 }
11705                 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
11706                 return nativeResponseValue;
11707         }
11708         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
11709         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
11710                 if(!isWasmInitialized) {
11711                         throw new Error("initializeWasm() must be awaited first!");
11712                 }
11713                 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
11714                 // debug statements here
11715         }
11716         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
11717         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
11718                 if(!isWasmInitialized) {
11719                         throw new Error("initializeWasm() must be awaited first!");
11720                 }
11721                 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
11722                 return nativeResponseValue;
11723         }
11724         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
11725         export function NodeAnnouncement_clone(orig: number): number {
11726                 if(!isWasmInitialized) {
11727                         throw new Error("initializeWasm() must be awaited first!");
11728                 }
11729                 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
11730                 return nativeResponseValue;
11731         }
11732         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
11733         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
11734                 if(!isWasmInitialized) {
11735                         throw new Error("initializeWasm() must be awaited first!");
11736                 }
11737                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
11738                 // debug statements here
11739         }
11740         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
11741         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
11742                 if(!isWasmInitialized) {
11743                         throw new Error("initializeWasm() must be awaited first!");
11744                 }
11745                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
11746                 return nativeResponseValue;
11747         }
11748         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11749         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
11750                 if(!isWasmInitialized) {
11751                         throw new Error("initializeWasm() must be awaited first!");
11752                 }
11753                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
11754                 // debug statements here
11755         }
11756         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
11757         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
11758                 if(!isWasmInitialized) {
11759                         throw new Error("initializeWasm() must be awaited first!");
11760                 }
11761                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
11762                 return decodeArray(nativeResponseValue);
11763         }
11764         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11765         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11766                 if(!isWasmInitialized) {
11767                         throw new Error("initializeWasm() must be awaited first!");
11768                 }
11769                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
11770                 // debug statements here
11771         }
11772         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
11773         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
11774                 if(!isWasmInitialized) {
11775                         throw new Error("initializeWasm() must be awaited first!");
11776                 }
11777                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
11778                 return nativeResponseValue;
11779         }
11780         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
11781         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
11782                 if(!isWasmInitialized) {
11783                         throw new Error("initializeWasm() must be awaited first!");
11784                 }
11785                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
11786                 // debug statements here
11787         }
11788         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
11789         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
11790                 if(!isWasmInitialized) {
11791                         throw new Error("initializeWasm() must be awaited first!");
11792                 }
11793                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
11794                 return decodeArray(nativeResponseValue);
11795         }
11796         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11797         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
11798                 if(!isWasmInitialized) {
11799                         throw new Error("initializeWasm() must be awaited first!");
11800                 }
11801                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
11802                 // debug statements here
11803         }
11804         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
11805         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
11806                 if(!isWasmInitialized) {
11807                         throw new Error("initializeWasm() must be awaited first!");
11808                 }
11809                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
11810                 return decodeArray(nativeResponseValue);
11811         }
11812         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11813         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
11814                 if(!isWasmInitialized) {
11815                         throw new Error("initializeWasm() must be awaited first!");
11816                 }
11817                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
11818                 // debug statements here
11819         }
11820         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
11821         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
11822                 if(!isWasmInitialized) {
11823                         throw new Error("initializeWasm() must be awaited first!");
11824                 }
11825                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
11826                 return decodeArray(nativeResponseValue);
11827         }
11828         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11829         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
11830                 if(!isWasmInitialized) {
11831                         throw new Error("initializeWasm() must be awaited first!");
11832                 }
11833                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
11834                 // debug statements here
11835         }
11836         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
11837         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
11838                 if(!isWasmInitialized) {
11839                         throw new Error("initializeWasm() must be awaited first!");
11840                 }
11841                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
11842                 return decodeArray(nativeResponseValue);
11843         }
11844         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11845         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
11846                 if(!isWasmInitialized) {
11847                         throw new Error("initializeWasm() must be awaited first!");
11848                 }
11849                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
11850                 // debug statements here
11851         }
11852         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
11853         export function UnsignedChannelAnnouncement_clone(orig: number): number {
11854                 if(!isWasmInitialized) {
11855                         throw new Error("initializeWasm() must be awaited first!");
11856                 }
11857                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
11858                 return nativeResponseValue;
11859         }
11860         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
11861         export function ChannelAnnouncement_free(this_obj: number): void {
11862                 if(!isWasmInitialized) {
11863                         throw new Error("initializeWasm() must be awaited first!");
11864                 }
11865                 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
11866                 // debug statements here
11867         }
11868         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
11869         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
11870                 if(!isWasmInitialized) {
11871                         throw new Error("initializeWasm() must be awaited first!");
11872                 }
11873                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
11874                 return decodeArray(nativeResponseValue);
11875         }
11876         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
11877         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
11878                 if(!isWasmInitialized) {
11879                         throw new Error("initializeWasm() must be awaited first!");
11880                 }
11881                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
11882                 // debug statements here
11883         }
11884         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
11885         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
11886                 if(!isWasmInitialized) {
11887                         throw new Error("initializeWasm() must be awaited first!");
11888                 }
11889                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
11890                 return decodeArray(nativeResponseValue);
11891         }
11892         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
11893         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
11894                 if(!isWasmInitialized) {
11895                         throw new Error("initializeWasm() must be awaited first!");
11896                 }
11897                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
11898                 // debug statements here
11899         }
11900         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
11901         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
11902                 if(!isWasmInitialized) {
11903                         throw new Error("initializeWasm() must be awaited first!");
11904                 }
11905                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
11906                 return decodeArray(nativeResponseValue);
11907         }
11908         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
11909         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
11910                 if(!isWasmInitialized) {
11911                         throw new Error("initializeWasm() must be awaited first!");
11912                 }
11913                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
11914                 // debug statements here
11915         }
11916         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
11917         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
11918                 if(!isWasmInitialized) {
11919                         throw new Error("initializeWasm() must be awaited first!");
11920                 }
11921                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
11922                 return decodeArray(nativeResponseValue);
11923         }
11924         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
11925         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
11926                 if(!isWasmInitialized) {
11927                         throw new Error("initializeWasm() must be awaited first!");
11928                 }
11929                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
11930                 // debug statements here
11931         }
11932         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
11933         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
11934                 if(!isWasmInitialized) {
11935                         throw new Error("initializeWasm() must be awaited first!");
11936                 }
11937                 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
11938                 return nativeResponseValue;
11939         }
11940         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
11941         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
11942                 if(!isWasmInitialized) {
11943                         throw new Error("initializeWasm() must be awaited first!");
11944                 }
11945                 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
11946                 // debug statements here
11947         }
11948         // 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);
11949         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 {
11950                 if(!isWasmInitialized) {
11951                         throw new Error("initializeWasm() must be awaited first!");
11952                 }
11953                 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);
11954                 return nativeResponseValue;
11955         }
11956         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
11957         export function ChannelAnnouncement_clone(orig: number): number {
11958                 if(!isWasmInitialized) {
11959                         throw new Error("initializeWasm() must be awaited first!");
11960                 }
11961                 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
11962                 return nativeResponseValue;
11963         }
11964         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
11965         export function UnsignedChannelUpdate_free(this_obj: number): void {
11966                 if(!isWasmInitialized) {
11967                         throw new Error("initializeWasm() must be awaited first!");
11968                 }
11969                 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
11970                 // debug statements here
11971         }
11972         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
11973         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
11974                 if(!isWasmInitialized) {
11975                         throw new Error("initializeWasm() must be awaited first!");
11976                 }
11977                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
11978                 return decodeArray(nativeResponseValue);
11979         }
11980         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11981         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11982                 if(!isWasmInitialized) {
11983                         throw new Error("initializeWasm() must be awaited first!");
11984                 }
11985                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
11986                 // debug statements here
11987         }
11988         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
11989         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
11990                 if(!isWasmInitialized) {
11991                         throw new Error("initializeWasm() must be awaited first!");
11992                 }
11993                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
11994                 return nativeResponseValue;
11995         }
11996         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
11997         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
11998                 if(!isWasmInitialized) {
11999                         throw new Error("initializeWasm() must be awaited first!");
12000                 }
12001                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
12002                 // debug statements here
12003         }
12004         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12005         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
12006                 if(!isWasmInitialized) {
12007                         throw new Error("initializeWasm() must be awaited first!");
12008                 }
12009                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
12010                 return nativeResponseValue;
12011         }
12012         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12013         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
12014                 if(!isWasmInitialized) {
12015                         throw new Error("initializeWasm() must be awaited first!");
12016                 }
12017                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
12018                 // debug statements here
12019         }
12020         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12021         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
12022                 if(!isWasmInitialized) {
12023                         throw new Error("initializeWasm() must be awaited first!");
12024                 }
12025                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
12026                 return nativeResponseValue;
12027         }
12028         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
12029         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
12030                 if(!isWasmInitialized) {
12031                         throw new Error("initializeWasm() must be awaited first!");
12032                 }
12033                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
12034                 // debug statements here
12035         }
12036         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12037         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
12038                 if(!isWasmInitialized) {
12039                         throw new Error("initializeWasm() must be awaited first!");
12040                 }
12041                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
12042                 return nativeResponseValue;
12043         }
12044         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
12045         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
12046                 if(!isWasmInitialized) {
12047                         throw new Error("initializeWasm() must be awaited first!");
12048                 }
12049                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
12050                 // debug statements here
12051         }
12052         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12053         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
12054                 if(!isWasmInitialized) {
12055                         throw new Error("initializeWasm() must be awaited first!");
12056                 }
12057                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
12058                 return nativeResponseValue;
12059         }
12060         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
12061         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
12062                 if(!isWasmInitialized) {
12063                         throw new Error("initializeWasm() must be awaited first!");
12064                 }
12065                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
12066                 // debug statements here
12067         }
12068         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12069         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
12070                 if(!isWasmInitialized) {
12071                         throw new Error("initializeWasm() must be awaited first!");
12072                 }
12073                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
12074                 return nativeResponseValue;
12075         }
12076         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12077         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
12078                 if(!isWasmInitialized) {
12079                         throw new Error("initializeWasm() must be awaited first!");
12080                 }
12081                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
12082                 // debug statements here
12083         }
12084         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12085         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
12086                 if(!isWasmInitialized) {
12087                         throw new Error("initializeWasm() must be awaited first!");
12088                 }
12089                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
12090                 return nativeResponseValue;
12091         }
12092         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12093         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
12094                 if(!isWasmInitialized) {
12095                         throw new Error("initializeWasm() must be awaited first!");
12096                 }
12097                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
12098                 // debug statements here
12099         }
12100         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
12101         export function UnsignedChannelUpdate_clone(orig: number): number {
12102                 if(!isWasmInitialized) {
12103                         throw new Error("initializeWasm() must be awaited first!");
12104                 }
12105                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
12106                 return nativeResponseValue;
12107         }
12108         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
12109         export function ChannelUpdate_free(this_obj: number): void {
12110                 if(!isWasmInitialized) {
12111                         throw new Error("initializeWasm() must be awaited first!");
12112                 }
12113                 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
12114                 // debug statements here
12115         }
12116         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
12117         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
12118                 if(!isWasmInitialized) {
12119                         throw new Error("initializeWasm() must be awaited first!");
12120                 }
12121                 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
12122                 return decodeArray(nativeResponseValue);
12123         }
12124         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
12125         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
12126                 if(!isWasmInitialized) {
12127                         throw new Error("initializeWasm() must be awaited first!");
12128                 }
12129                 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
12130                 // debug statements here
12131         }
12132         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
12133         export function ChannelUpdate_get_contents(this_ptr: number): number {
12134                 if(!isWasmInitialized) {
12135                         throw new Error("initializeWasm() must be awaited first!");
12136                 }
12137                 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
12138                 return nativeResponseValue;
12139         }
12140         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
12141         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
12142                 if(!isWasmInitialized) {
12143                         throw new Error("initializeWasm() must be awaited first!");
12144                 }
12145                 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
12146                 // debug statements here
12147         }
12148         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
12149         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
12150                 if(!isWasmInitialized) {
12151                         throw new Error("initializeWasm() must be awaited first!");
12152                 }
12153                 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
12154                 return nativeResponseValue;
12155         }
12156         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
12157         export function ChannelUpdate_clone(orig: number): number {
12158                 if(!isWasmInitialized) {
12159                         throw new Error("initializeWasm() must be awaited first!");
12160                 }
12161                 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
12162                 return nativeResponseValue;
12163         }
12164         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
12165         export function QueryChannelRange_free(this_obj: number): void {
12166                 if(!isWasmInitialized) {
12167                         throw new Error("initializeWasm() must be awaited first!");
12168                 }
12169                 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
12170                 // debug statements here
12171         }
12172         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
12173         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
12174                 if(!isWasmInitialized) {
12175                         throw new Error("initializeWasm() must be awaited first!");
12176                 }
12177                 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
12178                 return decodeArray(nativeResponseValue);
12179         }
12180         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12181         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12182                 if(!isWasmInitialized) {
12183                         throw new Error("initializeWasm() must be awaited first!");
12184                 }
12185                 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
12186                 // debug statements here
12187         }
12188         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
12189         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
12190                 if(!isWasmInitialized) {
12191                         throw new Error("initializeWasm() must be awaited first!");
12192                 }
12193                 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
12194                 return nativeResponseValue;
12195         }
12196         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12197         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
12198                 if(!isWasmInitialized) {
12199                         throw new Error("initializeWasm() must be awaited first!");
12200                 }
12201                 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
12202                 // debug statements here
12203         }
12204         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
12205         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
12206                 if(!isWasmInitialized) {
12207                         throw new Error("initializeWasm() must be awaited first!");
12208                 }
12209                 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
12210                 return nativeResponseValue;
12211         }
12212         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12213         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
12214                 if(!isWasmInitialized) {
12215                         throw new Error("initializeWasm() must be awaited first!");
12216                 }
12217                 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
12218                 // debug statements here
12219         }
12220         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
12221         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
12222                 if(!isWasmInitialized) {
12223                         throw new Error("initializeWasm() must be awaited first!");
12224                 }
12225                 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
12226                 return nativeResponseValue;
12227         }
12228         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
12229         export function QueryChannelRange_clone(orig: number): number {
12230                 if(!isWasmInitialized) {
12231                         throw new Error("initializeWasm() must be awaited first!");
12232                 }
12233                 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
12234                 return nativeResponseValue;
12235         }
12236         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
12237         export function ReplyChannelRange_free(this_obj: number): void {
12238                 if(!isWasmInitialized) {
12239                         throw new Error("initializeWasm() must be awaited first!");
12240                 }
12241                 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
12242                 // debug statements here
12243         }
12244         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
12245         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
12246                 if(!isWasmInitialized) {
12247                         throw new Error("initializeWasm() must be awaited first!");
12248                 }
12249                 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
12250                 return decodeArray(nativeResponseValue);
12251         }
12252         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12253         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12254                 if(!isWasmInitialized) {
12255                         throw new Error("initializeWasm() must be awaited first!");
12256                 }
12257                 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
12258                 // debug statements here
12259         }
12260         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
12261         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
12262                 if(!isWasmInitialized) {
12263                         throw new Error("initializeWasm() must be awaited first!");
12264                 }
12265                 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
12266                 return nativeResponseValue;
12267         }
12268         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12269         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
12270                 if(!isWasmInitialized) {
12271                         throw new Error("initializeWasm() must be awaited first!");
12272                 }
12273                 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
12274                 // debug statements here
12275         }
12276         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
12277         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
12278                 if(!isWasmInitialized) {
12279                         throw new Error("initializeWasm() must be awaited first!");
12280                 }
12281                 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
12282                 return nativeResponseValue;
12283         }
12284         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12285         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
12286                 if(!isWasmInitialized) {
12287                         throw new Error("initializeWasm() must be awaited first!");
12288                 }
12289                 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
12290                 // debug statements here
12291         }
12292         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
12293         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
12294                 if(!isWasmInitialized) {
12295                         throw new Error("initializeWasm() must be awaited first!");
12296                 }
12297                 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
12298                 return nativeResponseValue;
12299         }
12300         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
12301         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
12302                 if(!isWasmInitialized) {
12303                         throw new Error("initializeWasm() must be awaited first!");
12304                 }
12305                 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
12306                 // debug statements here
12307         }
12308         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12309         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
12310                 if(!isWasmInitialized) {
12311                         throw new Error("initializeWasm() must be awaited first!");
12312                 }
12313                 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
12314                 // debug statements here
12315         }
12316         // 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);
12317         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 {
12318                 if(!isWasmInitialized) {
12319                         throw new Error("initializeWasm() must be awaited first!");
12320                 }
12321                 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
12322                 return nativeResponseValue;
12323         }
12324         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
12325         export function ReplyChannelRange_clone(orig: number): number {
12326                 if(!isWasmInitialized) {
12327                         throw new Error("initializeWasm() must be awaited first!");
12328                 }
12329                 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
12330                 return nativeResponseValue;
12331         }
12332         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
12333         export function QueryShortChannelIds_free(this_obj: number): void {
12334                 if(!isWasmInitialized) {
12335                         throw new Error("initializeWasm() must be awaited first!");
12336                 }
12337                 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
12338                 // debug statements here
12339         }
12340         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
12341         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
12342                 if(!isWasmInitialized) {
12343                         throw new Error("initializeWasm() must be awaited first!");
12344                 }
12345                 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
12346                 return decodeArray(nativeResponseValue);
12347         }
12348         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12349         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12350                 if(!isWasmInitialized) {
12351                         throw new Error("initializeWasm() must be awaited first!");
12352                 }
12353                 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
12354                 // debug statements here
12355         }
12356         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12357         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
12358                 if(!isWasmInitialized) {
12359                         throw new Error("initializeWasm() must be awaited first!");
12360                 }
12361                 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
12362                 // debug statements here
12363         }
12364         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
12365         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
12366                 if(!isWasmInitialized) {
12367                         throw new Error("initializeWasm() must be awaited first!");
12368                 }
12369                 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
12370                 return nativeResponseValue;
12371         }
12372         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
12373         export function QueryShortChannelIds_clone(orig: number): number {
12374                 if(!isWasmInitialized) {
12375                         throw new Error("initializeWasm() must be awaited first!");
12376                 }
12377                 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
12378                 return nativeResponseValue;
12379         }
12380         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
12381         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
12382                 if(!isWasmInitialized) {
12383                         throw new Error("initializeWasm() must be awaited first!");
12384                 }
12385                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
12386                 // debug statements here
12387         }
12388         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
12389         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
12390                 if(!isWasmInitialized) {
12391                         throw new Error("initializeWasm() must be awaited first!");
12392                 }
12393                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
12394                 return decodeArray(nativeResponseValue);
12395         }
12396         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12397         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12398                 if(!isWasmInitialized) {
12399                         throw new Error("initializeWasm() must be awaited first!");
12400                 }
12401                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
12402                 // debug statements here
12403         }
12404         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
12405         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
12406                 if(!isWasmInitialized) {
12407                         throw new Error("initializeWasm() must be awaited first!");
12408                 }
12409                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
12410                 return nativeResponseValue;
12411         }
12412         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
12413         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
12414                 if(!isWasmInitialized) {
12415                         throw new Error("initializeWasm() must be awaited first!");
12416                 }
12417                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
12418                 // debug statements here
12419         }
12420         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
12421         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
12422                 if(!isWasmInitialized) {
12423                         throw new Error("initializeWasm() must be awaited first!");
12424                 }
12425                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
12426                 return nativeResponseValue;
12427         }
12428         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
12429         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
12430                 if(!isWasmInitialized) {
12431                         throw new Error("initializeWasm() must be awaited first!");
12432                 }
12433                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
12434                 return nativeResponseValue;
12435         }
12436         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
12437         export function GossipTimestampFilter_free(this_obj: number): void {
12438                 if(!isWasmInitialized) {
12439                         throw new Error("initializeWasm() must be awaited first!");
12440                 }
12441                 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
12442                 // debug statements here
12443         }
12444         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
12445         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
12446                 if(!isWasmInitialized) {
12447                         throw new Error("initializeWasm() must be awaited first!");
12448                 }
12449                 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
12450                 return decodeArray(nativeResponseValue);
12451         }
12452         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12453         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12454                 if(!isWasmInitialized) {
12455                         throw new Error("initializeWasm() must be awaited first!");
12456                 }
12457                 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
12458                 // debug statements here
12459         }
12460         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
12461         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
12462                 if(!isWasmInitialized) {
12463                         throw new Error("initializeWasm() must be awaited first!");
12464                 }
12465                 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
12466                 return nativeResponseValue;
12467         }
12468         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
12469         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
12470                 if(!isWasmInitialized) {
12471                         throw new Error("initializeWasm() must be awaited first!");
12472                 }
12473                 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
12474                 // debug statements here
12475         }
12476         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
12477         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
12478                 if(!isWasmInitialized) {
12479                         throw new Error("initializeWasm() must be awaited first!");
12480                 }
12481                 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
12482                 return nativeResponseValue;
12483         }
12484         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
12485         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
12486                 if(!isWasmInitialized) {
12487                         throw new Error("initializeWasm() must be awaited first!");
12488                 }
12489                 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
12490                 // debug statements here
12491         }
12492         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
12493         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
12494                 if(!isWasmInitialized) {
12495                         throw new Error("initializeWasm() must be awaited first!");
12496                 }
12497                 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
12498                 return nativeResponseValue;
12499         }
12500         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
12501         export function GossipTimestampFilter_clone(orig: number): number {
12502                 if(!isWasmInitialized) {
12503                         throw new Error("initializeWasm() must be awaited first!");
12504                 }
12505                 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
12506                 return nativeResponseValue;
12507         }
12508         // void ErrorAction_free(struct LDKErrorAction this_ptr);
12509         export function ErrorAction_free(this_ptr: number): void {
12510                 if(!isWasmInitialized) {
12511                         throw new Error("initializeWasm() must be awaited first!");
12512                 }
12513                 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
12514                 // debug statements here
12515         }
12516         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
12517         export function ErrorAction_clone(orig: number): number {
12518                 if(!isWasmInitialized) {
12519                         throw new Error("initializeWasm() must be awaited first!");
12520                 }
12521                 const nativeResponseValue = wasm.ErrorAction_clone(orig);
12522                 return nativeResponseValue;
12523         }
12524         // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
12525         export function ErrorAction_disconnect_peer(msg: number): number {
12526                 if(!isWasmInitialized) {
12527                         throw new Error("initializeWasm() must be awaited first!");
12528                 }
12529                 const nativeResponseValue = wasm.ErrorAction_disconnect_peer(msg);
12530                 return nativeResponseValue;
12531         }
12532         // struct LDKErrorAction ErrorAction_ignore_error(void);
12533         export function ErrorAction_ignore_error(): number {
12534                 if(!isWasmInitialized) {
12535                         throw new Error("initializeWasm() must be awaited first!");
12536                 }
12537                 const nativeResponseValue = wasm.ErrorAction_ignore_error();
12538                 return nativeResponseValue;
12539         }
12540         // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
12541         export function ErrorAction_ignore_and_log(a: Level): number {
12542                 if(!isWasmInitialized) {
12543                         throw new Error("initializeWasm() must be awaited first!");
12544                 }
12545                 const nativeResponseValue = wasm.ErrorAction_ignore_and_log(a);
12546                 return nativeResponseValue;
12547         }
12548         // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
12549         export function ErrorAction_send_error_message(msg: number): number {
12550                 if(!isWasmInitialized) {
12551                         throw new Error("initializeWasm() must be awaited first!");
12552                 }
12553                 const nativeResponseValue = wasm.ErrorAction_send_error_message(msg);
12554                 return nativeResponseValue;
12555         }
12556         // void LightningError_free(struct LDKLightningError this_obj);
12557         export function LightningError_free(this_obj: number): void {
12558                 if(!isWasmInitialized) {
12559                         throw new Error("initializeWasm() must be awaited first!");
12560                 }
12561                 const nativeResponseValue = wasm.LightningError_free(this_obj);
12562                 // debug statements here
12563         }
12564         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
12565         export function LightningError_get_err(this_ptr: number): String {
12566                 if(!isWasmInitialized) {
12567                         throw new Error("initializeWasm() must be awaited first!");
12568                 }
12569                 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
12570                 return nativeResponseValue;
12571         }
12572         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
12573         export function LightningError_set_err(this_ptr: number, val: String): void {
12574                 if(!isWasmInitialized) {
12575                         throw new Error("initializeWasm() must be awaited first!");
12576                 }
12577                 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, val);
12578                 // debug statements here
12579         }
12580         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
12581         export function LightningError_get_action(this_ptr: number): number {
12582                 if(!isWasmInitialized) {
12583                         throw new Error("initializeWasm() must be awaited first!");
12584                 }
12585                 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
12586                 return nativeResponseValue;
12587         }
12588         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
12589         export function LightningError_set_action(this_ptr: number, val: number): void {
12590                 if(!isWasmInitialized) {
12591                         throw new Error("initializeWasm() must be awaited first!");
12592                 }
12593                 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
12594                 // debug statements here
12595         }
12596         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
12597         export function LightningError_new(err_arg: String, action_arg: number): number {
12598                 if(!isWasmInitialized) {
12599                         throw new Error("initializeWasm() must be awaited first!");
12600                 }
12601                 const nativeResponseValue = wasm.LightningError_new(err_arg, action_arg);
12602                 return nativeResponseValue;
12603         }
12604         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
12605         export function LightningError_clone(orig: number): number {
12606                 if(!isWasmInitialized) {
12607                         throw new Error("initializeWasm() must be awaited first!");
12608                 }
12609                 const nativeResponseValue = wasm.LightningError_clone(orig);
12610                 return nativeResponseValue;
12611         }
12612         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
12613         export function CommitmentUpdate_free(this_obj: number): void {
12614                 if(!isWasmInitialized) {
12615                         throw new Error("initializeWasm() must be awaited first!");
12616                 }
12617                 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
12618                 // debug statements here
12619         }
12620         // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
12621         export function CommitmentUpdate_get_update_add_htlcs(this_ptr: number): number[] {
12622                 if(!isWasmInitialized) {
12623                         throw new Error("initializeWasm() must be awaited first!");
12624                 }
12625                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_add_htlcs(this_ptr);
12626                 return nativeResponseValue;
12627         }
12628         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
12629         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
12630                 if(!isWasmInitialized) {
12631                         throw new Error("initializeWasm() must be awaited first!");
12632                 }
12633                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
12634                 // debug statements here
12635         }
12636         // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
12637         export function CommitmentUpdate_get_update_fulfill_htlcs(this_ptr: number): number[] {
12638                 if(!isWasmInitialized) {
12639                         throw new Error("initializeWasm() must be awaited first!");
12640                 }
12641                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fulfill_htlcs(this_ptr);
12642                 return nativeResponseValue;
12643         }
12644         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
12645         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
12646                 if(!isWasmInitialized) {
12647                         throw new Error("initializeWasm() must be awaited first!");
12648                 }
12649                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
12650                 // debug statements here
12651         }
12652         // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
12653         export function CommitmentUpdate_get_update_fail_htlcs(this_ptr: number): number[] {
12654                 if(!isWasmInitialized) {
12655                         throw new Error("initializeWasm() must be awaited first!");
12656                 }
12657                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_htlcs(this_ptr);
12658                 return nativeResponseValue;
12659         }
12660         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
12661         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
12662                 if(!isWasmInitialized) {
12663                         throw new Error("initializeWasm() must be awaited first!");
12664                 }
12665                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
12666                 // debug statements here
12667         }
12668         // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
12669         export function CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr: number): number[] {
12670                 if(!isWasmInitialized) {
12671                         throw new Error("initializeWasm() must be awaited first!");
12672                 }
12673                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr);
12674                 return nativeResponseValue;
12675         }
12676         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
12677         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
12678                 if(!isWasmInitialized) {
12679                         throw new Error("initializeWasm() must be awaited first!");
12680                 }
12681                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
12682                 // debug statements here
12683         }
12684         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
12685         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
12686                 if(!isWasmInitialized) {
12687                         throw new Error("initializeWasm() must be awaited first!");
12688                 }
12689                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
12690                 return nativeResponseValue;
12691         }
12692         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
12693         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
12694                 if(!isWasmInitialized) {
12695                         throw new Error("initializeWasm() must be awaited first!");
12696                 }
12697                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
12698                 // debug statements here
12699         }
12700         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
12701         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
12702                 if(!isWasmInitialized) {
12703                         throw new Error("initializeWasm() must be awaited first!");
12704                 }
12705                 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
12706                 return nativeResponseValue;
12707         }
12708         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
12709         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
12710                 if(!isWasmInitialized) {
12711                         throw new Error("initializeWasm() must be awaited first!");
12712                 }
12713                 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
12714                 // debug statements here
12715         }
12716         // 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);
12717         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 {
12718                 if(!isWasmInitialized) {
12719                         throw new Error("initializeWasm() must be awaited first!");
12720                 }
12721                 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);
12722                 return nativeResponseValue;
12723         }
12724         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
12725         export function CommitmentUpdate_clone(orig: number): number {
12726                 if(!isWasmInitialized) {
12727                         throw new Error("initializeWasm() must be awaited first!");
12728                 }
12729                 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
12730                 return nativeResponseValue;
12731         }
12732         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
12733         export function ChannelMessageHandler_free(this_ptr: number): void {
12734                 if(!isWasmInitialized) {
12735                         throw new Error("initializeWasm() must be awaited first!");
12736                 }
12737                 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
12738                 // debug statements here
12739         }
12740         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
12741         export function RoutingMessageHandler_free(this_ptr: number): void {
12742                 if(!isWasmInitialized) {
12743                         throw new Error("initializeWasm() must be awaited first!");
12744                 }
12745                 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
12746                 // debug statements here
12747         }
12748         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
12749         export function AcceptChannel_write(obj: number): Uint8Array {
12750                 if(!isWasmInitialized) {
12751                         throw new Error("initializeWasm() must be awaited first!");
12752                 }
12753                 const nativeResponseValue = wasm.AcceptChannel_write(obj);
12754                 return decodeArray(nativeResponseValue);
12755         }
12756         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
12757         export function AcceptChannel_read(ser: Uint8Array): number {
12758                 if(!isWasmInitialized) {
12759                         throw new Error("initializeWasm() must be awaited first!");
12760                 }
12761                 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
12762                 return nativeResponseValue;
12763         }
12764         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
12765         export function AnnouncementSignatures_write(obj: number): Uint8Array {
12766                 if(!isWasmInitialized) {
12767                         throw new Error("initializeWasm() must be awaited first!");
12768                 }
12769                 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
12770                 return decodeArray(nativeResponseValue);
12771         }
12772         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
12773         export function AnnouncementSignatures_read(ser: Uint8Array): number {
12774                 if(!isWasmInitialized) {
12775                         throw new Error("initializeWasm() must be awaited first!");
12776                 }
12777                 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
12778                 return nativeResponseValue;
12779         }
12780         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
12781         export function ChannelReestablish_write(obj: number): Uint8Array {
12782                 if(!isWasmInitialized) {
12783                         throw new Error("initializeWasm() must be awaited first!");
12784                 }
12785                 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
12786                 return decodeArray(nativeResponseValue);
12787         }
12788         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
12789         export function ChannelReestablish_read(ser: Uint8Array): number {
12790                 if(!isWasmInitialized) {
12791                         throw new Error("initializeWasm() must be awaited first!");
12792                 }
12793                 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
12794                 return nativeResponseValue;
12795         }
12796         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
12797         export function ClosingSigned_write(obj: number): Uint8Array {
12798                 if(!isWasmInitialized) {
12799                         throw new Error("initializeWasm() must be awaited first!");
12800                 }
12801                 const nativeResponseValue = wasm.ClosingSigned_write(obj);
12802                 return decodeArray(nativeResponseValue);
12803         }
12804         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
12805         export function ClosingSigned_read(ser: Uint8Array): number {
12806                 if(!isWasmInitialized) {
12807                         throw new Error("initializeWasm() must be awaited first!");
12808                 }
12809                 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
12810                 return nativeResponseValue;
12811         }
12812         // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
12813         export function ClosingSignedFeeRange_write(obj: number): Uint8Array {
12814                 if(!isWasmInitialized) {
12815                         throw new Error("initializeWasm() must be awaited first!");
12816                 }
12817                 const nativeResponseValue = wasm.ClosingSignedFeeRange_write(obj);
12818                 return decodeArray(nativeResponseValue);
12819         }
12820         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
12821         export function ClosingSignedFeeRange_read(ser: Uint8Array): number {
12822                 if(!isWasmInitialized) {
12823                         throw new Error("initializeWasm() must be awaited first!");
12824                 }
12825                 const nativeResponseValue = wasm.ClosingSignedFeeRange_read(encodeArray(ser));
12826                 return nativeResponseValue;
12827         }
12828         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
12829         export function CommitmentSigned_write(obj: number): Uint8Array {
12830                 if(!isWasmInitialized) {
12831                         throw new Error("initializeWasm() must be awaited first!");
12832                 }
12833                 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
12834                 return decodeArray(nativeResponseValue);
12835         }
12836         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
12837         export function CommitmentSigned_read(ser: Uint8Array): number {
12838                 if(!isWasmInitialized) {
12839                         throw new Error("initializeWasm() must be awaited first!");
12840                 }
12841                 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
12842                 return nativeResponseValue;
12843         }
12844         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
12845         export function FundingCreated_write(obj: number): Uint8Array {
12846                 if(!isWasmInitialized) {
12847                         throw new Error("initializeWasm() must be awaited first!");
12848                 }
12849                 const nativeResponseValue = wasm.FundingCreated_write(obj);
12850                 return decodeArray(nativeResponseValue);
12851         }
12852         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
12853         export function FundingCreated_read(ser: Uint8Array): number {
12854                 if(!isWasmInitialized) {
12855                         throw new Error("initializeWasm() must be awaited first!");
12856                 }
12857                 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
12858                 return nativeResponseValue;
12859         }
12860         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
12861         export function FundingSigned_write(obj: number): Uint8Array {
12862                 if(!isWasmInitialized) {
12863                         throw new Error("initializeWasm() must be awaited first!");
12864                 }
12865                 const nativeResponseValue = wasm.FundingSigned_write(obj);
12866                 return decodeArray(nativeResponseValue);
12867         }
12868         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
12869         export function FundingSigned_read(ser: Uint8Array): number {
12870                 if(!isWasmInitialized) {
12871                         throw new Error("initializeWasm() must be awaited first!");
12872                 }
12873                 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
12874                 return nativeResponseValue;
12875         }
12876         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
12877         export function FundingLocked_write(obj: number): Uint8Array {
12878                 if(!isWasmInitialized) {
12879                         throw new Error("initializeWasm() must be awaited first!");
12880                 }
12881                 const nativeResponseValue = wasm.FundingLocked_write(obj);
12882                 return decodeArray(nativeResponseValue);
12883         }
12884         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
12885         export function FundingLocked_read(ser: Uint8Array): number {
12886                 if(!isWasmInitialized) {
12887                         throw new Error("initializeWasm() must be awaited first!");
12888                 }
12889                 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
12890                 return nativeResponseValue;
12891         }
12892         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
12893         export function Init_write(obj: number): Uint8Array {
12894                 if(!isWasmInitialized) {
12895                         throw new Error("initializeWasm() must be awaited first!");
12896                 }
12897                 const nativeResponseValue = wasm.Init_write(obj);
12898                 return decodeArray(nativeResponseValue);
12899         }
12900         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
12901         export function Init_read(ser: Uint8Array): number {
12902                 if(!isWasmInitialized) {
12903                         throw new Error("initializeWasm() must be awaited first!");
12904                 }
12905                 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
12906                 return nativeResponseValue;
12907         }
12908         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
12909         export function OpenChannel_write(obj: number): Uint8Array {
12910                 if(!isWasmInitialized) {
12911                         throw new Error("initializeWasm() must be awaited first!");
12912                 }
12913                 const nativeResponseValue = wasm.OpenChannel_write(obj);
12914                 return decodeArray(nativeResponseValue);
12915         }
12916         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
12917         export function OpenChannel_read(ser: Uint8Array): number {
12918                 if(!isWasmInitialized) {
12919                         throw new Error("initializeWasm() must be awaited first!");
12920                 }
12921                 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
12922                 return nativeResponseValue;
12923         }
12924         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
12925         export function RevokeAndACK_write(obj: number): Uint8Array {
12926                 if(!isWasmInitialized) {
12927                         throw new Error("initializeWasm() must be awaited first!");
12928                 }
12929                 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
12930                 return decodeArray(nativeResponseValue);
12931         }
12932         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
12933         export function RevokeAndACK_read(ser: Uint8Array): number {
12934                 if(!isWasmInitialized) {
12935                         throw new Error("initializeWasm() must be awaited first!");
12936                 }
12937                 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
12938                 return nativeResponseValue;
12939         }
12940         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
12941         export function Shutdown_write(obj: number): Uint8Array {
12942                 if(!isWasmInitialized) {
12943                         throw new Error("initializeWasm() must be awaited first!");
12944                 }
12945                 const nativeResponseValue = wasm.Shutdown_write(obj);
12946                 return decodeArray(nativeResponseValue);
12947         }
12948         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
12949         export function Shutdown_read(ser: Uint8Array): number {
12950                 if(!isWasmInitialized) {
12951                         throw new Error("initializeWasm() must be awaited first!");
12952                 }
12953                 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
12954                 return nativeResponseValue;
12955         }
12956         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
12957         export function UpdateFailHTLC_write(obj: number): Uint8Array {
12958                 if(!isWasmInitialized) {
12959                         throw new Error("initializeWasm() must be awaited first!");
12960                 }
12961                 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
12962                 return decodeArray(nativeResponseValue);
12963         }
12964         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
12965         export function UpdateFailHTLC_read(ser: Uint8Array): number {
12966                 if(!isWasmInitialized) {
12967                         throw new Error("initializeWasm() must be awaited first!");
12968                 }
12969                 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
12970                 return nativeResponseValue;
12971         }
12972         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
12973         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
12974                 if(!isWasmInitialized) {
12975                         throw new Error("initializeWasm() must be awaited first!");
12976                 }
12977                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
12978                 return decodeArray(nativeResponseValue);
12979         }
12980         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
12981         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
12982                 if(!isWasmInitialized) {
12983                         throw new Error("initializeWasm() must be awaited first!");
12984                 }
12985                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
12986                 return nativeResponseValue;
12987         }
12988         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
12989         export function UpdateFee_write(obj: number): Uint8Array {
12990                 if(!isWasmInitialized) {
12991                         throw new Error("initializeWasm() must be awaited first!");
12992                 }
12993                 const nativeResponseValue = wasm.UpdateFee_write(obj);
12994                 return decodeArray(nativeResponseValue);
12995         }
12996         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
12997         export function UpdateFee_read(ser: Uint8Array): number {
12998                 if(!isWasmInitialized) {
12999                         throw new Error("initializeWasm() must be awaited first!");
13000                 }
13001                 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
13002                 return nativeResponseValue;
13003         }
13004         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
13005         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
13006                 if(!isWasmInitialized) {
13007                         throw new Error("initializeWasm() must be awaited first!");
13008                 }
13009                 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
13010                 return decodeArray(nativeResponseValue);
13011         }
13012         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
13013         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
13014                 if(!isWasmInitialized) {
13015                         throw new Error("initializeWasm() must be awaited first!");
13016                 }
13017                 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
13018                 return nativeResponseValue;
13019         }
13020         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
13021         export function UpdateAddHTLC_write(obj: number): Uint8Array {
13022                 if(!isWasmInitialized) {
13023                         throw new Error("initializeWasm() must be awaited first!");
13024                 }
13025                 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
13026                 return decodeArray(nativeResponseValue);
13027         }
13028         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
13029         export function UpdateAddHTLC_read(ser: Uint8Array): number {
13030                 if(!isWasmInitialized) {
13031                         throw new Error("initializeWasm() must be awaited first!");
13032                 }
13033                 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
13034                 return nativeResponseValue;
13035         }
13036         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
13037         export function Ping_write(obj: number): Uint8Array {
13038                 if(!isWasmInitialized) {
13039                         throw new Error("initializeWasm() must be awaited first!");
13040                 }
13041                 const nativeResponseValue = wasm.Ping_write(obj);
13042                 return decodeArray(nativeResponseValue);
13043         }
13044         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
13045         export function Ping_read(ser: Uint8Array): number {
13046                 if(!isWasmInitialized) {
13047                         throw new Error("initializeWasm() must be awaited first!");
13048                 }
13049                 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
13050                 return nativeResponseValue;
13051         }
13052         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
13053         export function Pong_write(obj: number): Uint8Array {
13054                 if(!isWasmInitialized) {
13055                         throw new Error("initializeWasm() must be awaited first!");
13056                 }
13057                 const nativeResponseValue = wasm.Pong_write(obj);
13058                 return decodeArray(nativeResponseValue);
13059         }
13060         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
13061         export function Pong_read(ser: Uint8Array): number {
13062                 if(!isWasmInitialized) {
13063                         throw new Error("initializeWasm() must be awaited first!");
13064                 }
13065                 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
13066                 return nativeResponseValue;
13067         }
13068         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
13069         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
13070                 if(!isWasmInitialized) {
13071                         throw new Error("initializeWasm() must be awaited first!");
13072                 }
13073                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
13074                 return decodeArray(nativeResponseValue);
13075         }
13076         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
13077         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
13078                 if(!isWasmInitialized) {
13079                         throw new Error("initializeWasm() must be awaited first!");
13080                 }
13081                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
13082                 return nativeResponseValue;
13083         }
13084         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
13085         export function ChannelAnnouncement_write(obj: number): Uint8Array {
13086                 if(!isWasmInitialized) {
13087                         throw new Error("initializeWasm() must be awaited first!");
13088                 }
13089                 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
13090                 return decodeArray(nativeResponseValue);
13091         }
13092         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
13093         export function ChannelAnnouncement_read(ser: Uint8Array): number {
13094                 if(!isWasmInitialized) {
13095                         throw new Error("initializeWasm() must be awaited first!");
13096                 }
13097                 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
13098                 return nativeResponseValue;
13099         }
13100         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
13101         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
13102                 if(!isWasmInitialized) {
13103                         throw new Error("initializeWasm() must be awaited first!");
13104                 }
13105                 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
13106                 return decodeArray(nativeResponseValue);
13107         }
13108         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
13109         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
13110                 if(!isWasmInitialized) {
13111                         throw new Error("initializeWasm() must be awaited first!");
13112                 }
13113                 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
13114                 return nativeResponseValue;
13115         }
13116         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
13117         export function ChannelUpdate_write(obj: number): Uint8Array {
13118                 if(!isWasmInitialized) {
13119                         throw new Error("initializeWasm() must be awaited first!");
13120                 }
13121                 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
13122                 return decodeArray(nativeResponseValue);
13123         }
13124         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
13125         export function ChannelUpdate_read(ser: Uint8Array): number {
13126                 if(!isWasmInitialized) {
13127                         throw new Error("initializeWasm() must be awaited first!");
13128                 }
13129                 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
13130                 return nativeResponseValue;
13131         }
13132         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
13133         export function ErrorMessage_write(obj: number): Uint8Array {
13134                 if(!isWasmInitialized) {
13135                         throw new Error("initializeWasm() must be awaited first!");
13136                 }
13137                 const nativeResponseValue = wasm.ErrorMessage_write(obj);
13138                 return decodeArray(nativeResponseValue);
13139         }
13140         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
13141         export function ErrorMessage_read(ser: Uint8Array): number {
13142                 if(!isWasmInitialized) {
13143                         throw new Error("initializeWasm() must be awaited first!");
13144                 }
13145                 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
13146                 return nativeResponseValue;
13147         }
13148         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
13149         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
13150                 if(!isWasmInitialized) {
13151                         throw new Error("initializeWasm() must be awaited first!");
13152                 }
13153                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
13154                 return decodeArray(nativeResponseValue);
13155         }
13156         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
13157         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
13158                 if(!isWasmInitialized) {
13159                         throw new Error("initializeWasm() must be awaited first!");
13160                 }
13161                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
13162                 return nativeResponseValue;
13163         }
13164         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
13165         export function NodeAnnouncement_write(obj: number): Uint8Array {
13166                 if(!isWasmInitialized) {
13167                         throw new Error("initializeWasm() must be awaited first!");
13168                 }
13169                 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
13170                 return decodeArray(nativeResponseValue);
13171         }
13172         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
13173         export function NodeAnnouncement_read(ser: Uint8Array): number {
13174                 if(!isWasmInitialized) {
13175                         throw new Error("initializeWasm() must be awaited first!");
13176                 }
13177                 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
13178                 return nativeResponseValue;
13179         }
13180         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
13181         export function QueryShortChannelIds_read(ser: Uint8Array): number {
13182                 if(!isWasmInitialized) {
13183                         throw new Error("initializeWasm() must be awaited first!");
13184                 }
13185                 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
13186                 return nativeResponseValue;
13187         }
13188         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
13189         export function QueryShortChannelIds_write(obj: number): Uint8Array {
13190                 if(!isWasmInitialized) {
13191                         throw new Error("initializeWasm() must be awaited first!");
13192                 }
13193                 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
13194                 return decodeArray(nativeResponseValue);
13195         }
13196         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
13197         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
13198                 if(!isWasmInitialized) {
13199                         throw new Error("initializeWasm() must be awaited first!");
13200                 }
13201                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
13202                 return decodeArray(nativeResponseValue);
13203         }
13204         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
13205         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
13206                 if(!isWasmInitialized) {
13207                         throw new Error("initializeWasm() must be awaited first!");
13208                 }
13209                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
13210                 return nativeResponseValue;
13211         }
13212         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
13213         export function QueryChannelRange_end_blocknum(this_arg: number): number {
13214                 if(!isWasmInitialized) {
13215                         throw new Error("initializeWasm() must be awaited first!");
13216                 }
13217                 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
13218                 return nativeResponseValue;
13219         }
13220         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
13221         export function QueryChannelRange_write(obj: number): Uint8Array {
13222                 if(!isWasmInitialized) {
13223                         throw new Error("initializeWasm() must be awaited first!");
13224                 }
13225                 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
13226                 return decodeArray(nativeResponseValue);
13227         }
13228         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
13229         export function QueryChannelRange_read(ser: Uint8Array): number {
13230                 if(!isWasmInitialized) {
13231                         throw new Error("initializeWasm() must be awaited first!");
13232                 }
13233                 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
13234                 return nativeResponseValue;
13235         }
13236         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
13237         export function ReplyChannelRange_read(ser: Uint8Array): number {
13238                 if(!isWasmInitialized) {
13239                         throw new Error("initializeWasm() must be awaited first!");
13240                 }
13241                 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
13242                 return nativeResponseValue;
13243         }
13244         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
13245         export function ReplyChannelRange_write(obj: number): Uint8Array {
13246                 if(!isWasmInitialized) {
13247                         throw new Error("initializeWasm() must be awaited first!");
13248                 }
13249                 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
13250                 return decodeArray(nativeResponseValue);
13251         }
13252         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
13253         export function GossipTimestampFilter_write(obj: number): Uint8Array {
13254                 if(!isWasmInitialized) {
13255                         throw new Error("initializeWasm() must be awaited first!");
13256                 }
13257                 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
13258                 return decodeArray(nativeResponseValue);
13259         }
13260         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
13261         export function GossipTimestampFilter_read(ser: Uint8Array): number {
13262                 if(!isWasmInitialized) {
13263                         throw new Error("initializeWasm() must be awaited first!");
13264                 }
13265                 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
13266                 return nativeResponseValue;
13267         }
13268         // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
13269         export function CustomMessageHandler_free(this_ptr: number): void {
13270                 if(!isWasmInitialized) {
13271                         throw new Error("initializeWasm() must be awaited first!");
13272                 }
13273                 const nativeResponseValue = wasm.CustomMessageHandler_free(this_ptr);
13274                 // debug statements here
13275         }
13276         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
13277         export function IgnoringMessageHandler_free(this_obj: number): void {
13278                 if(!isWasmInitialized) {
13279                         throw new Error("initializeWasm() must be awaited first!");
13280                 }
13281                 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
13282                 // debug statements here
13283         }
13284         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
13285         export function IgnoringMessageHandler_new(): number {
13286                 if(!isWasmInitialized) {
13287                         throw new Error("initializeWasm() must be awaited first!");
13288                 }
13289                 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
13290                 return nativeResponseValue;
13291         }
13292         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13293         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
13294                 if(!isWasmInitialized) {
13295                         throw new Error("initializeWasm() must be awaited first!");
13296                 }
13297                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
13298                 return nativeResponseValue;
13299         }
13300         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13301         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
13302                 if(!isWasmInitialized) {
13303                         throw new Error("initializeWasm() must be awaited first!");
13304                 }
13305                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
13306                 return nativeResponseValue;
13307         }
13308         // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13309         export function IgnoringMessageHandler_as_CustomMessageReader(this_arg: number): number {
13310                 if(!isWasmInitialized) {
13311                         throw new Error("initializeWasm() must be awaited first!");
13312                 }
13313                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageReader(this_arg);
13314                 return nativeResponseValue;
13315         }
13316         // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13317         export function IgnoringMessageHandler_as_CustomMessageHandler(this_arg: number): number {
13318                 if(!isWasmInitialized) {
13319                         throw new Error("initializeWasm() must be awaited first!");
13320                 }
13321                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageHandler(this_arg);
13322                 return nativeResponseValue;
13323         }
13324         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
13325         export function ErroringMessageHandler_free(this_obj: number): void {
13326                 if(!isWasmInitialized) {
13327                         throw new Error("initializeWasm() must be awaited first!");
13328                 }
13329                 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
13330                 // debug statements here
13331         }
13332         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
13333         export function ErroringMessageHandler_new(): number {
13334                 if(!isWasmInitialized) {
13335                         throw new Error("initializeWasm() must be awaited first!");
13336                 }
13337                 const nativeResponseValue = wasm.ErroringMessageHandler_new();
13338                 return nativeResponseValue;
13339         }
13340         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
13341         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
13342                 if(!isWasmInitialized) {
13343                         throw new Error("initializeWasm() must be awaited first!");
13344                 }
13345                 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
13346                 return nativeResponseValue;
13347         }
13348         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
13349         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
13350                 if(!isWasmInitialized) {
13351                         throw new Error("initializeWasm() must be awaited first!");
13352                 }
13353                 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
13354                 return nativeResponseValue;
13355         }
13356         // void MessageHandler_free(struct LDKMessageHandler this_obj);
13357         export function MessageHandler_free(this_obj: number): void {
13358                 if(!isWasmInitialized) {
13359                         throw new Error("initializeWasm() must be awaited first!");
13360                 }
13361                 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
13362                 // debug statements here
13363         }
13364         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
13365         export function MessageHandler_get_chan_handler(this_ptr: number): number {
13366                 if(!isWasmInitialized) {
13367                         throw new Error("initializeWasm() must be awaited first!");
13368                 }
13369                 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
13370                 return nativeResponseValue;
13371         }
13372         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
13373         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
13374                 if(!isWasmInitialized) {
13375                         throw new Error("initializeWasm() must be awaited first!");
13376                 }
13377                 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
13378                 // debug statements here
13379         }
13380         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
13381         export function MessageHandler_get_route_handler(this_ptr: number): number {
13382                 if(!isWasmInitialized) {
13383                         throw new Error("initializeWasm() must be awaited first!");
13384                 }
13385                 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
13386                 return nativeResponseValue;
13387         }
13388         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
13389         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
13390                 if(!isWasmInitialized) {
13391                         throw new Error("initializeWasm() must be awaited first!");
13392                 }
13393                 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
13394                 // debug statements here
13395         }
13396         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
13397         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
13398                 if(!isWasmInitialized) {
13399                         throw new Error("initializeWasm() must be awaited first!");
13400                 }
13401                 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
13402                 return nativeResponseValue;
13403         }
13404         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
13405         export function SocketDescriptor_clone(orig: number): number {
13406                 if(!isWasmInitialized) {
13407                         throw new Error("initializeWasm() must be awaited first!");
13408                 }
13409                 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
13410                 return nativeResponseValue;
13411         }
13412         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
13413         export function SocketDescriptor_free(this_ptr: number): void {
13414                 if(!isWasmInitialized) {
13415                         throw new Error("initializeWasm() must be awaited first!");
13416                 }
13417                 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
13418                 // debug statements here
13419         }
13420         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
13421         export function PeerHandleError_free(this_obj: number): void {
13422                 if(!isWasmInitialized) {
13423                         throw new Error("initializeWasm() must be awaited first!");
13424                 }
13425                 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
13426                 // debug statements here
13427         }
13428         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
13429         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
13430                 if(!isWasmInitialized) {
13431                         throw new Error("initializeWasm() must be awaited first!");
13432                 }
13433                 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
13434                 return nativeResponseValue;
13435         }
13436         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
13437         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
13438                 if(!isWasmInitialized) {
13439                         throw new Error("initializeWasm() must be awaited first!");
13440                 }
13441                 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
13442                 // debug statements here
13443         }
13444         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
13445         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
13446                 if(!isWasmInitialized) {
13447                         throw new Error("initializeWasm() must be awaited first!");
13448                 }
13449                 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
13450                 return nativeResponseValue;
13451         }
13452         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
13453         export function PeerHandleError_clone(orig: number): number {
13454                 if(!isWasmInitialized) {
13455                         throw new Error("initializeWasm() must be awaited first!");
13456                 }
13457                 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
13458                 return nativeResponseValue;
13459         }
13460         // void PeerManager_free(struct LDKPeerManager this_obj);
13461         export function PeerManager_free(this_obj: number): void {
13462                 if(!isWasmInitialized) {
13463                         throw new Error("initializeWasm() must be awaited first!");
13464                 }
13465                 const nativeResponseValue = wasm.PeerManager_free(this_obj);
13466                 // debug statements here
13467         }
13468         // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKCustomMessageHandler custom_message_handler);
13469         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number, custom_message_handler: number): number {
13470                 if(!isWasmInitialized) {
13471                         throw new Error("initializeWasm() must be awaited first!");
13472                 }
13473                 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger, custom_message_handler);
13474                 return nativeResponseValue;
13475         }
13476         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
13477         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
13478                 if(!isWasmInitialized) {
13479                         throw new Error("initializeWasm() must be awaited first!");
13480                 }
13481                 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
13482                 return nativeResponseValue;
13483         }
13484         // 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);
13485         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
13486                 if(!isWasmInitialized) {
13487                         throw new Error("initializeWasm() must be awaited first!");
13488                 }
13489                 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
13490                 return nativeResponseValue;
13491         }
13492         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
13493         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
13494                 if(!isWasmInitialized) {
13495                         throw new Error("initializeWasm() must be awaited first!");
13496                 }
13497                 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
13498                 return nativeResponseValue;
13499         }
13500         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
13501         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
13502                 if(!isWasmInitialized) {
13503                         throw new Error("initializeWasm() must be awaited first!");
13504                 }
13505                 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
13506                 return nativeResponseValue;
13507         }
13508         // 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);
13509         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
13510                 if(!isWasmInitialized) {
13511                         throw new Error("initializeWasm() must be awaited first!");
13512                 }
13513                 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
13514                 return nativeResponseValue;
13515         }
13516         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
13517         export function PeerManager_process_events(this_arg: number): void {
13518                 if(!isWasmInitialized) {
13519                         throw new Error("initializeWasm() must be awaited first!");
13520                 }
13521                 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
13522                 // debug statements here
13523         }
13524         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
13525         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
13526                 if(!isWasmInitialized) {
13527                         throw new Error("initializeWasm() must be awaited first!");
13528                 }
13529                 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
13530                 // debug statements here
13531         }
13532         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
13533         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
13534                 if(!isWasmInitialized) {
13535                         throw new Error("initializeWasm() must be awaited first!");
13536                 }
13537                 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
13538                 // debug statements here
13539         }
13540         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
13541         export function PeerManager_timer_tick_occurred(this_arg: number): void {
13542                 if(!isWasmInitialized) {
13543                         throw new Error("initializeWasm() must be awaited first!");
13544                 }
13545                 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
13546                 // debug statements here
13547         }
13548         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
13549         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
13550                 if(!isWasmInitialized) {
13551                         throw new Error("initializeWasm() must be awaited first!");
13552                 }
13553                 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
13554                 return decodeArray(nativeResponseValue);
13555         }
13556         // struct LDKTransaction build_closing_transaction(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
13557         export function build_closing_transaction(to_holder_value_sat: number, to_counterparty_value_sat: number, to_holder_script: Uint8Array, to_counterparty_script: Uint8Array, funding_outpoint: number): Uint8Array {
13558                 if(!isWasmInitialized) {
13559                         throw new Error("initializeWasm() must be awaited first!");
13560                 }
13561                 const nativeResponseValue = wasm.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
13562                 return decodeArray(nativeResponseValue);
13563         }
13564         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
13565         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
13566                 if(!isWasmInitialized) {
13567                         throw new Error("initializeWasm() must be awaited first!");
13568                 }
13569                 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
13570                 return nativeResponseValue;
13571         }
13572         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
13573         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
13574                 if(!isWasmInitialized) {
13575                         throw new Error("initializeWasm() must be awaited first!");
13576                 }
13577                 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
13578                 return nativeResponseValue;
13579         }
13580         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
13581         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
13582                 if(!isWasmInitialized) {
13583                         throw new Error("initializeWasm() must be awaited first!");
13584                 }
13585                 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
13586                 return nativeResponseValue;
13587         }
13588         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
13589         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
13590                 if(!isWasmInitialized) {
13591                         throw new Error("initializeWasm() must be awaited first!");
13592                 }
13593                 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
13594                 return nativeResponseValue;
13595         }
13596         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
13597         export function TxCreationKeys_free(this_obj: number): void {
13598                 if(!isWasmInitialized) {
13599                         throw new Error("initializeWasm() must be awaited first!");
13600                 }
13601                 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
13602                 // debug statements here
13603         }
13604         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
13605         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
13606                 if(!isWasmInitialized) {
13607                         throw new Error("initializeWasm() must be awaited first!");
13608                 }
13609                 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
13610                 return decodeArray(nativeResponseValue);
13611         }
13612         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13613         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
13614                 if(!isWasmInitialized) {
13615                         throw new Error("initializeWasm() must be awaited first!");
13616                 }
13617                 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
13618                 // debug statements here
13619         }
13620         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
13621         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
13622                 if(!isWasmInitialized) {
13623                         throw new Error("initializeWasm() must be awaited first!");
13624                 }
13625                 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
13626                 return decodeArray(nativeResponseValue);
13627         }
13628         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13629         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
13630                 if(!isWasmInitialized) {
13631                         throw new Error("initializeWasm() must be awaited first!");
13632                 }
13633                 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
13634                 // debug statements here
13635         }
13636         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
13637         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
13638                 if(!isWasmInitialized) {
13639                         throw new Error("initializeWasm() must be awaited first!");
13640                 }
13641                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
13642                 return decodeArray(nativeResponseValue);
13643         }
13644         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13645         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
13646                 if(!isWasmInitialized) {
13647                         throw new Error("initializeWasm() must be awaited first!");
13648                 }
13649                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
13650                 // debug statements here
13651         }
13652         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
13653         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
13654                 if(!isWasmInitialized) {
13655                         throw new Error("initializeWasm() must be awaited first!");
13656                 }
13657                 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
13658                 return decodeArray(nativeResponseValue);
13659         }
13660         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13661         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
13662                 if(!isWasmInitialized) {
13663                         throw new Error("initializeWasm() must be awaited first!");
13664                 }
13665                 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
13666                 // debug statements here
13667         }
13668         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
13669         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
13670                 if(!isWasmInitialized) {
13671                         throw new Error("initializeWasm() must be awaited first!");
13672                 }
13673                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
13674                 return decodeArray(nativeResponseValue);
13675         }
13676         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13677         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
13678                 if(!isWasmInitialized) {
13679                         throw new Error("initializeWasm() must be awaited first!");
13680                 }
13681                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
13682                 // debug statements here
13683         }
13684         // 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);
13685         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 {
13686                 if(!isWasmInitialized) {
13687                         throw new Error("initializeWasm() must be awaited first!");
13688                 }
13689                 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));
13690                 return nativeResponseValue;
13691         }
13692         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
13693         export function TxCreationKeys_clone(orig: number): number {
13694                 if(!isWasmInitialized) {
13695                         throw new Error("initializeWasm() must be awaited first!");
13696                 }
13697                 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
13698                 return nativeResponseValue;
13699         }
13700         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
13701         export function TxCreationKeys_write(obj: number): Uint8Array {
13702                 if(!isWasmInitialized) {
13703                         throw new Error("initializeWasm() must be awaited first!");
13704                 }
13705                 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
13706                 return decodeArray(nativeResponseValue);
13707         }
13708         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
13709         export function TxCreationKeys_read(ser: Uint8Array): number {
13710                 if(!isWasmInitialized) {
13711                         throw new Error("initializeWasm() must be awaited first!");
13712                 }
13713                 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
13714                 return nativeResponseValue;
13715         }
13716         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
13717         export function ChannelPublicKeys_free(this_obj: number): void {
13718                 if(!isWasmInitialized) {
13719                         throw new Error("initializeWasm() must be awaited first!");
13720                 }
13721                 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
13722                 // debug statements here
13723         }
13724         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
13725         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
13726                 if(!isWasmInitialized) {
13727                         throw new Error("initializeWasm() must be awaited first!");
13728                 }
13729                 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
13730                 return decodeArray(nativeResponseValue);
13731         }
13732         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13733         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
13734                 if(!isWasmInitialized) {
13735                         throw new Error("initializeWasm() must be awaited first!");
13736                 }
13737                 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
13738                 // debug statements here
13739         }
13740         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
13741         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
13742                 if(!isWasmInitialized) {
13743                         throw new Error("initializeWasm() must be awaited first!");
13744                 }
13745                 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
13746                 return decodeArray(nativeResponseValue);
13747         }
13748         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13749         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
13750                 if(!isWasmInitialized) {
13751                         throw new Error("initializeWasm() must be awaited first!");
13752                 }
13753                 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
13754                 // debug statements here
13755         }
13756         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
13757         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
13758                 if(!isWasmInitialized) {
13759                         throw new Error("initializeWasm() must be awaited first!");
13760                 }
13761                 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
13762                 return decodeArray(nativeResponseValue);
13763         }
13764         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13765         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
13766                 if(!isWasmInitialized) {
13767                         throw new Error("initializeWasm() must be awaited first!");
13768                 }
13769                 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
13770                 // debug statements here
13771         }
13772         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
13773         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
13774                 if(!isWasmInitialized) {
13775                         throw new Error("initializeWasm() must be awaited first!");
13776                 }
13777                 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
13778                 return decodeArray(nativeResponseValue);
13779         }
13780         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13781         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
13782                 if(!isWasmInitialized) {
13783                         throw new Error("initializeWasm() must be awaited first!");
13784                 }
13785                 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
13786                 // debug statements here
13787         }
13788         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
13789         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
13790                 if(!isWasmInitialized) {
13791                         throw new Error("initializeWasm() must be awaited first!");
13792                 }
13793                 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
13794                 return decodeArray(nativeResponseValue);
13795         }
13796         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13797         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
13798                 if(!isWasmInitialized) {
13799                         throw new Error("initializeWasm() must be awaited first!");
13800                 }
13801                 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
13802                 // debug statements here
13803         }
13804         // 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);
13805         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 {
13806                 if(!isWasmInitialized) {
13807                         throw new Error("initializeWasm() must be awaited first!");
13808                 }
13809                 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));
13810                 return nativeResponseValue;
13811         }
13812         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
13813         export function ChannelPublicKeys_clone(orig: number): number {
13814                 if(!isWasmInitialized) {
13815                         throw new Error("initializeWasm() must be awaited first!");
13816                 }
13817                 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
13818                 return nativeResponseValue;
13819         }
13820         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
13821         export function ChannelPublicKeys_write(obj: number): Uint8Array {
13822                 if(!isWasmInitialized) {
13823                         throw new Error("initializeWasm() must be awaited first!");
13824                 }
13825                 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
13826                 return decodeArray(nativeResponseValue);
13827         }
13828         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
13829         export function ChannelPublicKeys_read(ser: Uint8Array): number {
13830                 if(!isWasmInitialized) {
13831                         throw new Error("initializeWasm() must be awaited first!");
13832                 }
13833                 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
13834                 return nativeResponseValue;
13835         }
13836         // 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);
13837         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 {
13838                 if(!isWasmInitialized) {
13839                         throw new Error("initializeWasm() must be awaited first!");
13840                 }
13841                 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));
13842                 return nativeResponseValue;
13843         }
13844         // 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);
13845         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
13846                 if(!isWasmInitialized) {
13847                         throw new Error("initializeWasm() must be awaited first!");
13848                 }
13849                 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
13850                 return nativeResponseValue;
13851         }
13852         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
13853         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
13854                 if(!isWasmInitialized) {
13855                         throw new Error("initializeWasm() must be awaited first!");
13856                 }
13857                 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
13858                 return decodeArray(nativeResponseValue);
13859         }
13860         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
13861         export function HTLCOutputInCommitment_free(this_obj: number): void {
13862                 if(!isWasmInitialized) {
13863                         throw new Error("initializeWasm() must be awaited first!");
13864                 }
13865                 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
13866                 // debug statements here
13867         }
13868         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
13869         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
13870                 if(!isWasmInitialized) {
13871                         throw new Error("initializeWasm() must be awaited first!");
13872                 }
13873                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
13874                 return nativeResponseValue;
13875         }
13876         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
13877         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
13878                 if(!isWasmInitialized) {
13879                         throw new Error("initializeWasm() must be awaited first!");
13880                 }
13881                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
13882                 // debug statements here
13883         }
13884         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
13885         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
13886                 if(!isWasmInitialized) {
13887                         throw new Error("initializeWasm() must be awaited first!");
13888                 }
13889                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
13890                 return nativeResponseValue;
13891         }
13892         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
13893         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
13894                 if(!isWasmInitialized) {
13895                         throw new Error("initializeWasm() must be awaited first!");
13896                 }
13897                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
13898                 // debug statements here
13899         }
13900         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
13901         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
13902                 if(!isWasmInitialized) {
13903                         throw new Error("initializeWasm() must be awaited first!");
13904                 }
13905                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
13906                 return nativeResponseValue;
13907         }
13908         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
13909         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
13910                 if(!isWasmInitialized) {
13911                         throw new Error("initializeWasm() must be awaited first!");
13912                 }
13913                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
13914                 // debug statements here
13915         }
13916         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
13917         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
13918                 if(!isWasmInitialized) {
13919                         throw new Error("initializeWasm() must be awaited first!");
13920                 }
13921                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
13922                 return decodeArray(nativeResponseValue);
13923         }
13924         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13925         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
13926                 if(!isWasmInitialized) {
13927                         throw new Error("initializeWasm() must be awaited first!");
13928                 }
13929                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
13930                 // debug statements here
13931         }
13932         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
13933         export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
13934                 if(!isWasmInitialized) {
13935                         throw new Error("initializeWasm() must be awaited first!");
13936                 }
13937                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
13938                 return nativeResponseValue;
13939         }
13940         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
13941         export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
13942                 if(!isWasmInitialized) {
13943                         throw new Error("initializeWasm() must be awaited first!");
13944                 }
13945                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
13946                 // debug statements here
13947         }
13948         // 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);
13949         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 {
13950                 if(!isWasmInitialized) {
13951                         throw new Error("initializeWasm() must be awaited first!");
13952                 }
13953                 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
13954                 return nativeResponseValue;
13955         }
13956         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
13957         export function HTLCOutputInCommitment_clone(orig: number): number {
13958                 if(!isWasmInitialized) {
13959                         throw new Error("initializeWasm() must be awaited first!");
13960                 }
13961                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
13962                 return nativeResponseValue;
13963         }
13964         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
13965         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
13966                 if(!isWasmInitialized) {
13967                         throw new Error("initializeWasm() must be awaited first!");
13968                 }
13969                 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
13970                 return decodeArray(nativeResponseValue);
13971         }
13972         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
13973         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
13974                 if(!isWasmInitialized) {
13975                         throw new Error("initializeWasm() must be awaited first!");
13976                 }
13977                 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
13978                 return nativeResponseValue;
13979         }
13980         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
13981         export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
13982                 if(!isWasmInitialized) {
13983                         throw new Error("initializeWasm() must be awaited first!");
13984                 }
13985                 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
13986                 return decodeArray(nativeResponseValue);
13987         }
13988         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
13989         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
13990                 if(!isWasmInitialized) {
13991                         throw new Error("initializeWasm() must be awaited first!");
13992                 }
13993                 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
13994                 return decodeArray(nativeResponseValue);
13995         }
13996         // 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);
13997         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 {
13998                 if(!isWasmInitialized) {
13999                         throw new Error("initializeWasm() must be awaited first!");
14000                 }
14001                 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(commitment_txid), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
14002                 return decodeArray(nativeResponseValue);
14003         }
14004         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
14005         export function ChannelTransactionParameters_free(this_obj: number): void {
14006                 if(!isWasmInitialized) {
14007                         throw new Error("initializeWasm() must be awaited first!");
14008                 }
14009                 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
14010                 // debug statements here
14011         }
14012         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14013         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
14014                 if(!isWasmInitialized) {
14015                         throw new Error("initializeWasm() must be awaited first!");
14016                 }
14017                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
14018                 return nativeResponseValue;
14019         }
14020         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
14021         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
14022                 if(!isWasmInitialized) {
14023                         throw new Error("initializeWasm() must be awaited first!");
14024                 }
14025                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
14026                 // debug statements here
14027         }
14028         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14029         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
14030                 if(!isWasmInitialized) {
14031                         throw new Error("initializeWasm() must be awaited first!");
14032                 }
14033                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
14034                 return nativeResponseValue;
14035         }
14036         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
14037         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
14038                 if(!isWasmInitialized) {
14039                         throw new Error("initializeWasm() must be awaited first!");
14040                 }
14041                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
14042                 // debug statements here
14043         }
14044         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14045         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
14046                 if(!isWasmInitialized) {
14047                         throw new Error("initializeWasm() must be awaited first!");
14048                 }
14049                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
14050                 return nativeResponseValue;
14051         }
14052         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
14053         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
14054                 if(!isWasmInitialized) {
14055                         throw new Error("initializeWasm() must be awaited first!");
14056                 }
14057                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
14058                 // debug statements here
14059         }
14060         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14061         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
14062                 if(!isWasmInitialized) {
14063                         throw new Error("initializeWasm() must be awaited first!");
14064                 }
14065                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
14066                 return nativeResponseValue;
14067         }
14068         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
14069         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
14070                 if(!isWasmInitialized) {
14071                         throw new Error("initializeWasm() must be awaited first!");
14072                 }
14073                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
14074                 // debug statements here
14075         }
14076         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14077         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
14078                 if(!isWasmInitialized) {
14079                         throw new Error("initializeWasm() must be awaited first!");
14080                 }
14081                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
14082                 return nativeResponseValue;
14083         }
14084         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
14085         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
14086                 if(!isWasmInitialized) {
14087                         throw new Error("initializeWasm() must be awaited first!");
14088                 }
14089                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
14090                 // debug statements here
14091         }
14092         // 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);
14093         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 {
14094                 if(!isWasmInitialized) {
14095                         throw new Error("initializeWasm() must be awaited first!");
14096                 }
14097                 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
14098                 return nativeResponseValue;
14099         }
14100         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
14101         export function ChannelTransactionParameters_clone(orig: number): number {
14102                 if(!isWasmInitialized) {
14103                         throw new Error("initializeWasm() must be awaited first!");
14104                 }
14105                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
14106                 return nativeResponseValue;
14107         }
14108         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
14109         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
14110                 if(!isWasmInitialized) {
14111                         throw new Error("initializeWasm() must be awaited first!");
14112                 }
14113                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
14114                 // debug statements here
14115         }
14116         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
14117         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
14118                 if(!isWasmInitialized) {
14119                         throw new Error("initializeWasm() must be awaited first!");
14120                 }
14121                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
14122                 return nativeResponseValue;
14123         }
14124         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
14125         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
14126                 if(!isWasmInitialized) {
14127                         throw new Error("initializeWasm() must be awaited first!");
14128                 }
14129                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
14130                 // debug statements here
14131         }
14132         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
14133         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
14134                 if(!isWasmInitialized) {
14135                         throw new Error("initializeWasm() must be awaited first!");
14136                 }
14137                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
14138                 return nativeResponseValue;
14139         }
14140         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
14141         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
14142                 if(!isWasmInitialized) {
14143                         throw new Error("initializeWasm() must be awaited first!");
14144                 }
14145                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
14146                 // debug statements here
14147         }
14148         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
14149         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
14150                 if(!isWasmInitialized) {
14151                         throw new Error("initializeWasm() must be awaited first!");
14152                 }
14153                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
14154                 return nativeResponseValue;
14155         }
14156         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
14157         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
14158                 if(!isWasmInitialized) {
14159                         throw new Error("initializeWasm() must be awaited first!");
14160                 }
14161                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
14162                 return nativeResponseValue;
14163         }
14164         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
14165         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
14166                 if(!isWasmInitialized) {
14167                         throw new Error("initializeWasm() must be awaited first!");
14168                 }
14169                 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
14170                 return nativeResponseValue;
14171         }
14172         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
14173         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
14174                 if(!isWasmInitialized) {
14175                         throw new Error("initializeWasm() must be awaited first!");
14176                 }
14177                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
14178                 return nativeResponseValue;
14179         }
14180         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
14181         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
14182                 if(!isWasmInitialized) {
14183                         throw new Error("initializeWasm() must be awaited first!");
14184                 }
14185                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
14186                 return nativeResponseValue;
14187         }
14188         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
14189         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
14190                 if(!isWasmInitialized) {
14191                         throw new Error("initializeWasm() must be awaited first!");
14192                 }
14193                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
14194                 return decodeArray(nativeResponseValue);
14195         }
14196         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
14197         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
14198                 if(!isWasmInitialized) {
14199                         throw new Error("initializeWasm() must be awaited first!");
14200                 }
14201                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
14202                 return nativeResponseValue;
14203         }
14204         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
14205         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
14206                 if(!isWasmInitialized) {
14207                         throw new Error("initializeWasm() must be awaited first!");
14208                 }
14209                 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
14210                 return decodeArray(nativeResponseValue);
14211         }
14212         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
14213         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
14214                 if(!isWasmInitialized) {
14215                         throw new Error("initializeWasm() must be awaited first!");
14216                 }
14217                 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
14218                 return nativeResponseValue;
14219         }
14220         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
14221         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
14222                 if(!isWasmInitialized) {
14223                         throw new Error("initializeWasm() must be awaited first!");
14224                 }
14225                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
14226                 // debug statements here
14227         }
14228         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14229         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
14230                 if(!isWasmInitialized) {
14231                         throw new Error("initializeWasm() must be awaited first!");
14232                 }
14233                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
14234                 return nativeResponseValue;
14235         }
14236         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14237         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
14238                 if(!isWasmInitialized) {
14239                         throw new Error("initializeWasm() must be awaited first!");
14240                 }
14241                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
14242                 return nativeResponseValue;
14243         }
14244         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14245         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
14246                 if(!isWasmInitialized) {
14247                         throw new Error("initializeWasm() must be awaited first!");
14248                 }
14249                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
14250                 return nativeResponseValue;
14251         }
14252         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14253         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
14254                 if(!isWasmInitialized) {
14255                         throw new Error("initializeWasm() must be awaited first!");
14256                 }
14257                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
14258                 return nativeResponseValue;
14259         }
14260         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14261         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
14262                 if(!isWasmInitialized) {
14263                         throw new Error("initializeWasm() must be awaited first!");
14264                 }
14265                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
14266                 return nativeResponseValue;
14267         }
14268         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
14269         export function HolderCommitmentTransaction_free(this_obj: number): void {
14270                 if(!isWasmInitialized) {
14271                         throw new Error("initializeWasm() must be awaited first!");
14272                 }
14273                 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
14274                 // debug statements here
14275         }
14276         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
14277         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
14278                 if(!isWasmInitialized) {
14279                         throw new Error("initializeWasm() must be awaited first!");
14280                 }
14281                 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
14282                 return decodeArray(nativeResponseValue);
14283         }
14284         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
14285         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
14286                 if(!isWasmInitialized) {
14287                         throw new Error("initializeWasm() must be awaited first!");
14288                 }
14289                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
14290                 // debug statements here
14291         }
14292         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
14293         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
14294                 if(!isWasmInitialized) {
14295                         throw new Error("initializeWasm() must be awaited first!");
14296                 }
14297                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
14298                 // debug statements here
14299         }
14300         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
14301         export function HolderCommitmentTransaction_clone(orig: number): number {
14302                 if(!isWasmInitialized) {
14303                         throw new Error("initializeWasm() must be awaited first!");
14304                 }
14305                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
14306                 return nativeResponseValue;
14307         }
14308         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
14309         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
14310                 if(!isWasmInitialized) {
14311                         throw new Error("initializeWasm() must be awaited first!");
14312                 }
14313                 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
14314                 return decodeArray(nativeResponseValue);
14315         }
14316         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
14317         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
14318                 if(!isWasmInitialized) {
14319                         throw new Error("initializeWasm() must be awaited first!");
14320                 }
14321                 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
14322                 return nativeResponseValue;
14323         }
14324         // 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);
14325         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
14326                 if(!isWasmInitialized) {
14327                         throw new Error("initializeWasm() must be awaited first!");
14328                 }
14329                 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
14330                 return nativeResponseValue;
14331         }
14332         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
14333         export function BuiltCommitmentTransaction_free(this_obj: number): void {
14334                 if(!isWasmInitialized) {
14335                         throw new Error("initializeWasm() must be awaited first!");
14336                 }
14337                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
14338                 // debug statements here
14339         }
14340         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
14341         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
14342                 if(!isWasmInitialized) {
14343                         throw new Error("initializeWasm() must be awaited first!");
14344                 }
14345                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
14346                 return decodeArray(nativeResponseValue);
14347         }
14348         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
14349         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
14350                 if(!isWasmInitialized) {
14351                         throw new Error("initializeWasm() must be awaited first!");
14352                 }
14353                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
14354                 // debug statements here
14355         }
14356         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
14357         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
14358                 if(!isWasmInitialized) {
14359                         throw new Error("initializeWasm() must be awaited first!");
14360                 }
14361                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
14362                 return decodeArray(nativeResponseValue);
14363         }
14364         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14365         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
14366                 if(!isWasmInitialized) {
14367                         throw new Error("initializeWasm() must be awaited first!");
14368                 }
14369                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
14370                 // debug statements here
14371         }
14372         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
14373         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
14374                 if(!isWasmInitialized) {
14375                         throw new Error("initializeWasm() must be awaited first!");
14376                 }
14377                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
14378                 return nativeResponseValue;
14379         }
14380         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
14381         export function BuiltCommitmentTransaction_clone(orig: number): number {
14382                 if(!isWasmInitialized) {
14383                         throw new Error("initializeWasm() must be awaited first!");
14384                 }
14385                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
14386                 return nativeResponseValue;
14387         }
14388         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
14389         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
14390                 if(!isWasmInitialized) {
14391                         throw new Error("initializeWasm() must be awaited first!");
14392                 }
14393                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
14394                 return decodeArray(nativeResponseValue);
14395         }
14396         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
14397         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
14398                 if(!isWasmInitialized) {
14399                         throw new Error("initializeWasm() must be awaited first!");
14400                 }
14401                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
14402                 return nativeResponseValue;
14403         }
14404         // 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);
14405         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
14406                 if(!isWasmInitialized) {
14407                         throw new Error("initializeWasm() must be awaited first!");
14408                 }
14409                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
14410                 return decodeArray(nativeResponseValue);
14411         }
14412         // 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);
14413         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
14414                 if(!isWasmInitialized) {
14415                         throw new Error("initializeWasm() must be awaited first!");
14416                 }
14417                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
14418                 return decodeArray(nativeResponseValue);
14419         }
14420         // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
14421         export function ClosingTransaction_free(this_obj: number): void {
14422                 if(!isWasmInitialized) {
14423                         throw new Error("initializeWasm() must be awaited first!");
14424                 }
14425                 const nativeResponseValue = wasm.ClosingTransaction_free(this_obj);
14426                 // debug statements here
14427         }
14428         // MUST_USE_RES struct LDKClosingTransaction ClosingTransaction_new(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
14429         export function ClosingTransaction_new(to_holder_value_sat: number, to_counterparty_value_sat: number, to_holder_script: Uint8Array, to_counterparty_script: Uint8Array, funding_outpoint: number): number {
14430                 if(!isWasmInitialized) {
14431                         throw new Error("initializeWasm() must be awaited first!");
14432                 }
14433                 const nativeResponseValue = wasm.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
14434                 return nativeResponseValue;
14435         }
14436         // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
14437         export function ClosingTransaction_trust(this_arg: number): number {
14438                 if(!isWasmInitialized) {
14439                         throw new Error("initializeWasm() must be awaited first!");
14440                 }
14441                 const nativeResponseValue = wasm.ClosingTransaction_trust(this_arg);
14442                 return nativeResponseValue;
14443         }
14444         // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
14445         export function ClosingTransaction_verify(this_arg: number, funding_outpoint: number): number {
14446                 if(!isWasmInitialized) {
14447                         throw new Error("initializeWasm() must be awaited first!");
14448                 }
14449                 const nativeResponseValue = wasm.ClosingTransaction_verify(this_arg, funding_outpoint);
14450                 return nativeResponseValue;
14451         }
14452         // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
14453         export function ClosingTransaction_to_holder_value_sat(this_arg: number): number {
14454                 if(!isWasmInitialized) {
14455                         throw new Error("initializeWasm() must be awaited first!");
14456                 }
14457                 const nativeResponseValue = wasm.ClosingTransaction_to_holder_value_sat(this_arg);
14458                 return nativeResponseValue;
14459         }
14460         // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
14461         export function ClosingTransaction_to_counterparty_value_sat(this_arg: number): number {
14462                 if(!isWasmInitialized) {
14463                         throw new Error("initializeWasm() must be awaited first!");
14464                 }
14465                 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_value_sat(this_arg);
14466                 return nativeResponseValue;
14467         }
14468         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
14469         export function ClosingTransaction_to_holder_script(this_arg: number): Uint8Array {
14470                 if(!isWasmInitialized) {
14471                         throw new Error("initializeWasm() must be awaited first!");
14472                 }
14473                 const nativeResponseValue = wasm.ClosingTransaction_to_holder_script(this_arg);
14474                 return decodeArray(nativeResponseValue);
14475         }
14476         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
14477         export function ClosingTransaction_to_counterparty_script(this_arg: number): Uint8Array {
14478                 if(!isWasmInitialized) {
14479                         throw new Error("initializeWasm() must be awaited first!");
14480                 }
14481                 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_script(this_arg);
14482                 return decodeArray(nativeResponseValue);
14483         }
14484         // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
14485         export function TrustedClosingTransaction_free(this_obj: number): void {
14486                 if(!isWasmInitialized) {
14487                         throw new Error("initializeWasm() must be awaited first!");
14488                 }
14489                 const nativeResponseValue = wasm.TrustedClosingTransaction_free(this_obj);
14490                 // debug statements here
14491         }
14492         // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
14493         export function TrustedClosingTransaction_built_transaction(this_arg: number): Uint8Array {
14494                 if(!isWasmInitialized) {
14495                         throw new Error("initializeWasm() must be awaited first!");
14496                 }
14497                 const nativeResponseValue = wasm.TrustedClosingTransaction_built_transaction(this_arg);
14498                 return decodeArray(nativeResponseValue);
14499         }
14500         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedClosingTransaction_get_sighash_all(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
14501         export function TrustedClosingTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
14502                 if(!isWasmInitialized) {
14503                         throw new Error("initializeWasm() must be awaited first!");
14504                 }
14505                 const nativeResponseValue = wasm.TrustedClosingTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
14506                 return decodeArray(nativeResponseValue);
14507         }
14508         // MUST_USE_RES struct LDKSignature TrustedClosingTransaction_sign(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
14509         export function TrustedClosingTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
14510                 if(!isWasmInitialized) {
14511                         throw new Error("initializeWasm() must be awaited first!");
14512                 }
14513                 const nativeResponseValue = wasm.TrustedClosingTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
14514                 return decodeArray(nativeResponseValue);
14515         }
14516         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
14517         export function CommitmentTransaction_free(this_obj: number): void {
14518                 if(!isWasmInitialized) {
14519                         throw new Error("initializeWasm() must be awaited first!");
14520                 }
14521                 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
14522                 // debug statements here
14523         }
14524         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
14525         export function CommitmentTransaction_clone(orig: number): number {
14526                 if(!isWasmInitialized) {
14527                         throw new Error("initializeWasm() must be awaited first!");
14528                 }
14529                 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
14530                 return nativeResponseValue;
14531         }
14532         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
14533         export function CommitmentTransaction_write(obj: number): Uint8Array {
14534                 if(!isWasmInitialized) {
14535                         throw new Error("initializeWasm() must be awaited first!");
14536                 }
14537                 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
14538                 return decodeArray(nativeResponseValue);
14539         }
14540         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
14541         export function CommitmentTransaction_read(ser: Uint8Array): number {
14542                 if(!isWasmInitialized) {
14543                         throw new Error("initializeWasm() must be awaited first!");
14544                 }
14545                 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
14546                 return nativeResponseValue;
14547         }
14548         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
14549         export function CommitmentTransaction_commitment_number(this_arg: number): number {
14550                 if(!isWasmInitialized) {
14551                         throw new Error("initializeWasm() must be awaited first!");
14552                 }
14553                 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
14554                 return nativeResponseValue;
14555         }
14556         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
14557         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
14558                 if(!isWasmInitialized) {
14559                         throw new Error("initializeWasm() must be awaited first!");
14560                 }
14561                 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
14562                 return nativeResponseValue;
14563         }
14564         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
14565         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
14566                 if(!isWasmInitialized) {
14567                         throw new Error("initializeWasm() must be awaited first!");
14568                 }
14569                 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
14570                 return nativeResponseValue;
14571         }
14572         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
14573         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
14574                 if(!isWasmInitialized) {
14575                         throw new Error("initializeWasm() must be awaited first!");
14576                 }
14577                 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
14578                 return nativeResponseValue;
14579         }
14580         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
14581         export function CommitmentTransaction_trust(this_arg: number): number {
14582                 if(!isWasmInitialized) {
14583                         throw new Error("initializeWasm() must be awaited first!");
14584                 }
14585                 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
14586                 return nativeResponseValue;
14587         }
14588         // 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);
14589         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
14590                 if(!isWasmInitialized) {
14591                         throw new Error("initializeWasm() must be awaited first!");
14592                 }
14593                 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
14594                 return nativeResponseValue;
14595         }
14596         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
14597         export function TrustedCommitmentTransaction_free(this_obj: number): void {
14598                 if(!isWasmInitialized) {
14599                         throw new Error("initializeWasm() must be awaited first!");
14600                 }
14601                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
14602                 // debug statements here
14603         }
14604         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
14605         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
14606                 if(!isWasmInitialized) {
14607                         throw new Error("initializeWasm() must be awaited first!");
14608                 }
14609                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
14610                 return decodeArray(nativeResponseValue);
14611         }
14612         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
14613         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
14614                 if(!isWasmInitialized) {
14615                         throw new Error("initializeWasm() must be awaited first!");
14616                 }
14617                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
14618                 return nativeResponseValue;
14619         }
14620         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
14621         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
14622                 if(!isWasmInitialized) {
14623                         throw new Error("initializeWasm() must be awaited first!");
14624                 }
14625                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
14626                 return nativeResponseValue;
14627         }
14628         // 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);
14629         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
14630                 if(!isWasmInitialized) {
14631                         throw new Error("initializeWasm() must be awaited first!");
14632                 }
14633                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
14634                 return nativeResponseValue;
14635         }
14636         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
14637         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
14638                 if(!isWasmInitialized) {
14639                         throw new Error("initializeWasm() must be awaited first!");
14640                 }
14641                 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
14642                 return nativeResponseValue;
14643         }
14644         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
14645         export function InitFeatures_eq(a: number, b: number): boolean {
14646                 if(!isWasmInitialized) {
14647                         throw new Error("initializeWasm() must be awaited first!");
14648                 }
14649                 const nativeResponseValue = wasm.InitFeatures_eq(a, b);
14650                 return nativeResponseValue;
14651         }
14652         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
14653         export function NodeFeatures_eq(a: number, b: number): boolean {
14654                 if(!isWasmInitialized) {
14655                         throw new Error("initializeWasm() must be awaited first!");
14656                 }
14657                 const nativeResponseValue = wasm.NodeFeatures_eq(a, b);
14658                 return nativeResponseValue;
14659         }
14660         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
14661         export function ChannelFeatures_eq(a: number, b: number): boolean {
14662                 if(!isWasmInitialized) {
14663                         throw new Error("initializeWasm() must be awaited first!");
14664                 }
14665                 const nativeResponseValue = wasm.ChannelFeatures_eq(a, b);
14666                 return nativeResponseValue;
14667         }
14668         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
14669         export function InvoiceFeatures_eq(a: number, b: number): boolean {
14670                 if(!isWasmInitialized) {
14671                         throw new Error("initializeWasm() must be awaited first!");
14672                 }
14673                 const nativeResponseValue = wasm.InvoiceFeatures_eq(a, b);
14674                 return nativeResponseValue;
14675         }
14676         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
14677         export function InitFeatures_clone(orig: number): number {
14678                 if(!isWasmInitialized) {
14679                         throw new Error("initializeWasm() must be awaited first!");
14680                 }
14681                 const nativeResponseValue = wasm.InitFeatures_clone(orig);
14682                 return nativeResponseValue;
14683         }
14684         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
14685         export function NodeFeatures_clone(orig: number): number {
14686                 if(!isWasmInitialized) {
14687                         throw new Error("initializeWasm() must be awaited first!");
14688                 }
14689                 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
14690                 return nativeResponseValue;
14691         }
14692         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
14693         export function ChannelFeatures_clone(orig: number): number {
14694                 if(!isWasmInitialized) {
14695                         throw new Error("initializeWasm() must be awaited first!");
14696                 }
14697                 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
14698                 return nativeResponseValue;
14699         }
14700         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
14701         export function InvoiceFeatures_clone(orig: number): number {
14702                 if(!isWasmInitialized) {
14703                         throw new Error("initializeWasm() must be awaited first!");
14704                 }
14705                 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
14706                 return nativeResponseValue;
14707         }
14708         // void InitFeatures_free(struct LDKInitFeatures this_obj);
14709         export function InitFeatures_free(this_obj: number): void {
14710                 if(!isWasmInitialized) {
14711                         throw new Error("initializeWasm() must be awaited first!");
14712                 }
14713                 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
14714                 // debug statements here
14715         }
14716         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
14717         export function NodeFeatures_free(this_obj: number): void {
14718                 if(!isWasmInitialized) {
14719                         throw new Error("initializeWasm() must be awaited first!");
14720                 }
14721                 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
14722                 // debug statements here
14723         }
14724         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
14725         export function ChannelFeatures_free(this_obj: number): void {
14726                 if(!isWasmInitialized) {
14727                         throw new Error("initializeWasm() must be awaited first!");
14728                 }
14729                 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
14730                 // debug statements here
14731         }
14732         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
14733         export function InvoiceFeatures_free(this_obj: number): void {
14734                 if(!isWasmInitialized) {
14735                         throw new Error("initializeWasm() must be awaited first!");
14736                 }
14737                 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
14738                 // debug statements here
14739         }
14740         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
14741         export function InitFeatures_empty(): number {
14742                 if(!isWasmInitialized) {
14743                         throw new Error("initializeWasm() must be awaited first!");
14744                 }
14745                 const nativeResponseValue = wasm.InitFeatures_empty();
14746                 return nativeResponseValue;
14747         }
14748         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
14749         export function InitFeatures_known(): number {
14750                 if(!isWasmInitialized) {
14751                         throw new Error("initializeWasm() must be awaited first!");
14752                 }
14753                 const nativeResponseValue = wasm.InitFeatures_known();
14754                 return nativeResponseValue;
14755         }
14756         // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
14757         export function InitFeatures_requires_unknown_bits(this_arg: number): boolean {
14758                 if(!isWasmInitialized) {
14759                         throw new Error("initializeWasm() must be awaited first!");
14760                 }
14761                 const nativeResponseValue = wasm.InitFeatures_requires_unknown_bits(this_arg);
14762                 return nativeResponseValue;
14763         }
14764         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
14765         export function NodeFeatures_empty(): number {
14766                 if(!isWasmInitialized) {
14767                         throw new Error("initializeWasm() must be awaited first!");
14768                 }
14769                 const nativeResponseValue = wasm.NodeFeatures_empty();
14770                 return nativeResponseValue;
14771         }
14772         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
14773         export function NodeFeatures_known(): number {
14774                 if(!isWasmInitialized) {
14775                         throw new Error("initializeWasm() must be awaited first!");
14776                 }
14777                 const nativeResponseValue = wasm.NodeFeatures_known();
14778                 return nativeResponseValue;
14779         }
14780         // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
14781         export function NodeFeatures_requires_unknown_bits(this_arg: number): boolean {
14782                 if(!isWasmInitialized) {
14783                         throw new Error("initializeWasm() must be awaited first!");
14784                 }
14785                 const nativeResponseValue = wasm.NodeFeatures_requires_unknown_bits(this_arg);
14786                 return nativeResponseValue;
14787         }
14788         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
14789         export function ChannelFeatures_empty(): number {
14790                 if(!isWasmInitialized) {
14791                         throw new Error("initializeWasm() must be awaited first!");
14792                 }
14793                 const nativeResponseValue = wasm.ChannelFeatures_empty();
14794                 return nativeResponseValue;
14795         }
14796         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
14797         export function ChannelFeatures_known(): number {
14798                 if(!isWasmInitialized) {
14799                         throw new Error("initializeWasm() must be awaited first!");
14800                 }
14801                 const nativeResponseValue = wasm.ChannelFeatures_known();
14802                 return nativeResponseValue;
14803         }
14804         // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
14805         export function ChannelFeatures_requires_unknown_bits(this_arg: number): boolean {
14806                 if(!isWasmInitialized) {
14807                         throw new Error("initializeWasm() must be awaited first!");
14808                 }
14809                 const nativeResponseValue = wasm.ChannelFeatures_requires_unknown_bits(this_arg);
14810                 return nativeResponseValue;
14811         }
14812         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
14813         export function InvoiceFeatures_empty(): number {
14814                 if(!isWasmInitialized) {
14815                         throw new Error("initializeWasm() must be awaited first!");
14816                 }
14817                 const nativeResponseValue = wasm.InvoiceFeatures_empty();
14818                 return nativeResponseValue;
14819         }
14820         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
14821         export function InvoiceFeatures_known(): number {
14822                 if(!isWasmInitialized) {
14823                         throw new Error("initializeWasm() must be awaited first!");
14824                 }
14825                 const nativeResponseValue = wasm.InvoiceFeatures_known();
14826                 return nativeResponseValue;
14827         }
14828         // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
14829         export function InvoiceFeatures_requires_unknown_bits(this_arg: number): boolean {
14830                 if(!isWasmInitialized) {
14831                         throw new Error("initializeWasm() must be awaited first!");
14832                 }
14833                 const nativeResponseValue = wasm.InvoiceFeatures_requires_unknown_bits(this_arg);
14834                 return nativeResponseValue;
14835         }
14836         // MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg);
14837         export function InitFeatures_supports_payment_secret(this_arg: number): boolean {
14838                 if(!isWasmInitialized) {
14839                         throw new Error("initializeWasm() must be awaited first!");
14840                 }
14841                 const nativeResponseValue = wasm.InitFeatures_supports_payment_secret(this_arg);
14842                 return nativeResponseValue;
14843         }
14844         // MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
14845         export function NodeFeatures_supports_payment_secret(this_arg: number): boolean {
14846                 if(!isWasmInitialized) {
14847                         throw new Error("initializeWasm() must be awaited first!");
14848                 }
14849                 const nativeResponseValue = wasm.NodeFeatures_supports_payment_secret(this_arg);
14850                 return nativeResponseValue;
14851         }
14852         // MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
14853         export function InvoiceFeatures_supports_payment_secret(this_arg: number): boolean {
14854                 if(!isWasmInitialized) {
14855                         throw new Error("initializeWasm() must be awaited first!");
14856                 }
14857                 const nativeResponseValue = wasm.InvoiceFeatures_supports_payment_secret(this_arg);
14858                 return nativeResponseValue;
14859         }
14860         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
14861         export function InitFeatures_write(obj: number): Uint8Array {
14862                 if(!isWasmInitialized) {
14863                         throw new Error("initializeWasm() must be awaited first!");
14864                 }
14865                 const nativeResponseValue = wasm.InitFeatures_write(obj);
14866                 return decodeArray(nativeResponseValue);
14867         }
14868         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
14869         export function NodeFeatures_write(obj: number): Uint8Array {
14870                 if(!isWasmInitialized) {
14871                         throw new Error("initializeWasm() must be awaited first!");
14872                 }
14873                 const nativeResponseValue = wasm.NodeFeatures_write(obj);
14874                 return decodeArray(nativeResponseValue);
14875         }
14876         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
14877         export function ChannelFeatures_write(obj: number): Uint8Array {
14878                 if(!isWasmInitialized) {
14879                         throw new Error("initializeWasm() must be awaited first!");
14880                 }
14881                 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
14882                 return decodeArray(nativeResponseValue);
14883         }
14884         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
14885         export function InvoiceFeatures_write(obj: number): Uint8Array {
14886                 if(!isWasmInitialized) {
14887                         throw new Error("initializeWasm() must be awaited first!");
14888                 }
14889                 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
14890                 return decodeArray(nativeResponseValue);
14891         }
14892         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
14893         export function InitFeatures_read(ser: Uint8Array): number {
14894                 if(!isWasmInitialized) {
14895                         throw new Error("initializeWasm() must be awaited first!");
14896                 }
14897                 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
14898                 return nativeResponseValue;
14899         }
14900         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
14901         export function NodeFeatures_read(ser: Uint8Array): number {
14902                 if(!isWasmInitialized) {
14903                         throw new Error("initializeWasm() must be awaited first!");
14904                 }
14905                 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
14906                 return nativeResponseValue;
14907         }
14908         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
14909         export function ChannelFeatures_read(ser: Uint8Array): number {
14910                 if(!isWasmInitialized) {
14911                         throw new Error("initializeWasm() must be awaited first!");
14912                 }
14913                 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
14914                 return nativeResponseValue;
14915         }
14916         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
14917         export function InvoiceFeatures_read(ser: Uint8Array): number {
14918                 if(!isWasmInitialized) {
14919                         throw new Error("initializeWasm() must be awaited first!");
14920                 }
14921                 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
14922                 return nativeResponseValue;
14923         }
14924         // void ShutdownScript_free(struct LDKShutdownScript this_obj);
14925         export function ShutdownScript_free(this_obj: number): void {
14926                 if(!isWasmInitialized) {
14927                         throw new Error("initializeWasm() must be awaited first!");
14928                 }
14929                 const nativeResponseValue = wasm.ShutdownScript_free(this_obj);
14930                 // debug statements here
14931         }
14932         // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
14933         export function ShutdownScript_clone(orig: number): number {
14934                 if(!isWasmInitialized) {
14935                         throw new Error("initializeWasm() must be awaited first!");
14936                 }
14937                 const nativeResponseValue = wasm.ShutdownScript_clone(orig);
14938                 return nativeResponseValue;
14939         }
14940         // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
14941         export function InvalidShutdownScript_free(this_obj: number): void {
14942                 if(!isWasmInitialized) {
14943                         throw new Error("initializeWasm() must be awaited first!");
14944                 }
14945                 const nativeResponseValue = wasm.InvalidShutdownScript_free(this_obj);
14946                 // debug statements here
14947         }
14948         // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
14949         export function InvalidShutdownScript_get_script(this_ptr: number): Uint8Array {
14950                 if(!isWasmInitialized) {
14951                         throw new Error("initializeWasm() must be awaited first!");
14952                 }
14953                 const nativeResponseValue = wasm.InvalidShutdownScript_get_script(this_ptr);
14954                 return decodeArray(nativeResponseValue);
14955         }
14956         // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
14957         export function InvalidShutdownScript_set_script(this_ptr: number, val: Uint8Array): void {
14958                 if(!isWasmInitialized) {
14959                         throw new Error("initializeWasm() must be awaited first!");
14960                 }
14961                 const nativeResponseValue = wasm.InvalidShutdownScript_set_script(this_ptr, encodeArray(val));
14962                 // debug statements here
14963         }
14964         // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
14965         export function InvalidShutdownScript_new(script_arg: Uint8Array): number {
14966                 if(!isWasmInitialized) {
14967                         throw new Error("initializeWasm() must be awaited first!");
14968                 }
14969                 const nativeResponseValue = wasm.InvalidShutdownScript_new(encodeArray(script_arg));
14970                 return nativeResponseValue;
14971         }
14972         // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
14973         export function ShutdownScript_write(obj: number): Uint8Array {
14974                 if(!isWasmInitialized) {
14975                         throw new Error("initializeWasm() must be awaited first!");
14976                 }
14977                 const nativeResponseValue = wasm.ShutdownScript_write(obj);
14978                 return decodeArray(nativeResponseValue);
14979         }
14980         // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
14981         export function ShutdownScript_read(ser: Uint8Array): number {
14982                 if(!isWasmInitialized) {
14983                         throw new Error("initializeWasm() must be awaited first!");
14984                 }
14985                 const nativeResponseValue = wasm.ShutdownScript_read(encodeArray(ser));
14986                 return nativeResponseValue;
14987         }
14988         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2pkh(const uint8_t (*pubkey_hash)[20]);
14989         export function ShutdownScript_new_p2pkh(pubkey_hash: Uint8Array): number {
14990                 if(!isWasmInitialized) {
14991                         throw new Error("initializeWasm() must be awaited first!");
14992                 }
14993                 const nativeResponseValue = wasm.ShutdownScript_new_p2pkh(encodeArray(pubkey_hash));
14994                 return nativeResponseValue;
14995         }
14996         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2sh(const uint8_t (*script_hash)[20]);
14997         export function ShutdownScript_new_p2sh(script_hash: Uint8Array): number {
14998                 if(!isWasmInitialized) {
14999                         throw new Error("initializeWasm() must be awaited first!");
15000                 }
15001                 const nativeResponseValue = wasm.ShutdownScript_new_p2sh(encodeArray(script_hash));
15002                 return nativeResponseValue;
15003         }
15004         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
15005         export function ShutdownScript_new_p2wpkh(pubkey_hash: Uint8Array): number {
15006                 if(!isWasmInitialized) {
15007                         throw new Error("initializeWasm() must be awaited first!");
15008                 }
15009                 const nativeResponseValue = wasm.ShutdownScript_new_p2wpkh(encodeArray(pubkey_hash));
15010                 return nativeResponseValue;
15011         }
15012         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
15013         export function ShutdownScript_new_p2wsh(script_hash: Uint8Array): number {
15014                 if(!isWasmInitialized) {
15015                         throw new Error("initializeWasm() must be awaited first!");
15016                 }
15017                 const nativeResponseValue = wasm.ShutdownScript_new_p2wsh(encodeArray(script_hash));
15018                 return nativeResponseValue;
15019         }
15020         // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
15021         export function ShutdownScript_new_witness_program(version: number, program: Uint8Array): number {
15022                 if(!isWasmInitialized) {
15023                         throw new Error("initializeWasm() must be awaited first!");
15024                 }
15025                 const nativeResponseValue = wasm.ShutdownScript_new_witness_program(version, encodeArray(program));
15026                 return nativeResponseValue;
15027         }
15028         // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
15029         export function ShutdownScript_into_inner(this_arg: number): Uint8Array {
15030                 if(!isWasmInitialized) {
15031                         throw new Error("initializeWasm() must be awaited first!");
15032                 }
15033                 const nativeResponseValue = wasm.ShutdownScript_into_inner(this_arg);
15034                 return decodeArray(nativeResponseValue);
15035         }
15036         // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
15037         export function ShutdownScript_as_legacy_pubkey(this_arg: number): Uint8Array {
15038                 if(!isWasmInitialized) {
15039                         throw new Error("initializeWasm() must be awaited first!");
15040                 }
15041                 const nativeResponseValue = wasm.ShutdownScript_as_legacy_pubkey(this_arg);
15042                 return decodeArray(nativeResponseValue);
15043         }
15044         // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
15045         export function ShutdownScript_is_compatible(this_arg: number, features: number): boolean {
15046                 if(!isWasmInitialized) {
15047                         throw new Error("initializeWasm() must be awaited first!");
15048                 }
15049                 const nativeResponseValue = wasm.ShutdownScript_is_compatible(this_arg, features);
15050                 return nativeResponseValue;
15051         }
15052         // void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
15053         export function CustomMessageReader_free(this_ptr: number): void {
15054                 if(!isWasmInitialized) {
15055                         throw new Error("initializeWasm() must be awaited first!");
15056                 }
15057                 const nativeResponseValue = wasm.CustomMessageReader_free(this_ptr);
15058                 // debug statements here
15059         }
15060         // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
15061         export function Type_clone(orig: number): number {
15062                 if(!isWasmInitialized) {
15063                         throw new Error("initializeWasm() must be awaited first!");
15064                 }
15065                 const nativeResponseValue = wasm.Type_clone(orig);
15066                 return nativeResponseValue;
15067         }
15068         // void Type_free(struct LDKType this_ptr);
15069         export function Type_free(this_ptr: number): void {
15070                 if(!isWasmInitialized) {
15071                         throw new Error("initializeWasm() must be awaited first!");
15072                 }
15073                 const nativeResponseValue = wasm.Type_free(this_ptr);
15074                 // debug statements here
15075         }
15076         // void RouteHop_free(struct LDKRouteHop this_obj);
15077         export function RouteHop_free(this_obj: number): void {
15078                 if(!isWasmInitialized) {
15079                         throw new Error("initializeWasm() must be awaited first!");
15080                 }
15081                 const nativeResponseValue = wasm.RouteHop_free(this_obj);
15082                 // debug statements here
15083         }
15084         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
15085         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
15086                 if(!isWasmInitialized) {
15087                         throw new Error("initializeWasm() must be awaited first!");
15088                 }
15089                 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
15090                 return decodeArray(nativeResponseValue);
15091         }
15092         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15093         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
15094                 if(!isWasmInitialized) {
15095                         throw new Error("initializeWasm() must be awaited first!");
15096                 }
15097                 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
15098                 // debug statements here
15099         }
15100         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
15101         export function RouteHop_get_node_features(this_ptr: number): number {
15102                 if(!isWasmInitialized) {
15103                         throw new Error("initializeWasm() must be awaited first!");
15104                 }
15105                 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
15106                 return nativeResponseValue;
15107         }
15108         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
15109         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
15110                 if(!isWasmInitialized) {
15111                         throw new Error("initializeWasm() must be awaited first!");
15112                 }
15113                 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
15114                 // debug statements here
15115         }
15116         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
15117         export function RouteHop_get_short_channel_id(this_ptr: number): number {
15118                 if(!isWasmInitialized) {
15119                         throw new Error("initializeWasm() must be awaited first!");
15120                 }
15121                 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
15122                 return nativeResponseValue;
15123         }
15124         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
15125         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
15126                 if(!isWasmInitialized) {
15127                         throw new Error("initializeWasm() must be awaited first!");
15128                 }
15129                 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
15130                 // debug statements here
15131         }
15132         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
15133         export function RouteHop_get_channel_features(this_ptr: number): number {
15134                 if(!isWasmInitialized) {
15135                         throw new Error("initializeWasm() must be awaited first!");
15136                 }
15137                 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
15138                 return nativeResponseValue;
15139         }
15140         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
15141         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
15142                 if(!isWasmInitialized) {
15143                         throw new Error("initializeWasm() must be awaited first!");
15144                 }
15145                 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
15146                 // debug statements here
15147         }
15148         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
15149         export function RouteHop_get_fee_msat(this_ptr: number): number {
15150                 if(!isWasmInitialized) {
15151                         throw new Error("initializeWasm() must be awaited first!");
15152                 }
15153                 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
15154                 return nativeResponseValue;
15155         }
15156         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
15157         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
15158                 if(!isWasmInitialized) {
15159                         throw new Error("initializeWasm() must be awaited first!");
15160                 }
15161                 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
15162                 // debug statements here
15163         }
15164         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
15165         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
15166                 if(!isWasmInitialized) {
15167                         throw new Error("initializeWasm() must be awaited first!");
15168                 }
15169                 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
15170                 return nativeResponseValue;
15171         }
15172         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
15173         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
15174                 if(!isWasmInitialized) {
15175                         throw new Error("initializeWasm() must be awaited first!");
15176                 }
15177                 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
15178                 // debug statements here
15179         }
15180         // 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);
15181         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 {
15182                 if(!isWasmInitialized) {
15183                         throw new Error("initializeWasm() must be awaited first!");
15184                 }
15185                 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);
15186                 return nativeResponseValue;
15187         }
15188         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
15189         export function RouteHop_clone(orig: number): number {
15190                 if(!isWasmInitialized) {
15191                         throw new Error("initializeWasm() must be awaited first!");
15192                 }
15193                 const nativeResponseValue = wasm.RouteHop_clone(orig);
15194                 return nativeResponseValue;
15195         }
15196         // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
15197         export function RouteHop_hash(o: number): number {
15198                 if(!isWasmInitialized) {
15199                         throw new Error("initializeWasm() must be awaited first!");
15200                 }
15201                 const nativeResponseValue = wasm.RouteHop_hash(o);
15202                 return nativeResponseValue;
15203         }
15204         // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
15205         export function RouteHop_eq(a: number, b: number): boolean {
15206                 if(!isWasmInitialized) {
15207                         throw new Error("initializeWasm() must be awaited first!");
15208                 }
15209                 const nativeResponseValue = wasm.RouteHop_eq(a, b);
15210                 return nativeResponseValue;
15211         }
15212         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
15213         export function RouteHop_write(obj: number): Uint8Array {
15214                 if(!isWasmInitialized) {
15215                         throw new Error("initializeWasm() must be awaited first!");
15216                 }
15217                 const nativeResponseValue = wasm.RouteHop_write(obj);
15218                 return decodeArray(nativeResponseValue);
15219         }
15220         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
15221         export function RouteHop_read(ser: Uint8Array): number {
15222                 if(!isWasmInitialized) {
15223                         throw new Error("initializeWasm() must be awaited first!");
15224                 }
15225                 const nativeResponseValue = wasm.RouteHop_read(encodeArray(ser));
15226                 return nativeResponseValue;
15227         }
15228         // void Route_free(struct LDKRoute this_obj);
15229         export function Route_free(this_obj: number): void {
15230                 if(!isWasmInitialized) {
15231                         throw new Error("initializeWasm() must be awaited first!");
15232                 }
15233                 const nativeResponseValue = wasm.Route_free(this_obj);
15234                 // debug statements here
15235         }
15236         // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
15237         export function Route_get_paths(this_ptr: number): number[][] {
15238                 if(!isWasmInitialized) {
15239                         throw new Error("initializeWasm() must be awaited first!");
15240                 }
15241                 const nativeResponseValue = wasm.Route_get_paths(this_ptr);
15242                 return nativeResponseValue;
15243         }
15244         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
15245         export function Route_set_paths(this_ptr: number, val: number[][]): void {
15246                 if(!isWasmInitialized) {
15247                         throw new Error("initializeWasm() must be awaited first!");
15248                 }
15249                 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
15250                 // debug statements here
15251         }
15252         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
15253         export function Route_new(paths_arg: number[][]): number {
15254                 if(!isWasmInitialized) {
15255                         throw new Error("initializeWasm() must be awaited first!");
15256                 }
15257                 const nativeResponseValue = wasm.Route_new(paths_arg);
15258                 return nativeResponseValue;
15259         }
15260         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
15261         export function Route_clone(orig: number): number {
15262                 if(!isWasmInitialized) {
15263                         throw new Error("initializeWasm() must be awaited first!");
15264                 }
15265                 const nativeResponseValue = wasm.Route_clone(orig);
15266                 return nativeResponseValue;
15267         }
15268         // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
15269         export function Route_hash(o: number): number {
15270                 if(!isWasmInitialized) {
15271                         throw new Error("initializeWasm() must be awaited first!");
15272                 }
15273                 const nativeResponseValue = wasm.Route_hash(o);
15274                 return nativeResponseValue;
15275         }
15276         // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
15277         export function Route_eq(a: number, b: number): boolean {
15278                 if(!isWasmInitialized) {
15279                         throw new Error("initializeWasm() must be awaited first!");
15280                 }
15281                 const nativeResponseValue = wasm.Route_eq(a, b);
15282                 return nativeResponseValue;
15283         }
15284         // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
15285         export function Route_get_total_fees(this_arg: number): number {
15286                 if(!isWasmInitialized) {
15287                         throw new Error("initializeWasm() must be awaited first!");
15288                 }
15289                 const nativeResponseValue = wasm.Route_get_total_fees(this_arg);
15290                 return nativeResponseValue;
15291         }
15292         // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
15293         export function Route_get_total_amount(this_arg: number): number {
15294                 if(!isWasmInitialized) {
15295                         throw new Error("initializeWasm() must be awaited first!");
15296                 }
15297                 const nativeResponseValue = wasm.Route_get_total_amount(this_arg);
15298                 return nativeResponseValue;
15299         }
15300         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
15301         export function Route_write(obj: number): Uint8Array {
15302                 if(!isWasmInitialized) {
15303                         throw new Error("initializeWasm() must be awaited first!");
15304                 }
15305                 const nativeResponseValue = wasm.Route_write(obj);
15306                 return decodeArray(nativeResponseValue);
15307         }
15308         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
15309         export function Route_read(ser: Uint8Array): number {
15310                 if(!isWasmInitialized) {
15311                         throw new Error("initializeWasm() must be awaited first!");
15312                 }
15313                 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
15314                 return nativeResponseValue;
15315         }
15316         // void RouteHint_free(struct LDKRouteHint this_obj);
15317         export function RouteHint_free(this_obj: number): void {
15318                 if(!isWasmInitialized) {
15319                         throw new Error("initializeWasm() must be awaited first!");
15320                 }
15321                 const nativeResponseValue = wasm.RouteHint_free(this_obj);
15322                 // debug statements here
15323         }
15324         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
15325         export function RouteHint_clone(orig: number): number {
15326                 if(!isWasmInitialized) {
15327                         throw new Error("initializeWasm() must be awaited first!");
15328                 }
15329                 const nativeResponseValue = wasm.RouteHint_clone(orig);
15330                 return nativeResponseValue;
15331         }
15332         // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
15333         export function RouteHint_hash(o: number): number {
15334                 if(!isWasmInitialized) {
15335                         throw new Error("initializeWasm() must be awaited first!");
15336                 }
15337                 const nativeResponseValue = wasm.RouteHint_hash(o);
15338                 return nativeResponseValue;
15339         }
15340         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
15341         export function RouteHint_eq(a: number, b: number): boolean {
15342                 if(!isWasmInitialized) {
15343                         throw new Error("initializeWasm() must be awaited first!");
15344                 }
15345                 const nativeResponseValue = wasm.RouteHint_eq(a, b);
15346                 return nativeResponseValue;
15347         }
15348         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
15349         export function RouteHintHop_free(this_obj: number): void {
15350                 if(!isWasmInitialized) {
15351                         throw new Error("initializeWasm() must be awaited first!");
15352                 }
15353                 const nativeResponseValue = wasm.RouteHintHop_free(this_obj);
15354                 // debug statements here
15355         }
15356         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
15357         export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
15358                 if(!isWasmInitialized) {
15359                         throw new Error("initializeWasm() must be awaited first!");
15360                 }
15361                 const nativeResponseValue = wasm.RouteHintHop_get_src_node_id(this_ptr);
15362                 return decodeArray(nativeResponseValue);
15363         }
15364         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15365         export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
15366                 if(!isWasmInitialized) {
15367                         throw new Error("initializeWasm() must be awaited first!");
15368                 }
15369                 const nativeResponseValue = wasm.RouteHintHop_set_src_node_id(this_ptr, encodeArray(val));
15370                 // debug statements here
15371         }
15372         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
15373         export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
15374                 if(!isWasmInitialized) {
15375                         throw new Error("initializeWasm() must be awaited first!");
15376                 }
15377                 const nativeResponseValue = wasm.RouteHintHop_get_short_channel_id(this_ptr);
15378                 return nativeResponseValue;
15379         }
15380         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
15381         export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
15382                 if(!isWasmInitialized) {
15383                         throw new Error("initializeWasm() must be awaited first!");
15384                 }
15385                 const nativeResponseValue = wasm.RouteHintHop_set_short_channel_id(this_ptr, val);
15386                 // debug statements here
15387         }
15388         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
15389         export function RouteHintHop_get_fees(this_ptr: number): number {
15390                 if(!isWasmInitialized) {
15391                         throw new Error("initializeWasm() must be awaited first!");
15392                 }
15393                 const nativeResponseValue = wasm.RouteHintHop_get_fees(this_ptr);
15394                 return nativeResponseValue;
15395         }
15396         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
15397         export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
15398                 if(!isWasmInitialized) {
15399                         throw new Error("initializeWasm() must be awaited first!");
15400                 }
15401                 const nativeResponseValue = wasm.RouteHintHop_set_fees(this_ptr, val);
15402                 // debug statements here
15403         }
15404         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
15405         export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
15406                 if(!isWasmInitialized) {
15407                         throw new Error("initializeWasm() must be awaited first!");
15408                 }
15409                 const nativeResponseValue = wasm.RouteHintHop_get_cltv_expiry_delta(this_ptr);
15410                 return nativeResponseValue;
15411         }
15412         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
15413         export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
15414                 if(!isWasmInitialized) {
15415                         throw new Error("initializeWasm() must be awaited first!");
15416                 }
15417                 const nativeResponseValue = wasm.RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
15418                 // debug statements here
15419         }
15420         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
15421         export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
15422                 if(!isWasmInitialized) {
15423                         throw new Error("initializeWasm() must be awaited first!");
15424                 }
15425                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_minimum_msat(this_ptr);
15426                 return nativeResponseValue;
15427         }
15428         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
15429         export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
15430                 if(!isWasmInitialized) {
15431                         throw new Error("initializeWasm() must be awaited first!");
15432                 }
15433                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
15434                 // debug statements here
15435         }
15436         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
15437         export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
15438                 if(!isWasmInitialized) {
15439                         throw new Error("initializeWasm() must be awaited first!");
15440                 }
15441                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_maximum_msat(this_ptr);
15442                 return nativeResponseValue;
15443         }
15444         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
15445         export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
15446                 if(!isWasmInitialized) {
15447                         throw new Error("initializeWasm() must be awaited first!");
15448                 }
15449                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
15450                 // debug statements here
15451         }
15452         // 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);
15453         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 {
15454                 if(!isWasmInitialized) {
15455                         throw new Error("initializeWasm() must be awaited first!");
15456                 }
15457                 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);
15458                 return nativeResponseValue;
15459         }
15460         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
15461         export function RouteHintHop_clone(orig: number): number {
15462                 if(!isWasmInitialized) {
15463                         throw new Error("initializeWasm() must be awaited first!");
15464                 }
15465                 const nativeResponseValue = wasm.RouteHintHop_clone(orig);
15466                 return nativeResponseValue;
15467         }
15468         // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
15469         export function RouteHintHop_hash(o: number): number {
15470                 if(!isWasmInitialized) {
15471                         throw new Error("initializeWasm() must be awaited first!");
15472                 }
15473                 const nativeResponseValue = wasm.RouteHintHop_hash(o);
15474                 return nativeResponseValue;
15475         }
15476         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
15477         export function RouteHintHop_eq(a: number, b: number): boolean {
15478                 if(!isWasmInitialized) {
15479                         throw new Error("initializeWasm() must be awaited first!");
15480                 }
15481                 const nativeResponseValue = wasm.RouteHintHop_eq(a, b);
15482                 return nativeResponseValue;
15483         }
15484         // 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);
15485         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 {
15486                 if(!isWasmInitialized) {
15487                         throw new Error("initializeWasm() must be awaited first!");
15488                 }
15489                 const nativeResponseValue = wasm.get_keysend_route(encodeArray(our_node_id), network, encodeArray(payee), first_hops, last_hops, final_value_msat, final_cltv, logger);
15490                 return nativeResponseValue;
15491         }
15492         // 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);
15493         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 {
15494                 if(!isWasmInitialized) {
15495                         throw new Error("initializeWasm() must be awaited first!");
15496                 }
15497                 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger);
15498                 return nativeResponseValue;
15499         }
15500         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
15501         export function NetworkGraph_free(this_obj: number): void {
15502                 if(!isWasmInitialized) {
15503                         throw new Error("initializeWasm() must be awaited first!");
15504                 }
15505                 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
15506                 // debug statements here
15507         }
15508         // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
15509         export function ReadOnlyNetworkGraph_free(this_obj: number): void {
15510                 if(!isWasmInitialized) {
15511                         throw new Error("initializeWasm() must be awaited first!");
15512                 }
15513                 const nativeResponseValue = wasm.ReadOnlyNetworkGraph_free(this_obj);
15514                 // debug statements here
15515         }
15516         // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
15517         export function NetworkUpdate_free(this_ptr: number): void {
15518                 if(!isWasmInitialized) {
15519                         throw new Error("initializeWasm() must be awaited first!");
15520                 }
15521                 const nativeResponseValue = wasm.NetworkUpdate_free(this_ptr);
15522                 // debug statements here
15523         }
15524         // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
15525         export function NetworkUpdate_clone(orig: number): number {
15526                 if(!isWasmInitialized) {
15527                         throw new Error("initializeWasm() must be awaited first!");
15528                 }
15529                 const nativeResponseValue = wasm.NetworkUpdate_clone(orig);
15530                 return nativeResponseValue;
15531         }
15532         // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
15533         export function NetworkUpdate_channel_update_message(msg: number): number {
15534                 if(!isWasmInitialized) {
15535                         throw new Error("initializeWasm() must be awaited first!");
15536                 }
15537                 const nativeResponseValue = wasm.NetworkUpdate_channel_update_message(msg);
15538                 return nativeResponseValue;
15539         }
15540         // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
15541         export function NetworkUpdate_channel_closed(short_channel_id: number, is_permanent: boolean): number {
15542                 if(!isWasmInitialized) {
15543                         throw new Error("initializeWasm() must be awaited first!");
15544                 }
15545                 const nativeResponseValue = wasm.NetworkUpdate_channel_closed(short_channel_id, is_permanent);
15546                 return nativeResponseValue;
15547         }
15548         // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
15549         export function NetworkUpdate_node_failure(node_id: Uint8Array, is_permanent: boolean): number {
15550                 if(!isWasmInitialized) {
15551                         throw new Error("initializeWasm() must be awaited first!");
15552                 }
15553                 const nativeResponseValue = wasm.NetworkUpdate_node_failure(encodeArray(node_id), is_permanent);
15554                 return nativeResponseValue;
15555         }
15556         // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
15557         export function NetworkUpdate_write(obj: number): Uint8Array {
15558                 if(!isWasmInitialized) {
15559                         throw new Error("initializeWasm() must be awaited first!");
15560                 }
15561                 const nativeResponseValue = wasm.NetworkUpdate_write(obj);
15562                 return decodeArray(nativeResponseValue);
15563         }
15564         // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
15565         export function NetGraphMsgHandler_as_EventHandler(this_arg: number): number {
15566                 if(!isWasmInitialized) {
15567                         throw new Error("initializeWasm() must be awaited first!");
15568                 }
15569                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_EventHandler(this_arg);
15570                 return nativeResponseValue;
15571         }
15572         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
15573         export function NetGraphMsgHandler_free(this_obj: number): void {
15574                 if(!isWasmInitialized) {
15575                         throw new Error("initializeWasm() must be awaited first!");
15576                 }
15577                 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
15578                 // debug statements here
15579         }
15580         // struct LDKNetworkGraph NetGraphMsgHandler_get_network_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_ptr);
15581         export function NetGraphMsgHandler_get_network_graph(this_ptr: number): number {
15582                 if(!isWasmInitialized) {
15583                         throw new Error("initializeWasm() must be awaited first!");
15584                 }
15585                 const nativeResponseValue = wasm.NetGraphMsgHandler_get_network_graph(this_ptr);
15586                 return nativeResponseValue;
15587         }
15588         // void NetGraphMsgHandler_set_network_graph(struct LDKNetGraphMsgHandler *NONNULL_PTR this_ptr, struct LDKNetworkGraph val);
15589         export function NetGraphMsgHandler_set_network_graph(this_ptr: number, val: number): void {
15590                 if(!isWasmInitialized) {
15591                         throw new Error("initializeWasm() must be awaited first!");
15592                 }
15593                 const nativeResponseValue = wasm.NetGraphMsgHandler_set_network_graph(this_ptr, val);
15594                 // debug statements here
15595         }
15596         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKNetworkGraph network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
15597         export function NetGraphMsgHandler_new(network_graph: number, chain_access: number, logger: number): number {
15598                 if(!isWasmInitialized) {
15599                         throw new Error("initializeWasm() must be awaited first!");
15600                 }
15601                 const nativeResponseValue = wasm.NetGraphMsgHandler_new(network_graph, chain_access, logger);
15602                 return nativeResponseValue;
15603         }
15604         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
15605         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
15606                 if(!isWasmInitialized) {
15607                         throw new Error("initializeWasm() must be awaited first!");
15608                 }
15609                 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
15610                 // debug statements here
15611         }
15612         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
15613         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
15614                 if(!isWasmInitialized) {
15615                         throw new Error("initializeWasm() must be awaited first!");
15616                 }
15617                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
15618                 return nativeResponseValue;
15619         }
15620         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
15621         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
15622                 if(!isWasmInitialized) {
15623                         throw new Error("initializeWasm() must be awaited first!");
15624                 }
15625                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
15626                 return nativeResponseValue;
15627         }
15628         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
15629         export function DirectionalChannelInfo_free(this_obj: number): void {
15630                 if(!isWasmInitialized) {
15631                         throw new Error("initializeWasm() must be awaited first!");
15632                 }
15633                 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
15634                 // debug statements here
15635         }
15636         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15637         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
15638                 if(!isWasmInitialized) {
15639                         throw new Error("initializeWasm() must be awaited first!");
15640                 }
15641                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
15642                 return nativeResponseValue;
15643         }
15644         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
15645         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
15646                 if(!isWasmInitialized) {
15647                         throw new Error("initializeWasm() must be awaited first!");
15648                 }
15649                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
15650                 // debug statements here
15651         }
15652         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15653         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
15654                 if(!isWasmInitialized) {
15655                         throw new Error("initializeWasm() must be awaited first!");
15656                 }
15657                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
15658                 return nativeResponseValue;
15659         }
15660         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
15661         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
15662                 if(!isWasmInitialized) {
15663                         throw new Error("initializeWasm() must be awaited first!");
15664                 }
15665                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
15666                 // debug statements here
15667         }
15668         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15669         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
15670                 if(!isWasmInitialized) {
15671                         throw new Error("initializeWasm() must be awaited first!");
15672                 }
15673                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
15674                 return nativeResponseValue;
15675         }
15676         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
15677         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
15678                 if(!isWasmInitialized) {
15679                         throw new Error("initializeWasm() must be awaited first!");
15680                 }
15681                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
15682                 // debug statements here
15683         }
15684         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15685         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
15686                 if(!isWasmInitialized) {
15687                         throw new Error("initializeWasm() must be awaited first!");
15688                 }
15689                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
15690                 return nativeResponseValue;
15691         }
15692         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
15693         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
15694                 if(!isWasmInitialized) {
15695                         throw new Error("initializeWasm() must be awaited first!");
15696                 }
15697                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
15698                 // debug statements here
15699         }
15700         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15701         export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
15702                 if(!isWasmInitialized) {
15703                         throw new Error("initializeWasm() must be awaited first!");
15704                 }
15705                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
15706                 return nativeResponseValue;
15707         }
15708         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
15709         export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
15710                 if(!isWasmInitialized) {
15711                         throw new Error("initializeWasm() must be awaited first!");
15712                 }
15713                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
15714                 // debug statements here
15715         }
15716         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15717         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
15718                 if(!isWasmInitialized) {
15719                         throw new Error("initializeWasm() must be awaited first!");
15720                 }
15721                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
15722                 return nativeResponseValue;
15723         }
15724         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
15725         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
15726                 if(!isWasmInitialized) {
15727                         throw new Error("initializeWasm() must be awaited first!");
15728                 }
15729                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
15730                 // debug statements here
15731         }
15732         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15733         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
15734                 if(!isWasmInitialized) {
15735                         throw new Error("initializeWasm() must be awaited first!");
15736                 }
15737                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
15738                 return nativeResponseValue;
15739         }
15740         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
15741         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
15742                 if(!isWasmInitialized) {
15743                         throw new Error("initializeWasm() must be awaited first!");
15744                 }
15745                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
15746                 // debug statements here
15747         }
15748         // 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);
15749         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 {
15750                 if(!isWasmInitialized) {
15751                         throw new Error("initializeWasm() must be awaited first!");
15752                 }
15753                 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);
15754                 return nativeResponseValue;
15755         }
15756         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
15757         export function DirectionalChannelInfo_clone(orig: number): number {
15758                 if(!isWasmInitialized) {
15759                         throw new Error("initializeWasm() must be awaited first!");
15760                 }
15761                 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
15762                 return nativeResponseValue;
15763         }
15764         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
15765         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
15766                 if(!isWasmInitialized) {
15767                         throw new Error("initializeWasm() must be awaited first!");
15768                 }
15769                 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
15770                 return decodeArray(nativeResponseValue);
15771         }
15772         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
15773         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
15774                 if(!isWasmInitialized) {
15775                         throw new Error("initializeWasm() must be awaited first!");
15776                 }
15777                 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
15778                 return nativeResponseValue;
15779         }
15780         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
15781         export function ChannelInfo_free(this_obj: number): void {
15782                 if(!isWasmInitialized) {
15783                         throw new Error("initializeWasm() must be awaited first!");
15784                 }
15785                 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
15786                 // debug statements here
15787         }
15788         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
15789         export function ChannelInfo_get_features(this_ptr: number): number {
15790                 if(!isWasmInitialized) {
15791                         throw new Error("initializeWasm() must be awaited first!");
15792                 }
15793                 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
15794                 return nativeResponseValue;
15795         }
15796         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
15797         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
15798                 if(!isWasmInitialized) {
15799                         throw new Error("initializeWasm() must be awaited first!");
15800                 }
15801                 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
15802                 // debug statements here
15803         }
15804         // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
15805         export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
15806                 if(!isWasmInitialized) {
15807                         throw new Error("initializeWasm() must be awaited first!");
15808                 }
15809                 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
15810                 return decodeArray(nativeResponseValue);
15811         }
15812         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15813         export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
15814                 if(!isWasmInitialized) {
15815                         throw new Error("initializeWasm() must be awaited first!");
15816                 }
15817                 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
15818                 // debug statements here
15819         }
15820         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
15821         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
15822                 if(!isWasmInitialized) {
15823                         throw new Error("initializeWasm() must be awaited first!");
15824                 }
15825                 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
15826                 return nativeResponseValue;
15827         }
15828         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
15829         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
15830                 if(!isWasmInitialized) {
15831                         throw new Error("initializeWasm() must be awaited first!");
15832                 }
15833                 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
15834                 // debug statements here
15835         }
15836         // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
15837         export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
15838                 if(!isWasmInitialized) {
15839                         throw new Error("initializeWasm() must be awaited first!");
15840                 }
15841                 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
15842                 return decodeArray(nativeResponseValue);
15843         }
15844         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15845         export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
15846                 if(!isWasmInitialized) {
15847                         throw new Error("initializeWasm() must be awaited first!");
15848                 }
15849                 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
15850                 // debug statements here
15851         }
15852         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
15853         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
15854                 if(!isWasmInitialized) {
15855                         throw new Error("initializeWasm() must be awaited first!");
15856                 }
15857                 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
15858                 return nativeResponseValue;
15859         }
15860         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
15861         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
15862                 if(!isWasmInitialized) {
15863                         throw new Error("initializeWasm() must be awaited first!");
15864                 }
15865                 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
15866                 // debug statements here
15867         }
15868         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
15869         export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
15870                 if(!isWasmInitialized) {
15871                         throw new Error("initializeWasm() must be awaited first!");
15872                 }
15873                 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
15874                 return nativeResponseValue;
15875         }
15876         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
15877         export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
15878                 if(!isWasmInitialized) {
15879                         throw new Error("initializeWasm() must be awaited first!");
15880                 }
15881                 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
15882                 // debug statements here
15883         }
15884         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
15885         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
15886                 if(!isWasmInitialized) {
15887                         throw new Error("initializeWasm() must be awaited first!");
15888                 }
15889                 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
15890                 return nativeResponseValue;
15891         }
15892         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
15893         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
15894                 if(!isWasmInitialized) {
15895                         throw new Error("initializeWasm() must be awaited first!");
15896                 }
15897                 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
15898                 // debug statements here
15899         }
15900         // 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);
15901         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 {
15902                 if(!isWasmInitialized) {
15903                         throw new Error("initializeWasm() must be awaited first!");
15904                 }
15905                 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);
15906                 return nativeResponseValue;
15907         }
15908         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
15909         export function ChannelInfo_clone(orig: number): number {
15910                 if(!isWasmInitialized) {
15911                         throw new Error("initializeWasm() must be awaited first!");
15912                 }
15913                 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
15914                 return nativeResponseValue;
15915         }
15916         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
15917         export function ChannelInfo_write(obj: number): Uint8Array {
15918                 if(!isWasmInitialized) {
15919                         throw new Error("initializeWasm() must be awaited first!");
15920                 }
15921                 const nativeResponseValue = wasm.ChannelInfo_write(obj);
15922                 return decodeArray(nativeResponseValue);
15923         }
15924         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
15925         export function ChannelInfo_read(ser: Uint8Array): number {
15926                 if(!isWasmInitialized) {
15927                         throw new Error("initializeWasm() must be awaited first!");
15928                 }
15929                 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
15930                 return nativeResponseValue;
15931         }
15932         // void RoutingFees_free(struct LDKRoutingFees this_obj);
15933         export function RoutingFees_free(this_obj: number): void {
15934                 if(!isWasmInitialized) {
15935                         throw new Error("initializeWasm() must be awaited first!");
15936                 }
15937                 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
15938                 // debug statements here
15939         }
15940         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
15941         export function RoutingFees_get_base_msat(this_ptr: number): number {
15942                 if(!isWasmInitialized) {
15943                         throw new Error("initializeWasm() must be awaited first!");
15944                 }
15945                 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
15946                 return nativeResponseValue;
15947         }
15948         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
15949         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
15950                 if(!isWasmInitialized) {
15951                         throw new Error("initializeWasm() must be awaited first!");
15952                 }
15953                 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
15954                 // debug statements here
15955         }
15956         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
15957         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
15958                 if(!isWasmInitialized) {
15959                         throw new Error("initializeWasm() must be awaited first!");
15960                 }
15961                 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
15962                 return nativeResponseValue;
15963         }
15964         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
15965         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
15966                 if(!isWasmInitialized) {
15967                         throw new Error("initializeWasm() must be awaited first!");
15968                 }
15969                 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
15970                 // debug statements here
15971         }
15972         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
15973         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
15974                 if(!isWasmInitialized) {
15975                         throw new Error("initializeWasm() must be awaited first!");
15976                 }
15977                 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
15978                 return nativeResponseValue;
15979         }
15980         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
15981         export function RoutingFees_eq(a: number, b: number): boolean {
15982                 if(!isWasmInitialized) {
15983                         throw new Error("initializeWasm() must be awaited first!");
15984                 }
15985                 const nativeResponseValue = wasm.RoutingFees_eq(a, b);
15986                 return nativeResponseValue;
15987         }
15988         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
15989         export function RoutingFees_clone(orig: number): number {
15990                 if(!isWasmInitialized) {
15991                         throw new Error("initializeWasm() must be awaited first!");
15992                 }
15993                 const nativeResponseValue = wasm.RoutingFees_clone(orig);
15994                 return nativeResponseValue;
15995         }
15996         // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
15997         export function RoutingFees_hash(o: number): number {
15998                 if(!isWasmInitialized) {
15999                         throw new Error("initializeWasm() must be awaited first!");
16000                 }
16001                 const nativeResponseValue = wasm.RoutingFees_hash(o);
16002                 return nativeResponseValue;
16003         }
16004         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
16005         export function RoutingFees_write(obj: number): Uint8Array {
16006                 if(!isWasmInitialized) {
16007                         throw new Error("initializeWasm() must be awaited first!");
16008                 }
16009                 const nativeResponseValue = wasm.RoutingFees_write(obj);
16010                 return decodeArray(nativeResponseValue);
16011         }
16012         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
16013         export function RoutingFees_read(ser: Uint8Array): number {
16014                 if(!isWasmInitialized) {
16015                         throw new Error("initializeWasm() must be awaited first!");
16016                 }
16017                 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
16018                 return nativeResponseValue;
16019         }
16020         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
16021         export function NodeAnnouncementInfo_free(this_obj: number): void {
16022                 if(!isWasmInitialized) {
16023                         throw new Error("initializeWasm() must be awaited first!");
16024                 }
16025                 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
16026                 // debug statements here
16027         }
16028         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16029         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
16030                 if(!isWasmInitialized) {
16031                         throw new Error("initializeWasm() must be awaited first!");
16032                 }
16033                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
16034                 return nativeResponseValue;
16035         }
16036         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
16037         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
16038                 if(!isWasmInitialized) {
16039                         throw new Error("initializeWasm() must be awaited first!");
16040                 }
16041                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
16042                 // debug statements here
16043         }
16044         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16045         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
16046                 if(!isWasmInitialized) {
16047                         throw new Error("initializeWasm() must be awaited first!");
16048                 }
16049                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
16050                 return nativeResponseValue;
16051         }
16052         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
16053         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
16054                 if(!isWasmInitialized) {
16055                         throw new Error("initializeWasm() must be awaited first!");
16056                 }
16057                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
16058                 // debug statements here
16059         }
16060         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
16061         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
16062                 if(!isWasmInitialized) {
16063                         throw new Error("initializeWasm() must be awaited first!");
16064                 }
16065                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
16066                 return decodeArray(nativeResponseValue);
16067         }
16068         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
16069         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
16070                 if(!isWasmInitialized) {
16071                         throw new Error("initializeWasm() must be awaited first!");
16072                 }
16073                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
16074                 // debug statements here
16075         }
16076         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
16077         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
16078                 if(!isWasmInitialized) {
16079                         throw new Error("initializeWasm() must be awaited first!");
16080                 }
16081                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
16082                 return decodeArray(nativeResponseValue);
16083         }
16084         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16085         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
16086                 if(!isWasmInitialized) {
16087                         throw new Error("initializeWasm() must be awaited first!");
16088                 }
16089                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
16090                 // debug statements here
16091         }
16092         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
16093         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
16094                 if(!isWasmInitialized) {
16095                         throw new Error("initializeWasm() must be awaited first!");
16096                 }
16097                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
16098                 // debug statements here
16099         }
16100         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16101         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
16102                 if(!isWasmInitialized) {
16103                         throw new Error("initializeWasm() must be awaited first!");
16104                 }
16105                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
16106                 return nativeResponseValue;
16107         }
16108         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
16109         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
16110                 if(!isWasmInitialized) {
16111                         throw new Error("initializeWasm() must be awaited first!");
16112                 }
16113                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
16114                 // debug statements here
16115         }
16116         // 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);
16117         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 {
16118                 if(!isWasmInitialized) {
16119                         throw new Error("initializeWasm() must be awaited first!");
16120                 }
16121                 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
16122                 return nativeResponseValue;
16123         }
16124         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
16125         export function NodeAnnouncementInfo_clone(orig: number): number {
16126                 if(!isWasmInitialized) {
16127                         throw new Error("initializeWasm() must be awaited first!");
16128                 }
16129                 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
16130                 return nativeResponseValue;
16131         }
16132         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
16133         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
16134                 if(!isWasmInitialized) {
16135                         throw new Error("initializeWasm() must be awaited first!");
16136                 }
16137                 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
16138                 return decodeArray(nativeResponseValue);
16139         }
16140         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
16141         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
16142                 if(!isWasmInitialized) {
16143                         throw new Error("initializeWasm() must be awaited first!");
16144                 }
16145                 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
16146                 return nativeResponseValue;
16147         }
16148         // void NodeInfo_free(struct LDKNodeInfo this_obj);
16149         export function NodeInfo_free(this_obj: number): void {
16150                 if(!isWasmInitialized) {
16151                         throw new Error("initializeWasm() must be awaited first!");
16152                 }
16153                 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
16154                 // debug statements here
16155         }
16156         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
16157         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
16158                 if(!isWasmInitialized) {
16159                         throw new Error("initializeWasm() must be awaited first!");
16160                 }
16161                 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
16162                 // debug statements here
16163         }
16164         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
16165         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
16166                 if(!isWasmInitialized) {
16167                         throw new Error("initializeWasm() must be awaited first!");
16168                 }
16169                 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
16170                 return nativeResponseValue;
16171         }
16172         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
16173         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
16174                 if(!isWasmInitialized) {
16175                         throw new Error("initializeWasm() must be awaited first!");
16176                 }
16177                 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
16178                 // debug statements here
16179         }
16180         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
16181         export function NodeInfo_get_announcement_info(this_ptr: number): number {
16182                 if(!isWasmInitialized) {
16183                         throw new Error("initializeWasm() must be awaited first!");
16184                 }
16185                 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
16186                 return nativeResponseValue;
16187         }
16188         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
16189         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
16190                 if(!isWasmInitialized) {
16191                         throw new Error("initializeWasm() must be awaited first!");
16192                 }
16193                 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
16194                 // debug statements here
16195         }
16196         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
16197         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
16198                 if(!isWasmInitialized) {
16199                         throw new Error("initializeWasm() must be awaited first!");
16200                 }
16201                 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
16202                 return nativeResponseValue;
16203         }
16204         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
16205         export function NodeInfo_clone(orig: number): number {
16206                 if(!isWasmInitialized) {
16207                         throw new Error("initializeWasm() must be awaited first!");
16208                 }
16209                 const nativeResponseValue = wasm.NodeInfo_clone(orig);
16210                 return nativeResponseValue;
16211         }
16212         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
16213         export function NodeInfo_write(obj: number): Uint8Array {
16214                 if(!isWasmInitialized) {
16215                         throw new Error("initializeWasm() must be awaited first!");
16216                 }
16217                 const nativeResponseValue = wasm.NodeInfo_write(obj);
16218                 return decodeArray(nativeResponseValue);
16219         }
16220         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
16221         export function NodeInfo_read(ser: Uint8Array): number {
16222                 if(!isWasmInitialized) {
16223                         throw new Error("initializeWasm() must be awaited first!");
16224                 }
16225                 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
16226                 return nativeResponseValue;
16227         }
16228         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
16229         export function NetworkGraph_write(obj: number): Uint8Array {
16230                 if(!isWasmInitialized) {
16231                         throw new Error("initializeWasm() must be awaited first!");
16232                 }
16233                 const nativeResponseValue = wasm.NetworkGraph_write(obj);
16234                 return decodeArray(nativeResponseValue);
16235         }
16236         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
16237         export function NetworkGraph_read(ser: Uint8Array): number {
16238                 if(!isWasmInitialized) {
16239                         throw new Error("initializeWasm() must be awaited first!");
16240                 }
16241                 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
16242                 return nativeResponseValue;
16243         }
16244         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
16245         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
16246                 if(!isWasmInitialized) {
16247                         throw new Error("initializeWasm() must be awaited first!");
16248                 }
16249                 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
16250                 return nativeResponseValue;
16251         }
16252         // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
16253         export function NetworkGraph_read_only(this_arg: number): number {
16254                 if(!isWasmInitialized) {
16255                         throw new Error("initializeWasm() must be awaited first!");
16256                 }
16257                 const nativeResponseValue = wasm.NetworkGraph_read_only(this_arg);
16258                 return nativeResponseValue;
16259         }
16260         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
16261         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
16262                 if(!isWasmInitialized) {
16263                         throw new Error("initializeWasm() must be awaited first!");
16264                 }
16265                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
16266                 return nativeResponseValue;
16267         }
16268         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
16269         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
16270                 if(!isWasmInitialized) {
16271                         throw new Error("initializeWasm() must be awaited first!");
16272                 }
16273                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
16274                 return nativeResponseValue;
16275         }
16276         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
16277         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
16278                 if(!isWasmInitialized) {
16279                         throw new Error("initializeWasm() must be awaited first!");
16280                 }
16281                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
16282                 return nativeResponseValue;
16283         }
16284         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
16285         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
16286                 if(!isWasmInitialized) {
16287                         throw new Error("initializeWasm() must be awaited first!");
16288                 }
16289                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
16290                 return nativeResponseValue;
16291         }
16292         // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
16293         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
16294                 if(!isWasmInitialized) {
16295                         throw new Error("initializeWasm() must be awaited first!");
16296                 }
16297                 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
16298                 // debug statements here
16299         }
16300         // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
16301         export function NetworkGraph_fail_node(this_arg: number, _node_id: Uint8Array, is_permanent: boolean): void {
16302                 if(!isWasmInitialized) {
16303                         throw new Error("initializeWasm() must be awaited first!");
16304                 }
16305                 const nativeResponseValue = wasm.NetworkGraph_fail_node(this_arg, encodeArray(_node_id), is_permanent);
16306                 // debug statements here
16307         }
16308         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
16309         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
16310                 if(!isWasmInitialized) {
16311                         throw new Error("initializeWasm() must be awaited first!");
16312                 }
16313                 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
16314                 return nativeResponseValue;
16315         }
16316         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
16317         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
16318                 if(!isWasmInitialized) {
16319                         throw new Error("initializeWasm() must be awaited first!");
16320                 }
16321                 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
16322                 return nativeResponseValue;
16323         }
16324         // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
16325         export function FilesystemPersister_free(this_obj: number): void {
16326                 if(!isWasmInitialized) {
16327                         throw new Error("initializeWasm() must be awaited first!");
16328                 }
16329                 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
16330                 // debug statements here
16331         }
16332         // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
16333         export function FilesystemPersister_new(path_to_channel_data: String): number {
16334                 if(!isWasmInitialized) {
16335                         throw new Error("initializeWasm() must be awaited first!");
16336                 }
16337                 const nativeResponseValue = wasm.FilesystemPersister_new(path_to_channel_data);
16338                 return nativeResponseValue;
16339         }
16340         // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
16341         export function FilesystemPersister_get_data_dir(this_arg: number): String {
16342                 if(!isWasmInitialized) {
16343                         throw new Error("initializeWasm() must be awaited first!");
16344                 }
16345                 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
16346                 return nativeResponseValue;
16347         }
16348         // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
16349         export function FilesystemPersister_persist_manager(data_dir: String, manager: number): number {
16350                 if(!isWasmInitialized) {
16351                         throw new Error("initializeWasm() must be awaited first!");
16352                 }
16353                 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(data_dir, manager);
16354                 return nativeResponseValue;
16355         }
16356         // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
16357         export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
16358                 if(!isWasmInitialized) {
16359                         throw new Error("initializeWasm() must be awaited first!");
16360                 }
16361                 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
16362                 return nativeResponseValue;
16363         }
16364         // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
16365         export function FilesystemPersister_as_Persist(this_arg: number): number {
16366                 if(!isWasmInitialized) {
16367                         throw new Error("initializeWasm() must be awaited first!");
16368                 }
16369                 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
16370                 return nativeResponseValue;
16371         }
16372         // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
16373         export function BackgroundProcessor_free(this_obj: number): void {
16374                 if(!isWasmInitialized) {
16375                         throw new Error("initializeWasm() must be awaited first!");
16376                 }
16377                 const nativeResponseValue = wasm.BackgroundProcessor_free(this_obj);
16378                 // debug statements here
16379         }
16380         // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
16381         export function ChannelManagerPersister_free(this_ptr: number): void {
16382                 if(!isWasmInitialized) {
16383                         throw new Error("initializeWasm() must be awaited first!");
16384                 }
16385                 const nativeResponseValue = wasm.ChannelManagerPersister_free(this_ptr);
16386                 // debug statements here
16387         }
16388         // MUST_USE_RES struct LDKBackgroundProcessor BackgroundProcessor_start(struct LDKChannelManagerPersister persister, struct LDKEventHandler event_handler, const struct LDKChainMonitor *NONNULL_PTR chain_monitor, const struct LDKChannelManager *NONNULL_PTR channel_manager, struct LDKNetGraphMsgHandler net_graph_msg_handler, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger);
16389         export function BackgroundProcessor_start(persister: number, event_handler: number, chain_monitor: number, channel_manager: number, net_graph_msg_handler: number, peer_manager: number, logger: number): number {
16390                 if(!isWasmInitialized) {
16391                         throw new Error("initializeWasm() must be awaited first!");
16392                 }
16393                 const nativeResponseValue = wasm.BackgroundProcessor_start(persister, event_handler, chain_monitor, channel_manager, net_graph_msg_handler, peer_manager, logger);
16394                 return nativeResponseValue;
16395         }
16396         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_join(struct LDKBackgroundProcessor this_arg);
16397         export function BackgroundProcessor_join(this_arg: number): number {
16398                 if(!isWasmInitialized) {
16399                         throw new Error("initializeWasm() must be awaited first!");
16400                 }
16401                 const nativeResponseValue = wasm.BackgroundProcessor_join(this_arg);
16402                 return nativeResponseValue;
16403         }
16404         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
16405         export function BackgroundProcessor_stop(this_arg: number): number {
16406                 if(!isWasmInitialized) {
16407                         throw new Error("initializeWasm() must be awaited first!");
16408                 }
16409                 const nativeResponseValue = wasm.BackgroundProcessor_stop(this_arg);
16410                 return nativeResponseValue;
16411         }
16412         // void check_platform(void);
16413         export function check_platform(): void {
16414                 if(!isWasmInitialized) {
16415                         throw new Error("initializeWasm() must be awaited first!");
16416                 }
16417                 const nativeResponseValue = wasm.check_platform();
16418                 // debug statements here
16419         }
16420         // void Invoice_free(struct LDKInvoice this_obj);
16421         export function Invoice_free(this_obj: number): void {
16422                 if(!isWasmInitialized) {
16423                         throw new Error("initializeWasm() must be awaited first!");
16424                 }
16425                 const nativeResponseValue = wasm.Invoice_free(this_obj);
16426                 // debug statements here
16427         }
16428         // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
16429         export function Invoice_eq(a: number, b: number): boolean {
16430                 if(!isWasmInitialized) {
16431                         throw new Error("initializeWasm() must be awaited first!");
16432                 }
16433                 const nativeResponseValue = wasm.Invoice_eq(a, b);
16434                 return nativeResponseValue;
16435         }
16436         // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
16437         export function Invoice_clone(orig: number): number {
16438                 if(!isWasmInitialized) {
16439                         throw new Error("initializeWasm() must be awaited first!");
16440                 }
16441                 const nativeResponseValue = wasm.Invoice_clone(orig);
16442                 return nativeResponseValue;
16443         }
16444         // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
16445         export function SignedRawInvoice_free(this_obj: number): void {
16446                 if(!isWasmInitialized) {
16447                         throw new Error("initializeWasm() must be awaited first!");
16448                 }
16449                 const nativeResponseValue = wasm.SignedRawInvoice_free(this_obj);
16450                 // debug statements here
16451         }
16452         // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
16453         export function SignedRawInvoice_eq(a: number, b: number): boolean {
16454                 if(!isWasmInitialized) {
16455                         throw new Error("initializeWasm() must be awaited first!");
16456                 }
16457                 const nativeResponseValue = wasm.SignedRawInvoice_eq(a, b);
16458                 return nativeResponseValue;
16459         }
16460         // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
16461         export function SignedRawInvoice_clone(orig: number): number {
16462                 if(!isWasmInitialized) {
16463                         throw new Error("initializeWasm() must be awaited first!");
16464                 }
16465                 const nativeResponseValue = wasm.SignedRawInvoice_clone(orig);
16466                 return nativeResponseValue;
16467         }
16468         // void RawInvoice_free(struct LDKRawInvoice this_obj);
16469         export function RawInvoice_free(this_obj: number): void {
16470                 if(!isWasmInitialized) {
16471                         throw new Error("initializeWasm() must be awaited first!");
16472                 }
16473                 const nativeResponseValue = wasm.RawInvoice_free(this_obj);
16474                 // debug statements here
16475         }
16476         // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
16477         export function RawInvoice_get_data(this_ptr: number): number {
16478                 if(!isWasmInitialized) {
16479                         throw new Error("initializeWasm() must be awaited first!");
16480                 }
16481                 const nativeResponseValue = wasm.RawInvoice_get_data(this_ptr);
16482                 return nativeResponseValue;
16483         }
16484         // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
16485         export function RawInvoice_set_data(this_ptr: number, val: number): void {
16486                 if(!isWasmInitialized) {
16487                         throw new Error("initializeWasm() must be awaited first!");
16488                 }
16489                 const nativeResponseValue = wasm.RawInvoice_set_data(this_ptr, val);
16490                 // debug statements here
16491         }
16492         // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
16493         export function RawInvoice_eq(a: number, b: number): boolean {
16494                 if(!isWasmInitialized) {
16495                         throw new Error("initializeWasm() must be awaited first!");
16496                 }
16497                 const nativeResponseValue = wasm.RawInvoice_eq(a, b);
16498                 return nativeResponseValue;
16499         }
16500         // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
16501         export function RawInvoice_clone(orig: number): number {
16502                 if(!isWasmInitialized) {
16503                         throw new Error("initializeWasm() must be awaited first!");
16504                 }
16505                 const nativeResponseValue = wasm.RawInvoice_clone(orig);
16506                 return nativeResponseValue;
16507         }
16508         // void RawDataPart_free(struct LDKRawDataPart this_obj);
16509         export function RawDataPart_free(this_obj: number): void {
16510                 if(!isWasmInitialized) {
16511                         throw new Error("initializeWasm() must be awaited first!");
16512                 }
16513                 const nativeResponseValue = wasm.RawDataPart_free(this_obj);
16514                 // debug statements here
16515         }
16516         // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
16517         export function RawDataPart_get_timestamp(this_ptr: number): number {
16518                 if(!isWasmInitialized) {
16519                         throw new Error("initializeWasm() must be awaited first!");
16520                 }
16521                 const nativeResponseValue = wasm.RawDataPart_get_timestamp(this_ptr);
16522                 return nativeResponseValue;
16523         }
16524         // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
16525         export function RawDataPart_set_timestamp(this_ptr: number, val: number): void {
16526                 if(!isWasmInitialized) {
16527                         throw new Error("initializeWasm() must be awaited first!");
16528                 }
16529                 const nativeResponseValue = wasm.RawDataPart_set_timestamp(this_ptr, val);
16530                 // debug statements here
16531         }
16532         // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
16533         export function RawDataPart_eq(a: number, b: number): boolean {
16534                 if(!isWasmInitialized) {
16535                         throw new Error("initializeWasm() must be awaited first!");
16536                 }
16537                 const nativeResponseValue = wasm.RawDataPart_eq(a, b);
16538                 return nativeResponseValue;
16539         }
16540         // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
16541         export function RawDataPart_clone(orig: number): number {
16542                 if(!isWasmInitialized) {
16543                         throw new Error("initializeWasm() must be awaited first!");
16544                 }
16545                 const nativeResponseValue = wasm.RawDataPart_clone(orig);
16546                 return nativeResponseValue;
16547         }
16548         // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
16549         export function PositiveTimestamp_free(this_obj: number): void {
16550                 if(!isWasmInitialized) {
16551                         throw new Error("initializeWasm() must be awaited first!");
16552                 }
16553                 const nativeResponseValue = wasm.PositiveTimestamp_free(this_obj);
16554                 // debug statements here
16555         }
16556         // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
16557         export function PositiveTimestamp_eq(a: number, b: number): boolean {
16558                 if(!isWasmInitialized) {
16559                         throw new Error("initializeWasm() must be awaited first!");
16560                 }
16561                 const nativeResponseValue = wasm.PositiveTimestamp_eq(a, b);
16562                 return nativeResponseValue;
16563         }
16564         // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
16565         export function PositiveTimestamp_clone(orig: number): number {
16566                 if(!isWasmInitialized) {
16567                         throw new Error("initializeWasm() must be awaited first!");
16568                 }
16569                 const nativeResponseValue = wasm.PositiveTimestamp_clone(orig);
16570                 return nativeResponseValue;
16571         }
16572         // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
16573         export function SiPrefix_clone(orig: number): SiPrefix {
16574                 if(!isWasmInitialized) {
16575                         throw new Error("initializeWasm() must be awaited first!");
16576                 }
16577                 const nativeResponseValue = wasm.SiPrefix_clone(orig);
16578                 return nativeResponseValue;
16579         }
16580         // enum LDKSiPrefix SiPrefix_milli(void);
16581         export function SiPrefix_milli(): SiPrefix {
16582                 if(!isWasmInitialized) {
16583                         throw new Error("initializeWasm() must be awaited first!");
16584                 }
16585                 const nativeResponseValue = wasm.SiPrefix_milli();
16586                 return nativeResponseValue;
16587         }
16588         // enum LDKSiPrefix SiPrefix_micro(void);
16589         export function SiPrefix_micro(): SiPrefix {
16590                 if(!isWasmInitialized) {
16591                         throw new Error("initializeWasm() must be awaited first!");
16592                 }
16593                 const nativeResponseValue = wasm.SiPrefix_micro();
16594                 return nativeResponseValue;
16595         }
16596         // enum LDKSiPrefix SiPrefix_nano(void);
16597         export function SiPrefix_nano(): SiPrefix {
16598                 if(!isWasmInitialized) {
16599                         throw new Error("initializeWasm() must be awaited first!");
16600                 }
16601                 const nativeResponseValue = wasm.SiPrefix_nano();
16602                 return nativeResponseValue;
16603         }
16604         // enum LDKSiPrefix SiPrefix_pico(void);
16605         export function SiPrefix_pico(): SiPrefix {
16606                 if(!isWasmInitialized) {
16607                         throw new Error("initializeWasm() must be awaited first!");
16608                 }
16609                 const nativeResponseValue = wasm.SiPrefix_pico();
16610                 return nativeResponseValue;
16611         }
16612         // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
16613         export function SiPrefix_eq(a: number, b: number): boolean {
16614                 if(!isWasmInitialized) {
16615                         throw new Error("initializeWasm() must be awaited first!");
16616                 }
16617                 const nativeResponseValue = wasm.SiPrefix_eq(a, b);
16618                 return nativeResponseValue;
16619         }
16620         // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
16621         export function SiPrefix_multiplier(this_arg: number): number {
16622                 if(!isWasmInitialized) {
16623                         throw new Error("initializeWasm() must be awaited first!");
16624                 }
16625                 const nativeResponseValue = wasm.SiPrefix_multiplier(this_arg);
16626                 return nativeResponseValue;
16627         }
16628         // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
16629         export function Currency_clone(orig: number): Currency {
16630                 if(!isWasmInitialized) {
16631                         throw new Error("initializeWasm() must be awaited first!");
16632                 }
16633                 const nativeResponseValue = wasm.Currency_clone(orig);
16634                 return nativeResponseValue;
16635         }
16636         // enum LDKCurrency Currency_bitcoin(void);
16637         export function Currency_bitcoin(): Currency {
16638                 if(!isWasmInitialized) {
16639                         throw new Error("initializeWasm() must be awaited first!");
16640                 }
16641                 const nativeResponseValue = wasm.Currency_bitcoin();
16642                 return nativeResponseValue;
16643         }
16644         // enum LDKCurrency Currency_bitcoin_testnet(void);
16645         export function Currency_bitcoin_testnet(): Currency {
16646                 if(!isWasmInitialized) {
16647                         throw new Error("initializeWasm() must be awaited first!");
16648                 }
16649                 const nativeResponseValue = wasm.Currency_bitcoin_testnet();
16650                 return nativeResponseValue;
16651         }
16652         // enum LDKCurrency Currency_regtest(void);
16653         export function Currency_regtest(): Currency {
16654                 if(!isWasmInitialized) {
16655                         throw new Error("initializeWasm() must be awaited first!");
16656                 }
16657                 const nativeResponseValue = wasm.Currency_regtest();
16658                 return nativeResponseValue;
16659         }
16660         // enum LDKCurrency Currency_simnet(void);
16661         export function Currency_simnet(): Currency {
16662                 if(!isWasmInitialized) {
16663                         throw new Error("initializeWasm() must be awaited first!");
16664                 }
16665                 const nativeResponseValue = wasm.Currency_simnet();
16666                 return nativeResponseValue;
16667         }
16668         // enum LDKCurrency Currency_signet(void);
16669         export function Currency_signet(): Currency {
16670                 if(!isWasmInitialized) {
16671                         throw new Error("initializeWasm() must be awaited first!");
16672                 }
16673                 const nativeResponseValue = wasm.Currency_signet();
16674                 return nativeResponseValue;
16675         }
16676         // uint64_t Currency_hash(const enum LDKCurrency *NONNULL_PTR o);
16677         export function Currency_hash(o: number): number {
16678                 if(!isWasmInitialized) {
16679                         throw new Error("initializeWasm() must be awaited first!");
16680                 }
16681                 const nativeResponseValue = wasm.Currency_hash(o);
16682                 return nativeResponseValue;
16683         }
16684         // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
16685         export function Currency_eq(a: number, b: number): boolean {
16686                 if(!isWasmInitialized) {
16687                         throw new Error("initializeWasm() must be awaited first!");
16688                 }
16689                 const nativeResponseValue = wasm.Currency_eq(a, b);
16690                 return nativeResponseValue;
16691         }
16692         // void Sha256_free(struct LDKSha256 this_obj);
16693         export function Sha256_free(this_obj: number): void {
16694                 if(!isWasmInitialized) {
16695                         throw new Error("initializeWasm() must be awaited first!");
16696                 }
16697                 const nativeResponseValue = wasm.Sha256_free(this_obj);
16698                 // debug statements here
16699         }
16700         // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
16701         export function Sha256_clone(orig: number): number {
16702                 if(!isWasmInitialized) {
16703                         throw new Error("initializeWasm() must be awaited first!");
16704                 }
16705                 const nativeResponseValue = wasm.Sha256_clone(orig);
16706                 return nativeResponseValue;
16707         }
16708         // uint64_t Sha256_hash(const struct LDKSha256 *NONNULL_PTR o);
16709         export function Sha256_hash(o: number): number {
16710                 if(!isWasmInitialized) {
16711                         throw new Error("initializeWasm() must be awaited first!");
16712                 }
16713                 const nativeResponseValue = wasm.Sha256_hash(o);
16714                 return nativeResponseValue;
16715         }
16716         // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
16717         export function Sha256_eq(a: number, b: number): boolean {
16718                 if(!isWasmInitialized) {
16719                         throw new Error("initializeWasm() must be awaited first!");
16720                 }
16721                 const nativeResponseValue = wasm.Sha256_eq(a, b);
16722                 return nativeResponseValue;
16723         }
16724         // void Description_free(struct LDKDescription this_obj);
16725         export function Description_free(this_obj: number): void {
16726                 if(!isWasmInitialized) {
16727                         throw new Error("initializeWasm() must be awaited first!");
16728                 }
16729                 const nativeResponseValue = wasm.Description_free(this_obj);
16730                 // debug statements here
16731         }
16732         // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
16733         export function Description_clone(orig: number): number {
16734                 if(!isWasmInitialized) {
16735                         throw new Error("initializeWasm() must be awaited first!");
16736                 }
16737                 const nativeResponseValue = wasm.Description_clone(orig);
16738                 return nativeResponseValue;
16739         }
16740         // uint64_t Description_hash(const struct LDKDescription *NONNULL_PTR o);
16741         export function Description_hash(o: number): number {
16742                 if(!isWasmInitialized) {
16743                         throw new Error("initializeWasm() must be awaited first!");
16744                 }
16745                 const nativeResponseValue = wasm.Description_hash(o);
16746                 return nativeResponseValue;
16747         }
16748         // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
16749         export function Description_eq(a: number, b: number): boolean {
16750                 if(!isWasmInitialized) {
16751                         throw new Error("initializeWasm() must be awaited first!");
16752                 }
16753                 const nativeResponseValue = wasm.Description_eq(a, b);
16754                 return nativeResponseValue;
16755         }
16756         // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
16757         export function PayeePubKey_free(this_obj: number): void {
16758                 if(!isWasmInitialized) {
16759                         throw new Error("initializeWasm() must be awaited first!");
16760                 }
16761                 const nativeResponseValue = wasm.PayeePubKey_free(this_obj);
16762                 // debug statements here
16763         }
16764         // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
16765         export function PayeePubKey_clone(orig: number): number {
16766                 if(!isWasmInitialized) {
16767                         throw new Error("initializeWasm() must be awaited first!");
16768                 }
16769                 const nativeResponseValue = wasm.PayeePubKey_clone(orig);
16770                 return nativeResponseValue;
16771         }
16772         // uint64_t PayeePubKey_hash(const struct LDKPayeePubKey *NONNULL_PTR o);
16773         export function PayeePubKey_hash(o: number): number {
16774                 if(!isWasmInitialized) {
16775                         throw new Error("initializeWasm() must be awaited first!");
16776                 }
16777                 const nativeResponseValue = wasm.PayeePubKey_hash(o);
16778                 return nativeResponseValue;
16779         }
16780         // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
16781         export function PayeePubKey_eq(a: number, b: number): boolean {
16782                 if(!isWasmInitialized) {
16783                         throw new Error("initializeWasm() must be awaited first!");
16784                 }
16785                 const nativeResponseValue = wasm.PayeePubKey_eq(a, b);
16786                 return nativeResponseValue;
16787         }
16788         // void ExpiryTime_free(struct LDKExpiryTime this_obj);
16789         export function ExpiryTime_free(this_obj: number): void {
16790                 if(!isWasmInitialized) {
16791                         throw new Error("initializeWasm() must be awaited first!");
16792                 }
16793                 const nativeResponseValue = wasm.ExpiryTime_free(this_obj);
16794                 // debug statements here
16795         }
16796         // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
16797         export function ExpiryTime_clone(orig: number): number {
16798                 if(!isWasmInitialized) {
16799                         throw new Error("initializeWasm() must be awaited first!");
16800                 }
16801                 const nativeResponseValue = wasm.ExpiryTime_clone(orig);
16802                 return nativeResponseValue;
16803         }
16804         // uint64_t ExpiryTime_hash(const struct LDKExpiryTime *NONNULL_PTR o);
16805         export function ExpiryTime_hash(o: number): number {
16806                 if(!isWasmInitialized) {
16807                         throw new Error("initializeWasm() must be awaited first!");
16808                 }
16809                 const nativeResponseValue = wasm.ExpiryTime_hash(o);
16810                 return nativeResponseValue;
16811         }
16812         // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
16813         export function ExpiryTime_eq(a: number, b: number): boolean {
16814                 if(!isWasmInitialized) {
16815                         throw new Error("initializeWasm() must be awaited first!");
16816                 }
16817                 const nativeResponseValue = wasm.ExpiryTime_eq(a, b);
16818                 return nativeResponseValue;
16819         }
16820         // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
16821         export function MinFinalCltvExpiry_free(this_obj: number): void {
16822                 if(!isWasmInitialized) {
16823                         throw new Error("initializeWasm() must be awaited first!");
16824                 }
16825                 const nativeResponseValue = wasm.MinFinalCltvExpiry_free(this_obj);
16826                 // debug statements here
16827         }
16828         // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
16829         export function MinFinalCltvExpiry_clone(orig: number): number {
16830                 if(!isWasmInitialized) {
16831                         throw new Error("initializeWasm() must be awaited first!");
16832                 }
16833                 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone(orig);
16834                 return nativeResponseValue;
16835         }
16836         // uint64_t MinFinalCltvExpiry_hash(const struct LDKMinFinalCltvExpiry *NONNULL_PTR o);
16837         export function MinFinalCltvExpiry_hash(o: number): number {
16838                 if(!isWasmInitialized) {
16839                         throw new Error("initializeWasm() must be awaited first!");
16840                 }
16841                 const nativeResponseValue = wasm.MinFinalCltvExpiry_hash(o);
16842                 return nativeResponseValue;
16843         }
16844         // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
16845         export function MinFinalCltvExpiry_eq(a: number, b: number): boolean {
16846                 if(!isWasmInitialized) {
16847                         throw new Error("initializeWasm() must be awaited first!");
16848                 }
16849                 const nativeResponseValue = wasm.MinFinalCltvExpiry_eq(a, b);
16850                 return nativeResponseValue;
16851         }
16852         // void Fallback_free(struct LDKFallback this_ptr);
16853         export function Fallback_free(this_ptr: number): void {
16854                 if(!isWasmInitialized) {
16855                         throw new Error("initializeWasm() must be awaited first!");
16856                 }
16857                 const nativeResponseValue = wasm.Fallback_free(this_ptr);
16858                 // debug statements here
16859         }
16860         // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
16861         export function Fallback_clone(orig: number): number {
16862                 if(!isWasmInitialized) {
16863                         throw new Error("initializeWasm() must be awaited first!");
16864                 }
16865                 const nativeResponseValue = wasm.Fallback_clone(orig);
16866                 return nativeResponseValue;
16867         }
16868         // struct LDKFallback Fallback_seg_wit_program(struct LDKu5 version, struct LDKCVec_u8Z program);
16869         export function Fallback_seg_wit_program(version: number, program: Uint8Array): number {
16870                 if(!isWasmInitialized) {
16871                         throw new Error("initializeWasm() must be awaited first!");
16872                 }
16873                 const nativeResponseValue = wasm.Fallback_seg_wit_program(version, encodeArray(program));
16874                 return nativeResponseValue;
16875         }
16876         // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
16877         export function Fallback_pub_key_hash(a: Uint8Array): number {
16878                 if(!isWasmInitialized) {
16879                         throw new Error("initializeWasm() must be awaited first!");
16880                 }
16881                 const nativeResponseValue = wasm.Fallback_pub_key_hash(encodeArray(a));
16882                 return nativeResponseValue;
16883         }
16884         // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
16885         export function Fallback_script_hash(a: Uint8Array): number {
16886                 if(!isWasmInitialized) {
16887                         throw new Error("initializeWasm() must be awaited first!");
16888                 }
16889                 const nativeResponseValue = wasm.Fallback_script_hash(encodeArray(a));
16890                 return nativeResponseValue;
16891         }
16892         // uint64_t Fallback_hash(const struct LDKFallback *NONNULL_PTR o);
16893         export function Fallback_hash(o: number): number {
16894                 if(!isWasmInitialized) {
16895                         throw new Error("initializeWasm() must be awaited first!");
16896                 }
16897                 const nativeResponseValue = wasm.Fallback_hash(o);
16898                 return nativeResponseValue;
16899         }
16900         // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
16901         export function Fallback_eq(a: number, b: number): boolean {
16902                 if(!isWasmInitialized) {
16903                         throw new Error("initializeWasm() must be awaited first!");
16904                 }
16905                 const nativeResponseValue = wasm.Fallback_eq(a, b);
16906                 return nativeResponseValue;
16907         }
16908         // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
16909         export function InvoiceSignature_free(this_obj: number): void {
16910                 if(!isWasmInitialized) {
16911                         throw new Error("initializeWasm() must be awaited first!");
16912                 }
16913                 const nativeResponseValue = wasm.InvoiceSignature_free(this_obj);
16914                 // debug statements here
16915         }
16916         // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
16917         export function InvoiceSignature_clone(orig: number): number {
16918                 if(!isWasmInitialized) {
16919                         throw new Error("initializeWasm() must be awaited first!");
16920                 }
16921                 const nativeResponseValue = wasm.InvoiceSignature_clone(orig);
16922                 return nativeResponseValue;
16923         }
16924         // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
16925         export function InvoiceSignature_eq(a: number, b: number): boolean {
16926                 if(!isWasmInitialized) {
16927                         throw new Error("initializeWasm() must be awaited first!");
16928                 }
16929                 const nativeResponseValue = wasm.InvoiceSignature_eq(a, b);
16930                 return nativeResponseValue;
16931         }
16932         // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
16933         export function PrivateRoute_free(this_obj: number): void {
16934                 if(!isWasmInitialized) {
16935                         throw new Error("initializeWasm() must be awaited first!");
16936                 }
16937                 const nativeResponseValue = wasm.PrivateRoute_free(this_obj);
16938                 // debug statements here
16939         }
16940         // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
16941         export function PrivateRoute_clone(orig: number): number {
16942                 if(!isWasmInitialized) {
16943                         throw new Error("initializeWasm() must be awaited first!");
16944                 }
16945                 const nativeResponseValue = wasm.PrivateRoute_clone(orig);
16946                 return nativeResponseValue;
16947         }
16948         // uint64_t PrivateRoute_hash(const struct LDKPrivateRoute *NONNULL_PTR o);
16949         export function PrivateRoute_hash(o: number): number {
16950                 if(!isWasmInitialized) {
16951                         throw new Error("initializeWasm() must be awaited first!");
16952                 }
16953                 const nativeResponseValue = wasm.PrivateRoute_hash(o);
16954                 return nativeResponseValue;
16955         }
16956         // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
16957         export function PrivateRoute_eq(a: number, b: number): boolean {
16958                 if(!isWasmInitialized) {
16959                         throw new Error("initializeWasm() must be awaited first!");
16960                 }
16961                 const nativeResponseValue = wasm.PrivateRoute_eq(a, b);
16962                 return nativeResponseValue;
16963         }
16964         // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
16965         export function SignedRawInvoice_into_parts(this_arg: number): number {
16966                 if(!isWasmInitialized) {
16967                         throw new Error("initializeWasm() must be awaited first!");
16968                 }
16969                 const nativeResponseValue = wasm.SignedRawInvoice_into_parts(this_arg);
16970                 return nativeResponseValue;
16971         }
16972         // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
16973         export function SignedRawInvoice_raw_invoice(this_arg: number): number {
16974                 if(!isWasmInitialized) {
16975                         throw new Error("initializeWasm() must be awaited first!");
16976                 }
16977                 const nativeResponseValue = wasm.SignedRawInvoice_raw_invoice(this_arg);
16978                 return nativeResponseValue;
16979         }
16980         // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
16981         export function SignedRawInvoice_hash(this_arg: number): Uint8Array {
16982                 if(!isWasmInitialized) {
16983                         throw new Error("initializeWasm() must be awaited first!");
16984                 }
16985                 const nativeResponseValue = wasm.SignedRawInvoice_hash(this_arg);
16986                 return decodeArray(nativeResponseValue);
16987         }
16988         // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
16989         export function SignedRawInvoice_signature(this_arg: number): number {
16990                 if(!isWasmInitialized) {
16991                         throw new Error("initializeWasm() must be awaited first!");
16992                 }
16993                 const nativeResponseValue = wasm.SignedRawInvoice_signature(this_arg);
16994                 return nativeResponseValue;
16995         }
16996         // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
16997         export function SignedRawInvoice_recover_payee_pub_key(this_arg: number): number {
16998                 if(!isWasmInitialized) {
16999                         throw new Error("initializeWasm() must be awaited first!");
17000                 }
17001                 const nativeResponseValue = wasm.SignedRawInvoice_recover_payee_pub_key(this_arg);
17002                 return nativeResponseValue;
17003         }
17004         // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
17005         export function SignedRawInvoice_check_signature(this_arg: number): boolean {
17006                 if(!isWasmInitialized) {
17007                         throw new Error("initializeWasm() must be awaited first!");
17008                 }
17009                 const nativeResponseValue = wasm.SignedRawInvoice_check_signature(this_arg);
17010                 return nativeResponseValue;
17011         }
17012         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17013         export function RawInvoice_hash(this_arg: number): Uint8Array {
17014                 if(!isWasmInitialized) {
17015                         throw new Error("initializeWasm() must be awaited first!");
17016                 }
17017                 const nativeResponseValue = wasm.RawInvoice_hash(this_arg);
17018                 return decodeArray(nativeResponseValue);
17019         }
17020         // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17021         export function RawInvoice_payment_hash(this_arg: number): number {
17022                 if(!isWasmInitialized) {
17023                         throw new Error("initializeWasm() must be awaited first!");
17024                 }
17025                 const nativeResponseValue = wasm.RawInvoice_payment_hash(this_arg);
17026                 return nativeResponseValue;
17027         }
17028         // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17029         export function RawInvoice_description(this_arg: number): number {
17030                 if(!isWasmInitialized) {
17031                         throw new Error("initializeWasm() must be awaited first!");
17032                 }
17033                 const nativeResponseValue = wasm.RawInvoice_description(this_arg);
17034                 return nativeResponseValue;
17035         }
17036         // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17037         export function RawInvoice_payee_pub_key(this_arg: number): number {
17038                 if(!isWasmInitialized) {
17039                         throw new Error("initializeWasm() must be awaited first!");
17040                 }
17041                 const nativeResponseValue = wasm.RawInvoice_payee_pub_key(this_arg);
17042                 return nativeResponseValue;
17043         }
17044         // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17045         export function RawInvoice_description_hash(this_arg: number): number {
17046                 if(!isWasmInitialized) {
17047                         throw new Error("initializeWasm() must be awaited first!");
17048                 }
17049                 const nativeResponseValue = wasm.RawInvoice_description_hash(this_arg);
17050                 return nativeResponseValue;
17051         }
17052         // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17053         export function RawInvoice_expiry_time(this_arg: number): number {
17054                 if(!isWasmInitialized) {
17055                         throw new Error("initializeWasm() must be awaited first!");
17056                 }
17057                 const nativeResponseValue = wasm.RawInvoice_expiry_time(this_arg);
17058                 return nativeResponseValue;
17059         }
17060         // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17061         export function RawInvoice_min_final_cltv_expiry(this_arg: number): number {
17062                 if(!isWasmInitialized) {
17063                         throw new Error("initializeWasm() must be awaited first!");
17064                 }
17065                 const nativeResponseValue = wasm.RawInvoice_min_final_cltv_expiry(this_arg);
17066                 return nativeResponseValue;
17067         }
17068         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17069         export function RawInvoice_payment_secret(this_arg: number): Uint8Array {
17070                 if(!isWasmInitialized) {
17071                         throw new Error("initializeWasm() must be awaited first!");
17072                 }
17073                 const nativeResponseValue = wasm.RawInvoice_payment_secret(this_arg);
17074                 return decodeArray(nativeResponseValue);
17075         }
17076         // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17077         export function RawInvoice_features(this_arg: number): number {
17078                 if(!isWasmInitialized) {
17079                         throw new Error("initializeWasm() must be awaited first!");
17080                 }
17081                 const nativeResponseValue = wasm.RawInvoice_features(this_arg);
17082                 return nativeResponseValue;
17083         }
17084         // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17085         export function RawInvoice_private_routes(this_arg: number): number[] {
17086                 if(!isWasmInitialized) {
17087                         throw new Error("initializeWasm() must be awaited first!");
17088                 }
17089                 const nativeResponseValue = wasm.RawInvoice_private_routes(this_arg);
17090                 return nativeResponseValue;
17091         }
17092         // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17093         export function RawInvoice_amount_pico_btc(this_arg: number): number {
17094                 if(!isWasmInitialized) {
17095                         throw new Error("initializeWasm() must be awaited first!");
17096                 }
17097                 const nativeResponseValue = wasm.RawInvoice_amount_pico_btc(this_arg);
17098                 return nativeResponseValue;
17099         }
17100         // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17101         export function RawInvoice_currency(this_arg: number): Currency {
17102                 if(!isWasmInitialized) {
17103                         throw new Error("initializeWasm() must be awaited first!");
17104                 }
17105                 const nativeResponseValue = wasm.RawInvoice_currency(this_arg);
17106                 return nativeResponseValue;
17107         }
17108         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
17109         export function PositiveTimestamp_from_unix_timestamp(unix_seconds: number): number {
17110                 if(!isWasmInitialized) {
17111                         throw new Error("initializeWasm() must be awaited first!");
17112                 }
17113                 const nativeResponseValue = wasm.PositiveTimestamp_from_unix_timestamp(unix_seconds);
17114                 return nativeResponseValue;
17115         }
17116         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
17117         export function PositiveTimestamp_from_system_time(time: number): number {
17118                 if(!isWasmInitialized) {
17119                         throw new Error("initializeWasm() must be awaited first!");
17120                 }
17121                 const nativeResponseValue = wasm.PositiveTimestamp_from_system_time(time);
17122                 return nativeResponseValue;
17123         }
17124         // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
17125         export function PositiveTimestamp_as_unix_timestamp(this_arg: number): number {
17126                 if(!isWasmInitialized) {
17127                         throw new Error("initializeWasm() must be awaited first!");
17128                 }
17129                 const nativeResponseValue = wasm.PositiveTimestamp_as_unix_timestamp(this_arg);
17130                 return nativeResponseValue;
17131         }
17132         // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
17133         export function PositiveTimestamp_as_time(this_arg: number): number {
17134                 if(!isWasmInitialized) {
17135                         throw new Error("initializeWasm() must be awaited first!");
17136                 }
17137                 const nativeResponseValue = wasm.PositiveTimestamp_as_time(this_arg);
17138                 return nativeResponseValue;
17139         }
17140         // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
17141         export function Invoice_into_signed_raw(this_arg: number): number {
17142                 if(!isWasmInitialized) {
17143                         throw new Error("initializeWasm() must be awaited first!");
17144                 }
17145                 const nativeResponseValue = wasm.Invoice_into_signed_raw(this_arg);
17146                 return nativeResponseValue;
17147         }
17148         // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
17149         export function Invoice_check_signature(this_arg: number): number {
17150                 if(!isWasmInitialized) {
17151                         throw new Error("initializeWasm() must be awaited first!");
17152                 }
17153                 const nativeResponseValue = wasm.Invoice_check_signature(this_arg);
17154                 return nativeResponseValue;
17155         }
17156         // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
17157         export function Invoice_from_signed(signed_invoice: number): number {
17158                 if(!isWasmInitialized) {
17159                         throw new Error("initializeWasm() must be awaited first!");
17160                 }
17161                 const nativeResponseValue = wasm.Invoice_from_signed(signed_invoice);
17162                 return nativeResponseValue;
17163         }
17164         // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
17165         export function Invoice_timestamp(this_arg: number): number {
17166                 if(!isWasmInitialized) {
17167                         throw new Error("initializeWasm() must be awaited first!");
17168                 }
17169                 const nativeResponseValue = wasm.Invoice_timestamp(this_arg);
17170                 return nativeResponseValue;
17171         }
17172         // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
17173         export function Invoice_payment_hash(this_arg: number): Uint8Array {
17174                 if(!isWasmInitialized) {
17175                         throw new Error("initializeWasm() must be awaited first!");
17176                 }
17177                 const nativeResponseValue = wasm.Invoice_payment_hash(this_arg);
17178                 return decodeArray(nativeResponseValue);
17179         }
17180         // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
17181         export function Invoice_payee_pub_key(this_arg: number): Uint8Array {
17182                 if(!isWasmInitialized) {
17183                         throw new Error("initializeWasm() must be awaited first!");
17184                 }
17185                 const nativeResponseValue = wasm.Invoice_payee_pub_key(this_arg);
17186                 return decodeArray(nativeResponseValue);
17187         }
17188         // MUST_USE_RES struct LDKThirtyTwoBytes Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg);
17189         export function Invoice_payment_secret(this_arg: number): Uint8Array {
17190                 if(!isWasmInitialized) {
17191                         throw new Error("initializeWasm() must be awaited first!");
17192                 }
17193                 const nativeResponseValue = wasm.Invoice_payment_secret(this_arg);
17194                 return decodeArray(nativeResponseValue);
17195         }
17196         // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
17197         export function Invoice_features(this_arg: number): number {
17198                 if(!isWasmInitialized) {
17199                         throw new Error("initializeWasm() must be awaited first!");
17200                 }
17201                 const nativeResponseValue = wasm.Invoice_features(this_arg);
17202                 return nativeResponseValue;
17203         }
17204         // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
17205         export function Invoice_recover_payee_pub_key(this_arg: number): Uint8Array {
17206                 if(!isWasmInitialized) {
17207                         throw new Error("initializeWasm() must be awaited first!");
17208                 }
17209                 const nativeResponseValue = wasm.Invoice_recover_payee_pub_key(this_arg);
17210                 return decodeArray(nativeResponseValue);
17211         }
17212         // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
17213         export function Invoice_expiry_time(this_arg: number): number {
17214                 if(!isWasmInitialized) {
17215                         throw new Error("initializeWasm() must be awaited first!");
17216                 }
17217                 const nativeResponseValue = wasm.Invoice_expiry_time(this_arg);
17218                 return nativeResponseValue;
17219         }
17220         // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
17221         export function Invoice_min_final_cltv_expiry(this_arg: number): number {
17222                 if(!isWasmInitialized) {
17223                         throw new Error("initializeWasm() must be awaited first!");
17224                 }
17225                 const nativeResponseValue = wasm.Invoice_min_final_cltv_expiry(this_arg);
17226                 return nativeResponseValue;
17227         }
17228         // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
17229         export function Invoice_private_routes(this_arg: number): number[] {
17230                 if(!isWasmInitialized) {
17231                         throw new Error("initializeWasm() must be awaited first!");
17232                 }
17233                 const nativeResponseValue = wasm.Invoice_private_routes(this_arg);
17234                 return nativeResponseValue;
17235         }
17236         // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
17237         export function Invoice_route_hints(this_arg: number): number[] {
17238                 if(!isWasmInitialized) {
17239                         throw new Error("initializeWasm() must be awaited first!");
17240                 }
17241                 const nativeResponseValue = wasm.Invoice_route_hints(this_arg);
17242                 return nativeResponseValue;
17243         }
17244         // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
17245         export function Invoice_currency(this_arg: number): Currency {
17246                 if(!isWasmInitialized) {
17247                         throw new Error("initializeWasm() must be awaited first!");
17248                 }
17249                 const nativeResponseValue = wasm.Invoice_currency(this_arg);
17250                 return nativeResponseValue;
17251         }
17252         // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_pico_btc(const struct LDKInvoice *NONNULL_PTR this_arg);
17253         export function Invoice_amount_pico_btc(this_arg: number): number {
17254                 if(!isWasmInitialized) {
17255                         throw new Error("initializeWasm() must be awaited first!");
17256                 }
17257                 const nativeResponseValue = wasm.Invoice_amount_pico_btc(this_arg);
17258                 return nativeResponseValue;
17259         }
17260         // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
17261         export function Description_new(description: String): number {
17262                 if(!isWasmInitialized) {
17263                         throw new Error("initializeWasm() must be awaited first!");
17264                 }
17265                 const nativeResponseValue = wasm.Description_new(description);
17266                 return nativeResponseValue;
17267         }
17268         // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
17269         export function Description_into_inner(this_arg: number): String {
17270                 if(!isWasmInitialized) {
17271                         throw new Error("initializeWasm() must be awaited first!");
17272                 }
17273                 const nativeResponseValue = wasm.Description_into_inner(this_arg);
17274                 return nativeResponseValue;
17275         }
17276         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
17277         export function ExpiryTime_from_seconds(seconds: number): number {
17278                 if(!isWasmInitialized) {
17279                         throw new Error("initializeWasm() must be awaited first!");
17280                 }
17281                 const nativeResponseValue = wasm.ExpiryTime_from_seconds(seconds);
17282                 return nativeResponseValue;
17283         }
17284         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
17285         export function ExpiryTime_from_duration(duration: number): number {
17286                 if(!isWasmInitialized) {
17287                         throw new Error("initializeWasm() must be awaited first!");
17288                 }
17289                 const nativeResponseValue = wasm.ExpiryTime_from_duration(duration);
17290                 return nativeResponseValue;
17291         }
17292         // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
17293         export function ExpiryTime_as_seconds(this_arg: number): number {
17294                 if(!isWasmInitialized) {
17295                         throw new Error("initializeWasm() must be awaited first!");
17296                 }
17297                 const nativeResponseValue = wasm.ExpiryTime_as_seconds(this_arg);
17298                 return nativeResponseValue;
17299         }
17300         // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
17301         export function ExpiryTime_as_duration(this_arg: number): number {
17302                 if(!isWasmInitialized) {
17303                         throw new Error("initializeWasm() must be awaited first!");
17304                 }
17305                 const nativeResponseValue = wasm.ExpiryTime_as_duration(this_arg);
17306                 return nativeResponseValue;
17307         }
17308         // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
17309         export function PrivateRoute_new(hops: number): number {
17310                 if(!isWasmInitialized) {
17311                         throw new Error("initializeWasm() must be awaited first!");
17312                 }
17313                 const nativeResponseValue = wasm.PrivateRoute_new(hops);
17314                 return nativeResponseValue;
17315         }
17316         // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
17317         export function PrivateRoute_into_inner(this_arg: number): number {
17318                 if(!isWasmInitialized) {
17319                         throw new Error("initializeWasm() must be awaited first!");
17320                 }
17321                 const nativeResponseValue = wasm.PrivateRoute_into_inner(this_arg);
17322                 return nativeResponseValue;
17323         }
17324         // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
17325         export function CreationError_clone(orig: number): CreationError {
17326                 if(!isWasmInitialized) {
17327                         throw new Error("initializeWasm() must be awaited first!");
17328                 }
17329                 const nativeResponseValue = wasm.CreationError_clone(orig);
17330                 return nativeResponseValue;
17331         }
17332         // enum LDKCreationError CreationError_description_too_long(void);
17333         export function CreationError_description_too_long(): CreationError {
17334                 if(!isWasmInitialized) {
17335                         throw new Error("initializeWasm() must be awaited first!");
17336                 }
17337                 const nativeResponseValue = wasm.CreationError_description_too_long();
17338                 return nativeResponseValue;
17339         }
17340         // enum LDKCreationError CreationError_route_too_long(void);
17341         export function CreationError_route_too_long(): CreationError {
17342                 if(!isWasmInitialized) {
17343                         throw new Error("initializeWasm() must be awaited first!");
17344                 }
17345                 const nativeResponseValue = wasm.CreationError_route_too_long();
17346                 return nativeResponseValue;
17347         }
17348         // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
17349         export function CreationError_timestamp_out_of_bounds(): CreationError {
17350                 if(!isWasmInitialized) {
17351                         throw new Error("initializeWasm() must be awaited first!");
17352                 }
17353                 const nativeResponseValue = wasm.CreationError_timestamp_out_of_bounds();
17354                 return nativeResponseValue;
17355         }
17356         // enum LDKCreationError CreationError_expiry_time_out_of_bounds(void);
17357         export function CreationError_expiry_time_out_of_bounds(): CreationError {
17358                 if(!isWasmInitialized) {
17359                         throw new Error("initializeWasm() must be awaited first!");
17360                 }
17361                 const nativeResponseValue = wasm.CreationError_expiry_time_out_of_bounds();
17362                 return nativeResponseValue;
17363         }
17364         // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
17365         export function CreationError_eq(a: number, b: number): boolean {
17366                 if(!isWasmInitialized) {
17367                         throw new Error("initializeWasm() must be awaited first!");
17368                 }
17369                 const nativeResponseValue = wasm.CreationError_eq(a, b);
17370                 return nativeResponseValue;
17371         }
17372         // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
17373         export function CreationError_to_str(o: number): String {
17374                 if(!isWasmInitialized) {
17375                         throw new Error("initializeWasm() must be awaited first!");
17376                 }
17377                 const nativeResponseValue = wasm.CreationError_to_str(o);
17378                 return nativeResponseValue;
17379         }
17380         // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
17381         export function SemanticError_clone(orig: number): SemanticError {
17382                 if(!isWasmInitialized) {
17383                         throw new Error("initializeWasm() must be awaited first!");
17384                 }
17385                 const nativeResponseValue = wasm.SemanticError_clone(orig);
17386                 return nativeResponseValue;
17387         }
17388         // enum LDKSemanticError SemanticError_no_payment_hash(void);
17389         export function SemanticError_no_payment_hash(): SemanticError {
17390                 if(!isWasmInitialized) {
17391                         throw new Error("initializeWasm() must be awaited first!");
17392                 }
17393                 const nativeResponseValue = wasm.SemanticError_no_payment_hash();
17394                 return nativeResponseValue;
17395         }
17396         // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
17397         export function SemanticError_multiple_payment_hashes(): SemanticError {
17398                 if(!isWasmInitialized) {
17399                         throw new Error("initializeWasm() must be awaited first!");
17400                 }
17401                 const nativeResponseValue = wasm.SemanticError_multiple_payment_hashes();
17402                 return nativeResponseValue;
17403         }
17404         // enum LDKSemanticError SemanticError_no_description(void);
17405         export function SemanticError_no_description(): SemanticError {
17406                 if(!isWasmInitialized) {
17407                         throw new Error("initializeWasm() must be awaited first!");
17408                 }
17409                 const nativeResponseValue = wasm.SemanticError_no_description();
17410                 return nativeResponseValue;
17411         }
17412         // enum LDKSemanticError SemanticError_multiple_descriptions(void);
17413         export function SemanticError_multiple_descriptions(): SemanticError {
17414                 if(!isWasmInitialized) {
17415                         throw new Error("initializeWasm() must be awaited first!");
17416                 }
17417                 const nativeResponseValue = wasm.SemanticError_multiple_descriptions();
17418                 return nativeResponseValue;
17419         }
17420         // enum LDKSemanticError SemanticError_no_payment_secret(void);
17421         export function SemanticError_no_payment_secret(): SemanticError {
17422                 if(!isWasmInitialized) {
17423                         throw new Error("initializeWasm() must be awaited first!");
17424                 }
17425                 const nativeResponseValue = wasm.SemanticError_no_payment_secret();
17426                 return nativeResponseValue;
17427         }
17428         // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
17429         export function SemanticError_multiple_payment_secrets(): SemanticError {
17430                 if(!isWasmInitialized) {
17431                         throw new Error("initializeWasm() must be awaited first!");
17432                 }
17433                 const nativeResponseValue = wasm.SemanticError_multiple_payment_secrets();
17434                 return nativeResponseValue;
17435         }
17436         // enum LDKSemanticError SemanticError_invalid_features(void);
17437         export function SemanticError_invalid_features(): SemanticError {
17438                 if(!isWasmInitialized) {
17439                         throw new Error("initializeWasm() must be awaited first!");
17440                 }
17441                 const nativeResponseValue = wasm.SemanticError_invalid_features();
17442                 return nativeResponseValue;
17443         }
17444         // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
17445         export function SemanticError_invalid_recovery_id(): SemanticError {
17446                 if(!isWasmInitialized) {
17447                         throw new Error("initializeWasm() must be awaited first!");
17448                 }
17449                 const nativeResponseValue = wasm.SemanticError_invalid_recovery_id();
17450                 return nativeResponseValue;
17451         }
17452         // enum LDKSemanticError SemanticError_invalid_signature(void);
17453         export function SemanticError_invalid_signature(): SemanticError {
17454                 if(!isWasmInitialized) {
17455                         throw new Error("initializeWasm() must be awaited first!");
17456                 }
17457                 const nativeResponseValue = wasm.SemanticError_invalid_signature();
17458                 return nativeResponseValue;
17459         }
17460         // enum LDKSemanticError SemanticError_imprecise_amount(void);
17461         export function SemanticError_imprecise_amount(): SemanticError {
17462                 if(!isWasmInitialized) {
17463                         throw new Error("initializeWasm() must be awaited first!");
17464                 }
17465                 const nativeResponseValue = wasm.SemanticError_imprecise_amount();
17466                 return nativeResponseValue;
17467         }
17468         // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
17469         export function SemanticError_eq(a: number, b: number): boolean {
17470                 if(!isWasmInitialized) {
17471                         throw new Error("initializeWasm() must be awaited first!");
17472                 }
17473                 const nativeResponseValue = wasm.SemanticError_eq(a, b);
17474                 return nativeResponseValue;
17475         }
17476         // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
17477         export function SemanticError_to_str(o: number): String {
17478                 if(!isWasmInitialized) {
17479                         throw new Error("initializeWasm() must be awaited first!");
17480                 }
17481                 const nativeResponseValue = wasm.SemanticError_to_str(o);
17482                 return nativeResponseValue;
17483         }
17484         // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
17485         export function SignOrCreationError_free(this_ptr: number): void {
17486                 if(!isWasmInitialized) {
17487                         throw new Error("initializeWasm() must be awaited first!");
17488                 }
17489                 const nativeResponseValue = wasm.SignOrCreationError_free(this_ptr);
17490                 // debug statements here
17491         }
17492         // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
17493         export function SignOrCreationError_clone(orig: number): number {
17494                 if(!isWasmInitialized) {
17495                         throw new Error("initializeWasm() must be awaited first!");
17496                 }
17497                 const nativeResponseValue = wasm.SignOrCreationError_clone(orig);
17498                 return nativeResponseValue;
17499         }
17500         // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
17501         export function SignOrCreationError_sign_error(): number {
17502                 if(!isWasmInitialized) {
17503                         throw new Error("initializeWasm() must be awaited first!");
17504                 }
17505                 const nativeResponseValue = wasm.SignOrCreationError_sign_error();
17506                 return nativeResponseValue;
17507         }
17508         // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
17509         export function SignOrCreationError_creation_error(a: CreationError): number {
17510                 if(!isWasmInitialized) {
17511                         throw new Error("initializeWasm() must be awaited first!");
17512                 }
17513                 const nativeResponseValue = wasm.SignOrCreationError_creation_error(a);
17514                 return nativeResponseValue;
17515         }
17516         // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
17517         export function SignOrCreationError_eq(a: number, b: number): boolean {
17518                 if(!isWasmInitialized) {
17519                         throw new Error("initializeWasm() must be awaited first!");
17520                 }
17521                 const nativeResponseValue = wasm.SignOrCreationError_eq(a, b);
17522                 return nativeResponseValue;
17523         }
17524         // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
17525         export function SignOrCreationError_to_str(o: number): String {
17526                 if(!isWasmInitialized) {
17527                         throw new Error("initializeWasm() must be awaited first!");
17528                 }
17529                 const nativeResponseValue = wasm.SignOrCreationError_to_str(o);
17530                 return nativeResponseValue;
17531         }
17532         // 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);
17533         export function create_invoice_from_channelmanager(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description: String): number {
17534                 if(!isWasmInitialized) {
17535                         throw new Error("initializeWasm() must be awaited first!");
17536                 }
17537                 const nativeResponseValue = wasm.create_invoice_from_channelmanager(channelmanager, keys_manager, network, amt_msat, description);
17538                 return nativeResponseValue;
17539         }
17540         // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
17541         export function SiPrefix_from_str(s: String): number {
17542                 if(!isWasmInitialized) {
17543                         throw new Error("initializeWasm() must be awaited first!");
17544                 }
17545                 const nativeResponseValue = wasm.SiPrefix_from_str(s);
17546                 return nativeResponseValue;
17547         }
17548         // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
17549         export function Invoice_from_str(s: String): number {
17550                 if(!isWasmInitialized) {
17551                         throw new Error("initializeWasm() must be awaited first!");
17552                 }
17553                 const nativeResponseValue = wasm.Invoice_from_str(s);
17554                 return nativeResponseValue;
17555         }
17556         // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
17557         export function SignedRawInvoice_from_str(s: String): number {
17558                 if(!isWasmInitialized) {
17559                         throw new Error("initializeWasm() must be awaited first!");
17560                 }
17561                 const nativeResponseValue = wasm.SignedRawInvoice_from_str(s);
17562                 return nativeResponseValue;
17563         }
17564         // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
17565         export function Invoice_to_str(o: number): String {
17566                 if(!isWasmInitialized) {
17567                         throw new Error("initializeWasm() must be awaited first!");
17568                 }
17569                 const nativeResponseValue = wasm.Invoice_to_str(o);
17570                 return nativeResponseValue;
17571         }
17572         // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
17573         export function SignedRawInvoice_to_str(o: number): String {
17574                 if(!isWasmInitialized) {
17575                         throw new Error("initializeWasm() must be awaited first!");
17576                 }
17577                 const nativeResponseValue = wasm.SignedRawInvoice_to_str(o);
17578                 return nativeResponseValue;
17579         }
17580         // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
17581         export function Currency_to_str(o: number): String {
17582                 if(!isWasmInitialized) {
17583                         throw new Error("initializeWasm() must be awaited first!");
17584                 }
17585                 const nativeResponseValue = wasm.Currency_to_str(o);
17586                 return nativeResponseValue;
17587         }
17588         // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
17589         export function SiPrefix_to_str(o: number): String {
17590                 if(!isWasmInitialized) {
17591                         throw new Error("initializeWasm() must be awaited first!");
17592                 }
17593                 const nativeResponseValue = wasm.SiPrefix_to_str(o);
17594                 return nativeResponseValue;
17595         }
17596
17597         export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
17598             if(isWasmInitialized && !allowDoubleInitialization) {
17599                 return;
17600             }
17601             const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
17602             wasm = wasmInstance.exports;
17603             isWasmInitialized = true;
17604         }
17605