Update auto-generated bindings to 0.0.103
[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 native boolean LDKCResult_RouteParametersDecodeErrorZ_result_ok(long arg);
243         public static native number LDKCResult_RouteParametersDecodeErrorZ_get_ok(long arg);
244         public static native number LDKCResult_RouteParametersDecodeErrorZ_get_err(long arg);
245         public static native long LDKCVec_RouteHintZ_new(number[] elems);
246         public static class LDKCOption_u64Z {
247                 private LDKCOption_u64Z() {}
248                 export class Some extends LDKCOption_u64Z {
249                         public number some;
250                         Some(number some) { this.some = some; }
251                 }
252                 export class None extends LDKCOption_u64Z {
253                         None() { }
254                 }
255                 static native void init();
256         }
257         static { LDKCOption_u64Z.init(); }
258         public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
259         public static native boolean LDKCResult_PayeeDecodeErrorZ_result_ok(long arg);
260         public static native number LDKCResult_PayeeDecodeErrorZ_get_ok(long arg);
261         public static native number LDKCResult_PayeeDecodeErrorZ_get_err(long arg);
262         public static native long LDKCVec_RouteHintHopZ_new(number[] elems);
263         public static native boolean LDKCResult_RouteHintDecodeErrorZ_result_ok(long arg);
264         public static native number LDKCResult_RouteHintDecodeErrorZ_get_ok(long arg);
265         public static native number LDKCResult_RouteHintDecodeErrorZ_get_err(long arg);
266         public static native boolean LDKCResult_RouteHintHopDecodeErrorZ_result_ok(long arg);
267         public static native number LDKCResult_RouteHintHopDecodeErrorZ_get_ok(long arg);
268         public static native number LDKCResult_RouteHintHopDecodeErrorZ_get_err(long arg);
269         public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
270         public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
271         public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
272         public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
273         public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
274         public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
275         public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
276         // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
277         export function C2Tuple_usizeTransactionZ_get_a(tuple: number): number {
278                 if(!isWasmInitialized) {
279                         throw new Error("initializeWasm() must be awaited first!");
280                 }
281                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_a(tuple);
282                 return nativeResponseValue;
283         }
284         // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
285         export function C2Tuple_usizeTransactionZ_get_b(tuple: number): Uint8Array {
286                 if(!isWasmInitialized) {
287                         throw new Error("initializeWasm() must be awaited first!");
288                 }
289                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_b(tuple);
290                 return decodeArray(nativeResponseValue);
291         }
292         public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
293         public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
294         public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
295         public static native ChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
296         public static class LDKMonitorEvent {
297                 private LDKMonitorEvent() {}
298                 export class HTLCEvent extends LDKMonitorEvent {
299                         public number htlc_event;
300                         HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
301                 }
302                 export class CommitmentTxConfirmed extends LDKMonitorEvent {
303                         public number commitment_tx_confirmed;
304                         CommitmentTxConfirmed(number commitment_tx_confirmed) { this.commitment_tx_confirmed = commitment_tx_confirmed; }
305                 }
306                 export class UpdateCompleted extends LDKMonitorEvent {
307                         public number funding_txo;
308                         public number monitor_update_id;
309                         UpdateCompleted(number funding_txo, number monitor_update_id) { this.funding_txo = funding_txo; this.monitor_update_id = monitor_update_id; }
310                 }
311                 export class UpdateFailed extends LDKMonitorEvent {
312                         public number update_failed;
313                         UpdateFailed(number update_failed) { this.update_failed = update_failed; }
314                 }
315                 static native void init();
316         }
317         static { LDKMonitorEvent.init(); }
318         public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
319         public static native long LDKCVec_MonitorEventZ_new(number[] elems);
320         public static class LDKCOption_C2Tuple_usizeTransactionZZ {
321                 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
322                 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
323                         public number some;
324                         Some(number some) { this.some = some; }
325                 }
326                 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
327                         None() { }
328                 }
329                 static native void init();
330         }
331         static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
332         public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
333         public static class LDKNetworkUpdate {
334                 private LDKNetworkUpdate() {}
335                 export class ChannelUpdateMessage extends LDKNetworkUpdate {
336                         public number msg;
337                         ChannelUpdateMessage(number msg) { this.msg = msg; }
338                 }
339                 export class ChannelClosed extends LDKNetworkUpdate {
340                         public number short_channel_id;
341                         public boolean is_permanent;
342                         ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
343                 }
344                 export class NodeFailure extends LDKNetworkUpdate {
345                         public Uint8Array node_id;
346                         public boolean is_permanent;
347                         NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
348                 }
349                 static native void init();
350         }
351         static { LDKNetworkUpdate.init(); }
352         public static native LDKNetworkUpdate LDKNetworkUpdate_ref_from_ptr(long ptr);
353         public static class LDKCOption_NetworkUpdateZ {
354                 private LDKCOption_NetworkUpdateZ() {}
355                 export class Some extends LDKCOption_NetworkUpdateZ {
356                         public number some;
357                         Some(number some) { this.some = some; }
358                 }
359                 export class None extends LDKCOption_NetworkUpdateZ {
360                         None() { }
361                 }
362                 static native void init();
363         }
364         static { LDKCOption_NetworkUpdateZ.init(); }
365         public static native LDKCOption_NetworkUpdateZ LDKCOption_NetworkUpdateZ_ref_from_ptr(long ptr);
366         public static class LDKSpendableOutputDescriptor {
367                 private LDKSpendableOutputDescriptor() {}
368                 export class StaticOutput extends LDKSpendableOutputDescriptor {
369                         public number outpoint;
370                         public number output;
371                         StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
372                 }
373                 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
374                         public number delayed_payment_output;
375                         DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
376                 }
377                 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
378                         public number static_payment_output;
379                         StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
380                 }
381                 static native void init();
382         }
383         static { LDKSpendableOutputDescriptor.init(); }
384         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
385         public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
386         public static class LDKErrorAction {
387                 private LDKErrorAction() {}
388                 export class DisconnectPeer extends LDKErrorAction {
389                         public number msg;
390                         DisconnectPeer(number msg) { this.msg = msg; }
391                 }
392                 export class IgnoreError extends LDKErrorAction {
393                         IgnoreError() { }
394                 }
395                 export class IgnoreAndLog extends LDKErrorAction {
396                         public Level ignore_and_log;
397                         IgnoreAndLog(Level ignore_and_log) { this.ignore_and_log = ignore_and_log; }
398                 }
399                 export class SendErrorMessage extends LDKErrorAction {
400                         public number msg;
401                         SendErrorMessage(number msg) { this.msg = msg; }
402                 }
403                 static native void init();
404         }
405         static { LDKErrorAction.init(); }
406         public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
407         public static class LDKMessageSendEvent {
408                 private LDKMessageSendEvent() {}
409                 export class SendAcceptChannel extends LDKMessageSendEvent {
410                         public Uint8Array node_id;
411                         public number msg;
412                         SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
413                 }
414                 export class SendOpenChannel extends LDKMessageSendEvent {
415                         public Uint8Array node_id;
416                         public number msg;
417                         SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
418                 }
419                 export class SendFundingCreated extends LDKMessageSendEvent {
420                         public Uint8Array node_id;
421                         public number msg;
422                         SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
423                 }
424                 export class SendFundingSigned extends LDKMessageSendEvent {
425                         public Uint8Array node_id;
426                         public number msg;
427                         SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
428                 }
429                 export class SendFundingLocked extends LDKMessageSendEvent {
430                         public Uint8Array node_id;
431                         public number msg;
432                         SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
433                 }
434                 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
435                         public Uint8Array node_id;
436                         public number msg;
437                         SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
438                 }
439                 export class UpdateHTLCs extends LDKMessageSendEvent {
440                         public Uint8Array node_id;
441                         public number updates;
442                         UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
443                 }
444                 export class SendRevokeAndACK extends LDKMessageSendEvent {
445                         public Uint8Array node_id;
446                         public number msg;
447                         SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
448                 }
449                 export class SendClosingSigned extends LDKMessageSendEvent {
450                         public Uint8Array node_id;
451                         public number msg;
452                         SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
453                 }
454                 export class SendShutdown extends LDKMessageSendEvent {
455                         public Uint8Array node_id;
456                         public number msg;
457                         SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
458                 }
459                 export class SendChannelReestablish extends LDKMessageSendEvent {
460                         public Uint8Array node_id;
461                         public number msg;
462                         SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
463                 }
464                 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
465                         public number msg;
466                         public number update_msg;
467                         BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
468                 }
469                 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
470                         public number msg;
471                         BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
472                 }
473                 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
474                         public number msg;
475                         BroadcastChannelUpdate(number msg) { this.msg = msg; }
476                 }
477                 export class SendChannelUpdate extends LDKMessageSendEvent {
478                         public Uint8Array node_id;
479                         public number msg;
480                         SendChannelUpdate(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
481                 }
482                 export class HandleError extends LDKMessageSendEvent {
483                         public Uint8Array node_id;
484                         public number action;
485                         HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
486                 }
487                 export class SendChannelRangeQuery extends LDKMessageSendEvent {
488                         public Uint8Array node_id;
489                         public number msg;
490                         SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
491                 }
492                 export class SendShortIdsQuery extends LDKMessageSendEvent {
493                         public Uint8Array node_id;
494                         public number msg;
495                         SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
496                 }
497                 export class SendReplyChannelRange extends LDKMessageSendEvent {
498                         public Uint8Array node_id;
499                         public number msg;
500                         SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
501                 }
502                 static native void init();
503         }
504         static { LDKMessageSendEvent.init(); }
505         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
506         public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
507         public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
508         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
509         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
510         public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
511         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
512         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
513         public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
514         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
515         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
516         public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
517         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
518         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
519         public static native boolean LDKCResult_ScoringParametersDecodeErrorZ_result_ok(long arg);
520         public static native number LDKCResult_ScoringParametersDecodeErrorZ_get_ok(long arg);
521         public static native number LDKCResult_ScoringParametersDecodeErrorZ_get_err(long arg);
522         public static native boolean LDKCResult_ScorerDecodeErrorZ_result_ok(long arg);
523         public static native number LDKCResult_ScorerDecodeErrorZ_get_ok(long arg);
524         public static native number LDKCResult_ScorerDecodeErrorZ_get_err(long arg);
525         public static native boolean LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
526         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
527         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
528         public static native boolean LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
529         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
530         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
531         public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
532         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
533         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
534         public static native boolean LDKCResult_NoneNoneZ_result_ok(long arg);
535         public static native void LDKCResult_NoneNoneZ_get_ok(long arg);
536         public static native void LDKCResult_NoneNoneZ_get_err(long arg);
537         // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
538         export function C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple: number): Uint8Array {
539                 if(!isWasmInitialized) {
540                         throw new Error("initializeWasm() must be awaited first!");
541                 }
542                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple);
543                 return decodeArray(nativeResponseValue);
544         }
545         // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
546         export function C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple: number): Uint8Array[] {
547                 if(!isWasmInitialized) {
548                         throw new Error("initializeWasm() must be awaited first!");
549                 }
550                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple);
551                 return nativeResponseValue;
552         }
553         public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
554         public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
555         public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
556         public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
557         public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
558         public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
559
560
561
562 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
563
564                 export interface LDKBaseSign {
565                         get_per_commitment_point (idx: number): Uint8Array;
566                         release_commitment_secret (idx: number): Uint8Array;
567                         validate_holder_commitment (holder_tx: number): number;
568                         channel_keys_id (): Uint8Array;
569                         sign_counterparty_commitment (commitment_tx: number): number;
570                         validate_counterparty_revocation (idx: number, secret: Uint8Array): number;
571                         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
572                         sign_justice_revoked_output (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number;
573                         sign_justice_revoked_htlc (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
574                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
575                         sign_closing_transaction (closing_tx: number): number;
576                         sign_channel_announcement (msg: number): number;
577                         ready_channel (channel_parameters: number): void;
578                 }
579
580                 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
581             throw new Error('unimplemented'); // TODO: bind to WASM
582         }
583
584 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
585
586
587         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
588         export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
589                 if(!isWasmInitialized) {
590                         throw new Error("initializeWasm() must be awaited first!");
591                 }
592                 const nativeResponseValue = wasm.BaseSign_get_per_commitment_point(this_arg, idx);
593                 return decodeArray(nativeResponseValue);
594         }
595         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
596         export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
597                 if(!isWasmInitialized) {
598                         throw new Error("initializeWasm() must be awaited first!");
599                 }
600                 const nativeResponseValue = wasm.BaseSign_release_commitment_secret(this_arg, idx);
601                 return decodeArray(nativeResponseValue);
602         }
603         // LDKCResult_NoneNoneZ BaseSign_validate_holder_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx
604         export function BaseSign_validate_holder_commitment(this_arg: number, holder_tx: number): number {
605                 if(!isWasmInitialized) {
606                         throw new Error("initializeWasm() must be awaited first!");
607                 }
608                 const nativeResponseValue = wasm.BaseSign_validate_holder_commitment(this_arg, holder_tx);
609                 return nativeResponseValue;
610         }
611         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
612         export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
613                 if(!isWasmInitialized) {
614                         throw new Error("initializeWasm() must be awaited first!");
615                 }
616                 const nativeResponseValue = wasm.BaseSign_channel_keys_id(this_arg);
617                 return decodeArray(nativeResponseValue);
618         }
619         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
620         export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
621                 if(!isWasmInitialized) {
622                         throw new Error("initializeWasm() must be awaited first!");
623                 }
624                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
625                 return nativeResponseValue;
626         }
627         // LDKCResult_NoneNoneZ BaseSign_validate_counterparty_revocation LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx, const uint8_t (*secret)[32]
628         export function BaseSign_validate_counterparty_revocation(this_arg: number, idx: number, secret: Uint8Array): number {
629                 if(!isWasmInitialized) {
630                         throw new Error("initializeWasm() must be awaited first!");
631                 }
632                 const nativeResponseValue = wasm.BaseSign_validate_counterparty_revocation(this_arg, idx, encodeArray(secret));
633                 return nativeResponseValue;
634         }
635         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
636         export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
637                 if(!isWasmInitialized) {
638                         throw new Error("initializeWasm() must be awaited first!");
639                 }
640                 const nativeResponseValue = wasm.BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
641                 return nativeResponseValue;
642         }
643         // 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]
644         export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number {
645                 if(!isWasmInitialized) {
646                         throw new Error("initializeWasm() must be awaited first!");
647                 }
648                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_output(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key));
649                 return nativeResponseValue;
650         }
651         // 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
652         export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
653                 if(!isWasmInitialized) {
654                         throw new Error("initializeWasm() must be awaited first!");
655                 }
656                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_htlc(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
657                 return nativeResponseValue;
658         }
659         // 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
660         export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
661                 if(!isWasmInitialized) {
662                         throw new Error("initializeWasm() must be awaited first!");
663                 }
664                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
665                 return nativeResponseValue;
666         }
667         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
668         export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: number): number {
669                 if(!isWasmInitialized) {
670                         throw new Error("initializeWasm() must be awaited first!");
671                 }
672                 const nativeResponseValue = wasm.BaseSign_sign_closing_transaction(this_arg, closing_tx);
673                 return nativeResponseValue;
674         }
675         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
676         export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
677                 if(!isWasmInitialized) {
678                         throw new Error("initializeWasm() must be awaited first!");
679                 }
680                 const nativeResponseValue = wasm.BaseSign_sign_channel_announcement(this_arg, msg);
681                 return nativeResponseValue;
682         }
683         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
684         export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
685                 if(!isWasmInitialized) {
686                         throw new Error("initializeWasm() must be awaited first!");
687                 }
688                 const nativeResponseValue = wasm.BaseSign_ready_channel(this_arg, channel_parameters);
689                 // debug statements here
690         }
691         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
692         export function BaseSign_get_pubkeys(this_arg: number): number {
693                 if(!isWasmInitialized) {
694                         throw new Error("initializeWasm() must be awaited first!");
695                 }
696                 const nativeResponseValue = wasm.BaseSign_get_pubkeys(this_arg);
697                 return nativeResponseValue;
698         }
699
700
701
702 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
703
704                 export interface LDKSign {
705                         write (): Uint8Array;
706                 }
707
708                 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
709             throw new Error('unimplemented'); // TODO: bind to WASM
710         }
711
712 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
713
714
715         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
716         export function Sign_write(this_arg: number): Uint8Array {
717                 if(!isWasmInitialized) {
718                         throw new Error("initializeWasm() must be awaited first!");
719                 }
720                 const nativeResponseValue = wasm.Sign_write(this_arg);
721                 return decodeArray(nativeResponseValue);
722         }
723         public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
724         public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
725         public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
726         public static native boolean LDKCResult_RecoverableSignatureNoneZ_result_ok(long arg);
727         public static native Uint8Array LDKCResult_RecoverableSignatureNoneZ_get_ok(long arg);
728         public static native void LDKCResult_RecoverableSignatureNoneZ_get_err(long arg);
729         public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
730         public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
731         public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
732         public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
733         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
734         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
735         public static native long LDKCVec_TxOutZ_new(number[] elems);
736         public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
737         public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
738         public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
739         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
740         export function C2Tuple_BlockHashChannelMonitorZ_get_a(tuple: number): Uint8Array {
741                 if(!isWasmInitialized) {
742                         throw new Error("initializeWasm() must be awaited first!");
743                 }
744                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_a(tuple);
745                 return decodeArray(nativeResponseValue);
746         }
747         // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
748         export function C2Tuple_BlockHashChannelMonitorZ_get_b(tuple: number): number {
749                 if(!isWasmInitialized) {
750                         throw new Error("initializeWasm() must be awaited first!");
751                 }
752                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_b(tuple);
753                 return nativeResponseValue;
754         }
755         public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(number[] elems);
756         public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
757         public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
758         public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
759         public static class LDKCOption_u16Z {
760                 private LDKCOption_u16Z() {}
761                 export class Some extends LDKCOption_u16Z {
762                         public number some;
763                         Some(number some) { this.some = some; }
764                 }
765                 export class None extends LDKCOption_u16Z {
766                         None() { }
767                 }
768                 static native void init();
769         }
770         static { LDKCOption_u16Z.init(); }
771         public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
772         public static class LDKAPIError {
773                 private LDKAPIError() {}
774                 export class APIMisuseError extends LDKAPIError {
775                         public String err;
776                         APIMisuseError(String err) { this.err = err; }
777                 }
778                 export class FeeRateTooHigh extends LDKAPIError {
779                         public String err;
780                         public number feerate;
781                         FeeRateTooHigh(String err, number feerate) { this.err = err; this.feerate = feerate; }
782                 }
783                 export class RouteError extends LDKAPIError {
784                         public String err;
785                         RouteError(String err) { this.err = err; }
786                 }
787                 export class ChannelUnavailable extends LDKAPIError {
788                         public String err;
789                         ChannelUnavailable(String err) { this.err = err; }
790                 }
791                 export class MonitorUpdateFailed extends LDKAPIError {
792                         MonitorUpdateFailed() { }
793                 }
794                 export class IncompatibleShutdownScript extends LDKAPIError {
795                         public number script;
796                         IncompatibleShutdownScript(number script) { this.script = script; }
797                 }
798                 static native void init();
799         }
800         static { LDKAPIError.init(); }
801         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
802         public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
803         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
804         public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
805         public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
806         public static native long LDKCVec_APIErrorZ_new(number[] elems);
807         public static native boolean LDKCResult__u832APIErrorZ_result_ok(long arg);
808         public static native Uint8Array LDKCResult__u832APIErrorZ_get_ok(long arg);
809         public static native number LDKCResult__u832APIErrorZ_get_err(long arg);
810         public static class LDKPaymentSendFailure {
811                 private LDKPaymentSendFailure() {}
812                 export class ParameterError extends LDKPaymentSendFailure {
813                         public number parameter_error;
814                         ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
815                 }
816                 export class PathParameterError extends LDKPaymentSendFailure {
817                         public number[] path_parameter_error;
818                         PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
819                 }
820                 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
821                         public number[] all_failed_retry_safe;
822                         AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
823                 }
824                 export class PartialFailure extends LDKPaymentSendFailure {
825                         public number[] results;
826                         public number failed_paths_retry;
827                         public Uint8Array payment_id;
828                         PartialFailure(number[] results, number failed_paths_retry, Uint8Array payment_id) { this.results = results; this.failed_paths_retry = failed_paths_retry; this.payment_id = payment_id; }
829                 }
830                 static native void init();
831         }
832         static { LDKPaymentSendFailure.init(); }
833         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
834         public static native boolean LDKCResult_PaymentIdPaymentSendFailureZ_result_ok(long arg);
835         public static native Uint8Array LDKCResult_PaymentIdPaymentSendFailureZ_get_ok(long arg);
836         public static native number LDKCResult_PaymentIdPaymentSendFailureZ_get_err(long arg);
837         public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
838         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
839         public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
840         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_a(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
841         export function C2Tuple_PaymentHashPaymentIdZ_get_a(tuple: number): Uint8Array {
842                 if(!isWasmInitialized) {
843                         throw new Error("initializeWasm() must be awaited first!");
844                 }
845                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_get_a(tuple);
846                 return decodeArray(nativeResponseValue);
847         }
848         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_b(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
849         export function C2Tuple_PaymentHashPaymentIdZ_get_b(tuple: number): Uint8Array {
850                 if(!isWasmInitialized) {
851                         throw new Error("initializeWasm() must be awaited first!");
852                 }
853                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_get_b(tuple);
854                 return decodeArray(nativeResponseValue);
855         }
856         public static native boolean LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_result_ok(long arg);
857         public static native number LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(long arg);
858         public static native number LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(long arg);
859         public static class LDKNetAddress {
860                 private LDKNetAddress() {}
861                 export class IPv4 extends LDKNetAddress {
862                         public Uint8Array addr;
863                         public number port;
864                         IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
865                 }
866                 export class IPv6 extends LDKNetAddress {
867                         public Uint8Array addr;
868                         public number port;
869                         IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
870                 }
871                 export class OnionV2 extends LDKNetAddress {
872                         public Uint8Array addr;
873                         public number port;
874                         OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
875                 }
876                 export class OnionV3 extends LDKNetAddress {
877                         public Uint8Array ed25519_pubkey;
878                         public number checksum;
879                         public number version;
880                         public number port;
881                         OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
882                 }
883                 static native void init();
884         }
885         static { LDKNetAddress.init(); }
886         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
887         public static native long LDKCVec_NetAddressZ_new(number[] elems);
888         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
889         export function C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple: number): Uint8Array {
890                 if(!isWasmInitialized) {
891                         throw new Error("initializeWasm() must be awaited first!");
892                 }
893                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple);
894                 return decodeArray(nativeResponseValue);
895         }
896         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
897         export function C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple: number): Uint8Array {
898                 if(!isWasmInitialized) {
899                         throw new Error("initializeWasm() must be awaited first!");
900                 }
901                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple);
902                 return decodeArray(nativeResponseValue);
903         }
904         public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
905         public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
906         public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
907         public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
908
909
910
911 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
912
913                 export interface LDKWatch {
914                         watch_channel (funding_txo: number, monitor: number): number;
915                         update_channel (funding_txo: number, update: number): number;
916                         release_pending_monitor_events (): number[];
917                 }
918
919                 export function LDKWatch_new(impl: LDKWatch): number {
920             throw new Error('unimplemented'); // TODO: bind to WASM
921         }
922
923 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
924
925
926         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
927         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
928                 if(!isWasmInitialized) {
929                         throw new Error("initializeWasm() must be awaited first!");
930                 }
931                 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
932                 return nativeResponseValue;
933         }
934         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
935         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
936                 if(!isWasmInitialized) {
937                         throw new Error("initializeWasm() must be awaited first!");
938                 }
939                 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
940                 return nativeResponseValue;
941         }
942         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
943         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
944                 if(!isWasmInitialized) {
945                         throw new Error("initializeWasm() must be awaited first!");
946                 }
947                 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
948                 return nativeResponseValue;
949         }
950
951
952
953 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
954
955                 export interface LDKBroadcasterInterface {
956                         broadcast_transaction (tx: Uint8Array): void;
957                 }
958
959                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
960             throw new Error('unimplemented'); // TODO: bind to WASM
961         }
962
963 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
964
965
966         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
967         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
968                 if(!isWasmInitialized) {
969                         throw new Error("initializeWasm() must be awaited first!");
970                 }
971                 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
972                 // debug statements here
973         }
974
975
976
977 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
978
979                 export interface LDKKeysInterface {
980                         get_node_secret (): Uint8Array;
981                         get_destination_script (): Uint8Array;
982                         get_shutdown_scriptpubkey (): number;
983                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
984                         get_secure_random_bytes (): Uint8Array;
985                         read_chan_signer (reader: Uint8Array): number;
986                         sign_invoice (invoice_preimage: Uint8Array): number;
987                 }
988
989                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
990             throw new Error('unimplemented'); // TODO: bind to WASM
991         }
992
993 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
994
995
996         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
997         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
998                 if(!isWasmInitialized) {
999                         throw new Error("initializeWasm() must be awaited first!");
1000                 }
1001                 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
1002                 return decodeArray(nativeResponseValue);
1003         }
1004         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
1005         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
1006                 if(!isWasmInitialized) {
1007                         throw new Error("initializeWasm() must be awaited first!");
1008                 }
1009                 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
1010                 return decodeArray(nativeResponseValue);
1011         }
1012         // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
1013         export function KeysInterface_get_shutdown_scriptpubkey(this_arg: number): number {
1014                 if(!isWasmInitialized) {
1015                         throw new Error("initializeWasm() must be awaited first!");
1016                 }
1017                 const nativeResponseValue = wasm.KeysInterface_get_shutdown_scriptpubkey(this_arg);
1018                 return nativeResponseValue;
1019         }
1020         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
1021         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
1022                 if(!isWasmInitialized) {
1023                         throw new Error("initializeWasm() must be awaited first!");
1024                 }
1025                 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
1026                 return nativeResponseValue;
1027         }
1028         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
1029         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
1030                 if(!isWasmInitialized) {
1031                         throw new Error("initializeWasm() must be awaited first!");
1032                 }
1033                 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
1034                 return decodeArray(nativeResponseValue);
1035         }
1036         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
1037         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
1038                 if(!isWasmInitialized) {
1039                         throw new Error("initializeWasm() must be awaited first!");
1040                 }
1041                 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
1042                 return nativeResponseValue;
1043         }
1044         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
1045         export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
1046                 if(!isWasmInitialized) {
1047                         throw new Error("initializeWasm() must be awaited first!");
1048                 }
1049                 const nativeResponseValue = wasm.KeysInterface_sign_invoice(this_arg, encodeArray(invoice_preimage));
1050                 return nativeResponseValue;
1051         }
1052
1053
1054
1055 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1056
1057                 export interface LDKFeeEstimator {
1058                         get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
1059                 }
1060
1061                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
1062             throw new Error('unimplemented'); // TODO: bind to WASM
1063         }
1064
1065 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1066
1067
1068         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
1069         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
1070                 if(!isWasmInitialized) {
1071                         throw new Error("initializeWasm() must be awaited first!");
1072                 }
1073                 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
1074                 return nativeResponseValue;
1075         }
1076
1077
1078
1079 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1080
1081                 export interface LDKLogger {
1082                         log (record: String): void;
1083                 }
1084
1085                 export function LDKLogger_new(impl: LDKLogger): number {
1086             throw new Error('unimplemented'); // TODO: bind to WASM
1087         }
1088
1089 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1090
1091
1092         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
1093         export function C2Tuple_BlockHashChannelManagerZ_get_a(tuple: number): Uint8Array {
1094                 if(!isWasmInitialized) {
1095                         throw new Error("initializeWasm() must be awaited first!");
1096                 }
1097                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_a(tuple);
1098                 return decodeArray(nativeResponseValue);
1099         }
1100         // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
1101         export function C2Tuple_BlockHashChannelManagerZ_get_b(tuple: number): number {
1102                 if(!isWasmInitialized) {
1103                         throw new Error("initializeWasm() must be awaited first!");
1104                 }
1105                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_b(tuple);
1106                 return nativeResponseValue;
1107         }
1108         public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
1109         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
1110         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
1111         public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
1112         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
1113         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
1114         public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
1115         public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
1116         public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
1117
1118
1119
1120 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1121
1122                 export interface LDKType {
1123                         type_id (): number;
1124                         debug_str (): String;
1125                         write (): Uint8Array;
1126                 }
1127
1128                 export function LDKType_new(impl: LDKType): number {
1129             throw new Error('unimplemented'); // TODO: bind to WASM
1130         }
1131
1132 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1133
1134
1135         // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
1136         export function Type_type_id(this_arg: number): number {
1137                 if(!isWasmInitialized) {
1138                         throw new Error("initializeWasm() must be awaited first!");
1139                 }
1140                 const nativeResponseValue = wasm.Type_type_id(this_arg);
1141                 return nativeResponseValue;
1142         }
1143         // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
1144         export function Type_debug_str(this_arg: number): String {
1145                 if(!isWasmInitialized) {
1146                         throw new Error("initializeWasm() must be awaited first!");
1147                 }
1148                 const nativeResponseValue = wasm.Type_debug_str(this_arg);
1149                 return nativeResponseValue;
1150         }
1151         // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
1152         export function Type_write(this_arg: number): Uint8Array {
1153                 if(!isWasmInitialized) {
1154                         throw new Error("initializeWasm() must be awaited first!");
1155                 }
1156                 const nativeResponseValue = wasm.Type_write(this_arg);
1157                 return decodeArray(nativeResponseValue);
1158         }
1159         public static class LDKCOption_TypeZ {
1160                 private LDKCOption_TypeZ() {}
1161                 export class Some extends LDKCOption_TypeZ {
1162                         public number some;
1163                         Some(number some) { this.some = some; }
1164                 }
1165                 export class None extends LDKCOption_TypeZ {
1166                         None() { }
1167                 }
1168                 static native void init();
1169         }
1170         static { LDKCOption_TypeZ.init(); }
1171         public static native LDKCOption_TypeZ LDKCOption_TypeZ_ref_from_ptr(long ptr);
1172         public static native boolean LDKCResult_COption_TypeZDecodeErrorZ_result_ok(long arg);
1173         public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_ok(long arg);
1174         public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_err(long arg);
1175         public static class LDKPaymentError {
1176                 private LDKPaymentError() {}
1177                 export class Invoice extends LDKPaymentError {
1178                         public String invoice;
1179                         Invoice(String invoice) { this.invoice = invoice; }
1180                 }
1181                 export class Routing extends LDKPaymentError {
1182                         public number routing;
1183                         Routing(number routing) { this.routing = routing; }
1184                 }
1185                 export class Sending extends LDKPaymentError {
1186                         public number sending;
1187                         Sending(number sending) { this.sending = sending; }
1188                 }
1189                 static native void init();
1190         }
1191         static { LDKPaymentError.init(); }
1192         public static native LDKPaymentError LDKPaymentError_ref_from_ptr(long ptr);
1193         public static native boolean LDKCResult_PaymentIdPaymentErrorZ_result_ok(long arg);
1194         public static native Uint8Array LDKCResult_PaymentIdPaymentErrorZ_get_ok(long arg);
1195         public static native number LDKCResult_PaymentIdPaymentErrorZ_get_err(long arg);
1196         public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
1197         public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
1198         public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
1199         public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
1200         public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
1201         public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
1202         public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
1203         public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
1204         public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
1205         // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1206         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple: number): number {
1207                 if(!isWasmInitialized) {
1208                         throw new Error("initializeWasm() must be awaited first!");
1209                 }
1210                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple);
1211                 return nativeResponseValue;
1212         }
1213         // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1214         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple: number): Uint8Array {
1215                 if(!isWasmInitialized) {
1216                         throw new Error("initializeWasm() must be awaited first!");
1217                 }
1218                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple);
1219                 return decodeArray(nativeResponseValue);
1220         }
1221         // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1222         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple: number): number {
1223                 if(!isWasmInitialized) {
1224                         throw new Error("initializeWasm() must be awaited first!");
1225                 }
1226                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple);
1227                 return nativeResponseValue;
1228         }
1229         public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
1230         public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
1231         public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
1232         public static native long LDKCVec_PrivateRouteZ_new(number[] elems);
1233         public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
1234         public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
1235         public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
1236         public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
1237         public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
1238         public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
1239         public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
1240         public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
1241         public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
1242         public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
1243         public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
1244         public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
1245         public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
1246         public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
1247         public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
1248         public static native boolean LDKCResult_PrivateRouteCreationErrorZ_result_ok(long arg);
1249         public static native number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
1250         public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
1251         public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
1252         public static native String LDKCResult_StringErrorZ_get_ok(long arg);
1253         public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
1254         public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
1255         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
1256         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
1257         public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
1258         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
1259         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
1260         public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
1261         public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
1262         public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
1263         // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
1264         export function C2Tuple_OutPointScriptZ_get_a(tuple: number): number {
1265                 if(!isWasmInitialized) {
1266                         throw new Error("initializeWasm() must be awaited first!");
1267                 }
1268                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_a(tuple);
1269                 return nativeResponseValue;
1270         }
1271         // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
1272         export function C2Tuple_OutPointScriptZ_get_b(tuple: number): Uint8Array {
1273                 if(!isWasmInitialized) {
1274                         throw new Error("initializeWasm() must be awaited first!");
1275                 }
1276                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_b(tuple);
1277                 return decodeArray(nativeResponseValue);
1278         }
1279         // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
1280         export function C2Tuple_u32ScriptZ_get_a(tuple: number): number {
1281                 if(!isWasmInitialized) {
1282                         throw new Error("initializeWasm() must be awaited first!");
1283                 }
1284                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_a(tuple);
1285                 return nativeResponseValue;
1286         }
1287         // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
1288         export function C2Tuple_u32ScriptZ_get_b(tuple: number): Uint8Array {
1289                 if(!isWasmInitialized) {
1290                         throw new Error("initializeWasm() must be awaited first!");
1291                 }
1292                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_b(tuple);
1293                 return decodeArray(nativeResponseValue);
1294         }
1295         public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
1296         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
1297         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple: number): Uint8Array {
1298                 if(!isWasmInitialized) {
1299                         throw new Error("initializeWasm() must be awaited first!");
1300                 }
1301                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple);
1302                 return decodeArray(nativeResponseValue);
1303         }
1304         // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
1305         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple: number): number[] {
1306                 if(!isWasmInitialized) {
1307                         throw new Error("initializeWasm() must be awaited first!");
1308                 }
1309                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple);
1310                 return nativeResponseValue;
1311         }
1312         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
1313         public static class LDKPaymentPurpose {
1314                 private LDKPaymentPurpose() {}
1315                 export class InvoicePayment extends LDKPaymentPurpose {
1316                         public Uint8Array payment_preimage;
1317                         public Uint8Array payment_secret;
1318                         public number user_payment_id;
1319                         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; }
1320                 }
1321                 export class SpontaneousPayment extends LDKPaymentPurpose {
1322                         public Uint8Array spontaneous_payment;
1323                         SpontaneousPayment(Uint8Array spontaneous_payment) { this.spontaneous_payment = spontaneous_payment; }
1324                 }
1325                 static native void init();
1326         }
1327         static { LDKPaymentPurpose.init(); }
1328         public static native LDKPaymentPurpose LDKPaymentPurpose_ref_from_ptr(long ptr);
1329         public static class LDKClosureReason {
1330                 private LDKClosureReason() {}
1331                 export class CounterpartyForceClosed extends LDKClosureReason {
1332                         public String peer_msg;
1333                         CounterpartyForceClosed(String peer_msg) { this.peer_msg = peer_msg; }
1334                 }
1335                 export class HolderForceClosed extends LDKClosureReason {
1336                         HolderForceClosed() { }
1337                 }
1338                 export class CooperativeClosure extends LDKClosureReason {
1339                         CooperativeClosure() { }
1340                 }
1341                 export class CommitmentTxConfirmed extends LDKClosureReason {
1342                         CommitmentTxConfirmed() { }
1343                 }
1344                 export class ProcessingError extends LDKClosureReason {
1345                         public String err;
1346                         ProcessingError(String err) { this.err = err; }
1347                 }
1348                 export class DisconnectedPeer extends LDKClosureReason {
1349                         DisconnectedPeer() { }
1350                 }
1351                 export class OutdatedChannelManager extends LDKClosureReason {
1352                         OutdatedChannelManager() { }
1353                 }
1354                 static native void init();
1355         }
1356         static { LDKClosureReason.init(); }
1357         public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
1358         public static class LDKEvent {
1359                 private LDKEvent() {}
1360                 export class FundingGenerationReady extends LDKEvent {
1361                         public Uint8Array temporary_channel_id;
1362                         public number channel_value_satoshis;
1363                         public Uint8Array output_script;
1364                         public number user_channel_id;
1365                         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; }
1366                 }
1367                 export class PaymentReceived extends LDKEvent {
1368                         public Uint8Array payment_hash;
1369                         public number amt;
1370                         public number purpose;
1371                         PaymentReceived(Uint8Array payment_hash, number amt, number purpose) { this.payment_hash = payment_hash; this.amt = amt; this.purpose = purpose; }
1372                 }
1373                 export class PaymentSent extends LDKEvent {
1374                         public Uint8Array payment_id;
1375                         public Uint8Array payment_preimage;
1376                         public Uint8Array payment_hash;
1377                         public number fee_paid_msat;
1378                         PaymentSent(Uint8Array payment_id, Uint8Array payment_preimage, Uint8Array payment_hash, number fee_paid_msat) { this.payment_id = payment_id; this.payment_preimage = payment_preimage; this.payment_hash = payment_hash; this.fee_paid_msat = fee_paid_msat; }
1379                 }
1380                 export class PaymentPathFailed extends LDKEvent {
1381                         public Uint8Array payment_id;
1382                         public Uint8Array payment_hash;
1383                         public boolean rejected_by_dest;
1384                         public number network_update;
1385                         public boolean all_paths_failed;
1386                         public number[] path;
1387                         public number short_channel_id;
1388                         public number retry;
1389                         PaymentPathFailed(Uint8Array payment_id, Uint8Array payment_hash, boolean rejected_by_dest, number network_update, boolean all_paths_failed, number[] path, number short_channel_id, number retry) { this.payment_id = payment_id; this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; this.network_update = network_update; this.all_paths_failed = all_paths_failed; this.path = path; this.short_channel_id = short_channel_id; this.retry = retry; }
1390                 }
1391                 export class PendingHTLCsForwardable extends LDKEvent {
1392                         public number time_forwardable;
1393                         PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
1394                 }
1395                 export class SpendableOutputs extends LDKEvent {
1396                         public number[] outputs;
1397                         SpendableOutputs(number[] outputs) { this.outputs = outputs; }
1398                 }
1399                 export class PaymentForwarded extends LDKEvent {
1400                         public number fee_earned_msat;
1401                         public boolean claim_from_onchain_tx;
1402                         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; }
1403                 }
1404                 export class ChannelClosed extends LDKEvent {
1405                         public Uint8Array channel_id;
1406                         public number user_channel_id;
1407                         public number reason;
1408                         ChannelClosed(Uint8Array channel_id, number user_channel_id, number reason) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; }
1409                 }
1410                 export class DiscardFunding extends LDKEvent {
1411                         public Uint8Array channel_id;
1412                         public Uint8Array transaction;
1413                         DiscardFunding(Uint8Array channel_id, Uint8Array transaction) { this.channel_id = channel_id; this.transaction = transaction; }
1414                 }
1415                 static native void init();
1416         }
1417         static { LDKEvent.init(); }
1418         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
1419         public static native long LDKCVec_EventZ_new(number[] elems);
1420         // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
1421         export function C2Tuple_u32TxOutZ_get_a(tuple: number): number {
1422                 if(!isWasmInitialized) {
1423                         throw new Error("initializeWasm() must be awaited first!");
1424                 }
1425                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_a(tuple);
1426                 return nativeResponseValue;
1427         }
1428         // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
1429         export function C2Tuple_u32TxOutZ_get_b(tuple: number): number {
1430                 if(!isWasmInitialized) {
1431                         throw new Error("initializeWasm() must be awaited first!");
1432                 }
1433                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_b(tuple);
1434                 return nativeResponseValue;
1435         }
1436         public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
1437         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
1438         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple: number): Uint8Array {
1439                 if(!isWasmInitialized) {
1440                         throw new Error("initializeWasm() must be awaited first!");
1441                 }
1442                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple);
1443                 return decodeArray(nativeResponseValue);
1444         }
1445         // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
1446         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple: number): number[] {
1447                 if(!isWasmInitialized) {
1448                         throw new Error("initializeWasm() must be awaited first!");
1449                 }
1450                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple);
1451                 return nativeResponseValue;
1452         }
1453         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
1454         public static class LDKBalance {
1455                 private LDKBalance() {}
1456                 export class ClaimableOnChannelClose extends LDKBalance {
1457                         public number claimable_amount_satoshis;
1458                         ClaimableOnChannelClose(number claimable_amount_satoshis) { this.claimable_amount_satoshis = claimable_amount_satoshis; }
1459                 }
1460                 export class ClaimableAwaitingConfirmations extends LDKBalance {
1461                         public number claimable_amount_satoshis;
1462                         public number confirmation_height;
1463                         ClaimableAwaitingConfirmations(number claimable_amount_satoshis, number confirmation_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.confirmation_height = confirmation_height; }
1464                 }
1465                 export class ContentiousClaimable extends LDKBalance {
1466                         public number claimable_amount_satoshis;
1467                         public number timeout_height;
1468                         ContentiousClaimable(number claimable_amount_satoshis, number timeout_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.timeout_height = timeout_height; }
1469                 }
1470                 export class MaybeClaimableHTLCAwaitingTimeout extends LDKBalance {
1471                         public number claimable_amount_satoshis;
1472                         public number claimable_height;
1473                         MaybeClaimableHTLCAwaitingTimeout(number claimable_amount_satoshis, number claimable_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.claimable_height = claimable_height; }
1474                 }
1475                 static native void init();
1476         }
1477         static { LDKBalance.init(); }
1478         public static native LDKBalance LDKBalance_ref_from_ptr(long ptr);
1479         public static native long LDKCVec_BalanceZ_new(number[] elems);
1480         public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
1481         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
1482         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
1483         public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
1484         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
1485         public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
1486         // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
1487         export function C2Tuple_PublicKeyTypeZ_get_a(tuple: number): Uint8Array {
1488                 if(!isWasmInitialized) {
1489                         throw new Error("initializeWasm() must be awaited first!");
1490                 }
1491                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_a(tuple);
1492                 return decodeArray(nativeResponseValue);
1493         }
1494         // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
1495         export function C2Tuple_PublicKeyTypeZ_get_b(tuple: number): number {
1496                 if(!isWasmInitialized) {
1497                         throw new Error("initializeWasm() must be awaited first!");
1498                 }
1499                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_b(tuple);
1500                 return nativeResponseValue;
1501         }
1502         public static native long LDKCVec_C2Tuple_PublicKeyTypeZZ_new(number[] elems);
1503         public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
1504         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
1505         public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
1506         // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1507         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple: number): number {
1508                 if(!isWasmInitialized) {
1509                         throw new Error("initializeWasm() must be awaited first!");
1510                 }
1511                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple);
1512                 return nativeResponseValue;
1513         }
1514         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1515         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple: number): number {
1516                 if(!isWasmInitialized) {
1517                         throw new Error("initializeWasm() must be awaited first!");
1518                 }
1519                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple);
1520                 return nativeResponseValue;
1521         }
1522         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1523         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple: number): number {
1524                 if(!isWasmInitialized) {
1525                         throw new Error("initializeWasm() must be awaited first!");
1526                 }
1527                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple);
1528                 return nativeResponseValue;
1529         }
1530         public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
1531         public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
1532         public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
1533         public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
1534         public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
1535         public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
1536         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
1537         public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
1538         public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
1539         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
1540         public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
1541         public static native boolean LDKCResult_NodeIdDecodeErrorZ_result_ok(long arg);
1542         public static native number LDKCResult_NodeIdDecodeErrorZ_get_ok(long arg);
1543         public static native number LDKCResult_NodeIdDecodeErrorZ_get_err(long arg);
1544
1545
1546
1547 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1548
1549                 export interface LDKAccess {
1550                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1551                 }
1552
1553                 export function LDKAccess_new(impl: LDKAccess): number {
1554             throw new Error('unimplemented'); // TODO: bind to WASM
1555         }
1556
1557 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1558
1559
1560         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1561         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1562                 if(!isWasmInitialized) {
1563                         throw new Error("initializeWasm() must be awaited first!");
1564                 }
1565                 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1566                 return nativeResponseValue;
1567         }
1568         public static class LDKCOption_AccessZ {
1569                 private LDKCOption_AccessZ() {}
1570                 export class Some extends LDKCOption_AccessZ {
1571                         public number some;
1572                         Some(number some) { this.some = some; }
1573                 }
1574                 export class None extends LDKCOption_AccessZ {
1575                         None() { }
1576                 }
1577                 static native void init();
1578         }
1579         static { LDKCOption_AccessZ.init(); }
1580         public static native LDKCOption_AccessZ LDKCOption_AccessZ_ref_from_ptr(long ptr);
1581         public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
1582         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
1583         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
1584         public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
1585         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
1586         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
1587         public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
1588         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
1589         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
1590         public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
1591         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
1592         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
1593         public static native long LDKCVec_u64Z_new(number[] elems);
1594         public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
1595         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
1596         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
1597         public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
1598         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
1599         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
1600         public static class LDKCOption_CVec_NetAddressZZ {
1601                 private LDKCOption_CVec_NetAddressZZ() {}
1602                 export class Some extends LDKCOption_CVec_NetAddressZZ {
1603                         public number[] some;
1604                         Some(number[] some) { this.some = some; }
1605                 }
1606                 export class None extends LDKCOption_CVec_NetAddressZZ {
1607                         None() { }
1608                 }
1609                 static native void init();
1610         }
1611         static { LDKCOption_CVec_NetAddressZZ.init(); }
1612         public static native LDKCOption_CVec_NetAddressZZ LDKCOption_CVec_NetAddressZZ_ref_from_ptr(long ptr);
1613         public static native boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
1614         public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
1615         public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
1616         public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
1617         public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
1618         public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
1619         public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
1620         public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
1621         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
1622         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
1623         public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
1624         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
1625         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
1626         public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
1627         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
1628         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
1629         public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
1630         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
1631         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
1632         public static native boolean LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_result_ok(long arg);
1633         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(long arg);
1634         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(long arg);
1635         public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
1636         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
1637         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
1638         public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
1639         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
1640         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
1641         public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
1642         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1643         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1644         public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
1645         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1646         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1647         public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
1648         public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1649         public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
1650         public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
1651         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1652         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1653         public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
1654         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1655         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1656         public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
1657         public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1658         public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1659         public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
1660         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1661         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1662         public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
1663         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1664         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1665         public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
1666         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1667         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1668         public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
1669         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1670         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1671         public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
1672         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1673         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1674         public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
1675         public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1676         public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
1677         public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
1678         public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1679         public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
1680         public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1681         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1682         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1683         public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1684         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1685         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1686         public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
1687         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1688         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1689         public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
1690         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1691         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1692         public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
1693         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1694         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1695         public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1696         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1697         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1698         public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1699         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1700         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1701         public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1702         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1703         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1704         public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1705         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1706         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1707         public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1708         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1709         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1710         public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1711         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1712         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1713         public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1714         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1715         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1716         public static class LDKSignOrCreationError {
1717                 private LDKSignOrCreationError() {}
1718                 export class SignError extends LDKSignOrCreationError {
1719                         SignError() { }
1720                 }
1721                 export class CreationError extends LDKSignOrCreationError {
1722                         public CreationError creation_error;
1723                         CreationError(CreationError creation_error) { this.creation_error = creation_error; }
1724                 }
1725                 static native void init();
1726         }
1727         static { LDKSignOrCreationError.init(); }
1728         public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1729         public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
1730         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
1731         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
1732
1733
1734
1735 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1736
1737                 export interface LDKFilter {
1738                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1739                         register_output (output: number): number;
1740                 }
1741
1742                 export function LDKFilter_new(impl: LDKFilter): number {
1743             throw new Error('unimplemented'); // TODO: bind to WASM
1744         }
1745
1746 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1747
1748
1749         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1750         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1751                 if(!isWasmInitialized) {
1752                         throw new Error("initializeWasm() must be awaited first!");
1753                 }
1754                 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1755                 // debug statements here
1756         }
1757         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1758         export function Filter_register_output(this_arg: number, output: number): number {
1759                 if(!isWasmInitialized) {
1760                         throw new Error("initializeWasm() must be awaited first!");
1761                 }
1762                 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1763                 return nativeResponseValue;
1764         }
1765         public static class LDKCOption_FilterZ {
1766                 private LDKCOption_FilterZ() {}
1767                 export class Some extends LDKCOption_FilterZ {
1768                         public number some;
1769                         Some(number some) { this.some = some; }
1770                 }
1771                 export class None extends LDKCOption_FilterZ {
1772                         None() { }
1773                 }
1774                 static native void init();
1775         }
1776         static { LDKCOption_FilterZ.init(); }
1777         public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
1778         public static native boolean LDKCResult_LockedChannelMonitorNoneZ_result_ok(long arg);
1779         public static native number LDKCResult_LockedChannelMonitorNoneZ_get_ok(long arg);
1780         public static native void LDKCResult_LockedChannelMonitorNoneZ_get_err(long arg);
1781         public static native long LDKCVec_OutPointZ_new(number[] elems);
1782
1783
1784
1785 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1786
1787                 export interface LDKMessageSendEventsProvider {
1788                         get_and_clear_pending_msg_events (): number[];
1789                 }
1790
1791                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1792             throw new Error('unimplemented'); // TODO: bind to WASM
1793         }
1794
1795 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1796
1797
1798         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1799         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1800                 if(!isWasmInitialized) {
1801                         throw new Error("initializeWasm() must be awaited first!");
1802                 }
1803                 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1804                 return nativeResponseValue;
1805         }
1806
1807
1808
1809 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1810
1811                 export interface LDKEventHandler {
1812                         handle_event (event: number): void;
1813                 }
1814
1815                 export function LDKEventHandler_new(impl: LDKEventHandler): number {
1816             throw new Error('unimplemented'); // TODO: bind to WASM
1817         }
1818
1819 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1820
1821
1822         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
1823         export function EventHandler_handle_event(this_arg: number, event: number): void {
1824                 if(!isWasmInitialized) {
1825                         throw new Error("initializeWasm() must be awaited first!");
1826                 }
1827                 const nativeResponseValue = wasm.EventHandler_handle_event(this_arg, event);
1828                 // debug statements here
1829         }
1830
1831
1832
1833 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1834
1835                 export interface LDKEventsProvider {
1836                         process_pending_events (handler: number): void;
1837                 }
1838
1839                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1840             throw new Error('unimplemented'); // TODO: bind to WASM
1841         }
1842
1843 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1844
1845
1846         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1847         export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
1848                 if(!isWasmInitialized) {
1849                         throw new Error("initializeWasm() must be awaited first!");
1850                 }
1851                 const nativeResponseValue = wasm.EventsProvider_process_pending_events(this_arg, handler);
1852                 // debug statements here
1853         }
1854
1855
1856
1857 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1858
1859                 export interface LDKListen {
1860                         block_connected (block: Uint8Array, height: number): void;
1861                         block_disconnected (header: Uint8Array, height: number): void;
1862                 }
1863
1864                 export function LDKListen_new(impl: LDKListen): number {
1865             throw new Error('unimplemented'); // TODO: bind to WASM
1866         }
1867
1868 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1869
1870
1871         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1872         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1873                 if(!isWasmInitialized) {
1874                         throw new Error("initializeWasm() must be awaited first!");
1875                 }
1876                 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1877                 // debug statements here
1878         }
1879         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1880         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1881                 if(!isWasmInitialized) {
1882                         throw new Error("initializeWasm() must be awaited first!");
1883                 }
1884                 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1885                 // debug statements here
1886         }
1887
1888
1889
1890 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1891
1892                 export interface LDKConfirm {
1893                         transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
1894                         transaction_unconfirmed (txid: Uint8Array): void;
1895                         best_block_updated (header: Uint8Array, height: number): void;
1896                         get_relevant_txids (): Uint8Array[];
1897                 }
1898
1899                 export function LDKConfirm_new(impl: LDKConfirm): number {
1900             throw new Error('unimplemented'); // TODO: bind to WASM
1901         }
1902
1903 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1904
1905
1906         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1907         export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
1908                 if(!isWasmInitialized) {
1909                         throw new Error("initializeWasm() must be awaited first!");
1910                 }
1911                 const nativeResponseValue = wasm.Confirm_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
1912                 // debug statements here
1913         }
1914         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1915         export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
1916                 if(!isWasmInitialized) {
1917                         throw new Error("initializeWasm() must be awaited first!");
1918                 }
1919                 const nativeResponseValue = wasm.Confirm_transaction_unconfirmed(this_arg, encodeArray(txid));
1920                 // debug statements here
1921         }
1922         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1923         export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
1924                 if(!isWasmInitialized) {
1925                         throw new Error("initializeWasm() must be awaited first!");
1926                 }
1927                 const nativeResponseValue = wasm.Confirm_best_block_updated(this_arg, encodeArray(header), height);
1928                 // debug statements here
1929         }
1930         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1931         export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
1932                 if(!isWasmInitialized) {
1933                         throw new Error("initializeWasm() must be awaited first!");
1934                 }
1935                 const nativeResponseValue = wasm.Confirm_get_relevant_txids(this_arg);
1936                 return nativeResponseValue;
1937         }
1938
1939
1940
1941 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1942
1943                 export interface LDKPersist {
1944                         persist_new_channel (channel_id: number, data: number, update_id: number): number;
1945                         update_persisted_channel (channel_id: number, update: number, data: number, update_id: number): number;
1946                 }
1947
1948                 export function LDKPersist_new(impl: LDKPersist): number {
1949             throw new Error('unimplemented'); // TODO: bind to WASM
1950         }
1951
1952 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1953
1954
1955         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
1956         export function Persist_persist_new_channel(this_arg: number, channel_id: number, data: number, update_id: number): number {
1957                 if(!isWasmInitialized) {
1958                         throw new Error("initializeWasm() must be awaited first!");
1959                 }
1960                 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, channel_id, data, update_id);
1961                 return nativeResponseValue;
1962         }
1963         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
1964         export function Persist_update_persisted_channel(this_arg: number, channel_id: number, update: number, data: number, update_id: number): number {
1965                 if(!isWasmInitialized) {
1966                         throw new Error("initializeWasm() must be awaited first!");
1967                 }
1968                 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, channel_id, update, data, update_id);
1969                 return nativeResponseValue;
1970         }
1971
1972
1973
1974 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1975
1976                 export interface LDKChannelMessageHandler {
1977                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1978                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1979                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1980                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1981                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1982                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1983                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1984                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1985                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1986                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1987                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1988                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1989                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1990                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1991                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1992                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1993                         peer_connected (their_node_id: Uint8Array, msg: number): void;
1994                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1995                         handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1996                         handle_error (their_node_id: Uint8Array, msg: number): void;
1997                 }
1998
1999                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
2000             throw new Error('unimplemented'); // TODO: bind to WASM
2001         }
2002
2003 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2004
2005
2006         // 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
2007         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
2008                 if(!isWasmInitialized) {
2009                         throw new Error("initializeWasm() must be awaited first!");
2010                 }
2011                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
2012                 // debug statements here
2013         }
2014         // 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
2015         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
2016                 if(!isWasmInitialized) {
2017                         throw new Error("initializeWasm() must be awaited first!");
2018                 }
2019                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
2020                 // debug statements here
2021         }
2022         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
2023         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2024                 if(!isWasmInitialized) {
2025                         throw new Error("initializeWasm() must be awaited first!");
2026                 }
2027                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
2028                 // debug statements here
2029         }
2030         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
2031         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2032                 if(!isWasmInitialized) {
2033                         throw new Error("initializeWasm() must be awaited first!");
2034                 }
2035                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
2036                 // debug statements here
2037         }
2038         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
2039         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2040                 if(!isWasmInitialized) {
2041                         throw new Error("initializeWasm() must be awaited first!");
2042                 }
2043                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
2044                 // debug statements here
2045         }
2046         // 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
2047         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
2048                 if(!isWasmInitialized) {
2049                         throw new Error("initializeWasm() must be awaited first!");
2050                 }
2051                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
2052                 // debug statements here
2053         }
2054         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
2055         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2056                 if(!isWasmInitialized) {
2057                         throw new Error("initializeWasm() must be awaited first!");
2058                 }
2059                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
2060                 // debug statements here
2061         }
2062         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
2063         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2064                 if(!isWasmInitialized) {
2065                         throw new Error("initializeWasm() must be awaited first!");
2066                 }
2067                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
2068                 // debug statements here
2069         }
2070         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
2071         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2072                 if(!isWasmInitialized) {
2073                         throw new Error("initializeWasm() must be awaited first!");
2074                 }
2075                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
2076                 // debug statements here
2077         }
2078         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
2079         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2080                 if(!isWasmInitialized) {
2081                         throw new Error("initializeWasm() must be awaited first!");
2082                 }
2083                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
2084                 // debug statements here
2085         }
2086         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
2087         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2088                 if(!isWasmInitialized) {
2089                         throw new Error("initializeWasm() must be awaited first!");
2090                 }
2091                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
2092                 // debug statements here
2093         }
2094         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
2095         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2096                 if(!isWasmInitialized) {
2097                         throw new Error("initializeWasm() must be awaited first!");
2098                 }
2099                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
2100                 // debug statements here
2101         }
2102         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
2103         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2104                 if(!isWasmInitialized) {
2105                         throw new Error("initializeWasm() must be awaited first!");
2106                 }
2107                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
2108                 // debug statements here
2109         }
2110         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
2111         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2112                 if(!isWasmInitialized) {
2113                         throw new Error("initializeWasm() must be awaited first!");
2114                 }
2115                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
2116                 // debug statements here
2117         }
2118         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
2119         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2120                 if(!isWasmInitialized) {
2121                         throw new Error("initializeWasm() must be awaited first!");
2122                 }
2123                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
2124                 // debug statements here
2125         }
2126         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
2127         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
2128                 if(!isWasmInitialized) {
2129                         throw new Error("initializeWasm() must be awaited first!");
2130                 }
2131                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
2132                 // debug statements here
2133         }
2134         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
2135         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2136                 if(!isWasmInitialized) {
2137                         throw new Error("initializeWasm() must be awaited first!");
2138                 }
2139                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
2140                 // debug statements here
2141         }
2142         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
2143         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2144                 if(!isWasmInitialized) {
2145                         throw new Error("initializeWasm() must be awaited first!");
2146                 }
2147                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
2148                 // debug statements here
2149         }
2150         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
2151         export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2152                 if(!isWasmInitialized) {
2153                         throw new Error("initializeWasm() must be awaited first!");
2154                 }
2155                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
2156                 // debug statements here
2157         }
2158         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
2159         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2160                 if(!isWasmInitialized) {
2161                         throw new Error("initializeWasm() must be awaited first!");
2162                 }
2163                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
2164                 // debug statements here
2165         }
2166
2167
2168
2169 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2170
2171                 export interface LDKRoutingMessageHandler {
2172                         handle_node_announcement (msg: number): number;
2173                         handle_channel_announcement (msg: number): number;
2174                         handle_channel_update (msg: number): number;
2175                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
2176                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
2177                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
2178                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
2179                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
2180                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
2181                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
2182                 }
2183
2184                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
2185             throw new Error('unimplemented'); // TODO: bind to WASM
2186         }
2187
2188 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2189
2190
2191         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
2192         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
2193                 if(!isWasmInitialized) {
2194                         throw new Error("initializeWasm() must be awaited first!");
2195                 }
2196                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
2197                 return nativeResponseValue;
2198         }
2199         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
2200         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
2201                 if(!isWasmInitialized) {
2202                         throw new Error("initializeWasm() must be awaited first!");
2203                 }
2204                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
2205                 return nativeResponseValue;
2206         }
2207         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
2208         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
2209                 if(!isWasmInitialized) {
2210                         throw new Error("initializeWasm() must be awaited first!");
2211                 }
2212                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
2213                 return nativeResponseValue;
2214         }
2215         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
2216         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
2217                 if(!isWasmInitialized) {
2218                         throw new Error("initializeWasm() must be awaited first!");
2219                 }
2220                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
2221                 return nativeResponseValue;
2222         }
2223         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
2224         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
2225                 if(!isWasmInitialized) {
2226                         throw new Error("initializeWasm() must be awaited first!");
2227                 }
2228                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
2229                 return nativeResponseValue;
2230         }
2231         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
2232         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
2233                 if(!isWasmInitialized) {
2234                         throw new Error("initializeWasm() must be awaited first!");
2235                 }
2236                 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
2237                 // debug statements here
2238         }
2239         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
2240         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2241                 if(!isWasmInitialized) {
2242                         throw new Error("initializeWasm() must be awaited first!");
2243                 }
2244                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
2245                 return nativeResponseValue;
2246         }
2247         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
2248         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2249                 if(!isWasmInitialized) {
2250                         throw new Error("initializeWasm() must be awaited first!");
2251                 }
2252                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
2253                 return nativeResponseValue;
2254         }
2255         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
2256         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2257                 if(!isWasmInitialized) {
2258                         throw new Error("initializeWasm() must be awaited first!");
2259                 }
2260                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
2261                 return nativeResponseValue;
2262         }
2263         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
2264         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2265                 if(!isWasmInitialized) {
2266                         throw new Error("initializeWasm() must be awaited first!");
2267                 }
2268                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
2269                 return nativeResponseValue;
2270         }
2271
2272
2273
2274 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2275
2276                 export interface LDKCustomMessageReader {
2277                         read (message_type: number, buffer: Uint8Array): number;
2278                 }
2279
2280                 export function LDKCustomMessageReader_new(impl: LDKCustomMessageReader): number {
2281             throw new Error('unimplemented'); // TODO: bind to WASM
2282         }
2283
2284 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2285
2286
2287         // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
2288         export function CustomMessageReader_read(this_arg: number, message_type: number, buffer: Uint8Array): number {
2289                 if(!isWasmInitialized) {
2290                         throw new Error("initializeWasm() must be awaited first!");
2291                 }
2292                 const nativeResponseValue = wasm.CustomMessageReader_read(this_arg, message_type, encodeArray(buffer));
2293                 return nativeResponseValue;
2294         }
2295
2296
2297
2298 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2299
2300                 export interface LDKCustomMessageHandler {
2301                         handle_custom_message (msg: number, sender_node_id: Uint8Array): number;
2302                         get_and_clear_pending_msg (): number[];
2303                 }
2304
2305                 export function LDKCustomMessageHandler_new(impl: LDKCustomMessageHandler, CustomMessageReader: LDKCustomMessageReader): number {
2306             throw new Error('unimplemented'); // TODO: bind to WASM
2307         }
2308
2309 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2310
2311
2312         // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
2313         export function CustomMessageHandler_handle_custom_message(this_arg: number, msg: number, sender_node_id: Uint8Array): number {
2314                 if(!isWasmInitialized) {
2315                         throw new Error("initializeWasm() must be awaited first!");
2316                 }
2317                 const nativeResponseValue = wasm.CustomMessageHandler_handle_custom_message(this_arg, msg, encodeArray(sender_node_id));
2318                 return nativeResponseValue;
2319         }
2320         // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
2321         export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: number): number[] {
2322                 if(!isWasmInitialized) {
2323                         throw new Error("initializeWasm() must be awaited first!");
2324                 }
2325                 const nativeResponseValue = wasm.CustomMessageHandler_get_and_clear_pending_msg(this_arg);
2326                 return nativeResponseValue;
2327         }
2328
2329
2330
2331 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2332
2333                 export interface LDKSocketDescriptor {
2334                         send_data (data: Uint8Array, resume_read: boolean): number;
2335                         disconnect_socket (): void;
2336                         eq (other_arg: number): boolean;
2337                         hash (): number;
2338                 }
2339
2340                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
2341             throw new Error('unimplemented'); // TODO: bind to WASM
2342         }
2343
2344 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2345
2346
2347         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
2348         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
2349                 if(!isWasmInitialized) {
2350                         throw new Error("initializeWasm() must be awaited first!");
2351                 }
2352                 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
2353                 return nativeResponseValue;
2354         }
2355         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
2356         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
2357                 if(!isWasmInitialized) {
2358                         throw new Error("initializeWasm() must be awaited first!");
2359                 }
2360                 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
2361                 // debug statements here
2362         }
2363         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
2364         export function SocketDescriptor_hash(this_arg: number): number {
2365                 if(!isWasmInitialized) {
2366                         throw new Error("initializeWasm() must be awaited first!");
2367                 }
2368                 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
2369                 return nativeResponseValue;
2370         }
2371
2372
2373
2374 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2375
2376                 export interface LDKScore {
2377                         channel_penalty_msat (short_channel_id: number, source: number, target: number): number;
2378                         payment_path_failed (path: number[], short_channel_id: number): void;
2379                         write (): Uint8Array;
2380                 }
2381
2382                 export function LDKScore_new(impl: LDKScore): number {
2383             throw new Error('unimplemented'); // TODO: bind to WASM
2384         }
2385
2386 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2387
2388
2389         // uint64_t Score_channel_penalty_msat LDKScore *NONNULL_PTR this_arg, uint64_t short_channel_id, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target
2390         export function Score_channel_penalty_msat(this_arg: number, short_channel_id: number, source: number, target: number): number {
2391                 if(!isWasmInitialized) {
2392                         throw new Error("initializeWasm() must be awaited first!");
2393                 }
2394                 const nativeResponseValue = wasm.Score_channel_penalty_msat(this_arg, short_channel_id, source, target);
2395                 return nativeResponseValue;
2396         }
2397         // void Score_payment_path_failed LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id
2398         export function Score_payment_path_failed(this_arg: number, path: number[], short_channel_id: number): void {
2399                 if(!isWasmInitialized) {
2400                         throw new Error("initializeWasm() must be awaited first!");
2401                 }
2402                 const nativeResponseValue = wasm.Score_payment_path_failed(this_arg, path, short_channel_id);
2403                 // debug statements here
2404         }
2405         // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
2406         export function Score_write(this_arg: number): Uint8Array {
2407                 if(!isWasmInitialized) {
2408                         throw new Error("initializeWasm() must be awaited first!");
2409                 }
2410                 const nativeResponseValue = wasm.Score_write(this_arg);
2411                 return decodeArray(nativeResponseValue);
2412         }
2413
2414
2415
2416 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2417
2418                 export interface LDKChannelManagerPersister {
2419                         persist_manager (channel_manager: number): number;
2420                 }
2421
2422                 export function LDKChannelManagerPersister_new(impl: LDKChannelManagerPersister): number {
2423             throw new Error('unimplemented'); // TODO: bind to WASM
2424         }
2425
2426 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2427
2428
2429         // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
2430         export function ChannelManagerPersister_persist_manager(this_arg: number, channel_manager: number): number {
2431                 if(!isWasmInitialized) {
2432                         throw new Error("initializeWasm() must be awaited first!");
2433                 }
2434                 const nativeResponseValue = wasm.ChannelManagerPersister_persist_manager(this_arg, channel_manager);
2435                 return nativeResponseValue;
2436         }
2437         public static class LDKFallback {
2438                 private LDKFallback() {}
2439                 export class SegWitProgram extends LDKFallback {
2440                         public number version;
2441                         public Uint8Array program;
2442                         SegWitProgram(number version, Uint8Array program) { this.version = version; this.program = program; }
2443                 }
2444                 export class PubKeyHash extends LDKFallback {
2445                         public Uint8Array pub_key_hash;
2446                         PubKeyHash(Uint8Array pub_key_hash) { this.pub_key_hash = pub_key_hash; }
2447                 }
2448                 export class ScriptHash extends LDKFallback {
2449                         public Uint8Array script_hash;
2450                         ScriptHash(Uint8Array script_hash) { this.script_hash = script_hash; }
2451                 }
2452                 static native void init();
2453         }
2454         static { LDKFallback.init(); }
2455         public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
2456
2457
2458
2459 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2460
2461                 export interface LDKPayer {
2462                         node_id (): Uint8Array;
2463                         first_hops (): number[];
2464                         send_payment (route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number;
2465                         retry_payment (route: number, payment_id: Uint8Array): number;
2466                 }
2467
2468                 export function LDKPayer_new(impl: LDKPayer): number {
2469             throw new Error('unimplemented'); // TODO: bind to WASM
2470         }
2471
2472 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2473
2474
2475         // LDKPublicKey Payer_node_id LDKPayer *NONNULL_PTR this_arg
2476         export function Payer_node_id(this_arg: number): Uint8Array {
2477                 if(!isWasmInitialized) {
2478                         throw new Error("initializeWasm() must be awaited first!");
2479                 }
2480                 const nativeResponseValue = wasm.Payer_node_id(this_arg);
2481                 return decodeArray(nativeResponseValue);
2482         }
2483         // LDKCVec_ChannelDetailsZ Payer_first_hops LDKPayer *NONNULL_PTR this_arg
2484         export function Payer_first_hops(this_arg: number): number[] {
2485                 if(!isWasmInitialized) {
2486                         throw new Error("initializeWasm() must be awaited first!");
2487                 }
2488                 const nativeResponseValue = wasm.Payer_first_hops(this_arg);
2489                 return nativeResponseValue;
2490         }
2491         // LDKCResult_PaymentIdPaymentSendFailureZ Payer_send_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret
2492         export function Payer_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
2493                 if(!isWasmInitialized) {
2494                         throw new Error("initializeWasm() must be awaited first!");
2495                 }
2496                 const nativeResponseValue = wasm.Payer_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
2497                 return nativeResponseValue;
2498         }
2499         // LDKCResult_NonePaymentSendFailureZ Payer_retry_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_id
2500         export function Payer_retry_payment(this_arg: number, route: number, payment_id: Uint8Array): number {
2501                 if(!isWasmInitialized) {
2502                         throw new Error("initializeWasm() must be awaited first!");
2503                 }
2504                 const nativeResponseValue = wasm.Payer_retry_payment(this_arg, route, encodeArray(payment_id));
2505                 return nativeResponseValue;
2506         }
2507
2508
2509
2510 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2511
2512                 export interface LDKRouter {
2513                         find_route (payer: Uint8Array, params: number, first_hops: number[], scorer: number): number;
2514                 }
2515
2516                 export function LDKRouter_new(impl: LDKRouter): number {
2517             throw new Error('unimplemented'); // TODO: bind to WASM
2518         }
2519
2520 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2521
2522
2523         // LDKCResult_RouteLightningErrorZ Router_find_route LDKRouter *NONNULL_PTR this_arg, struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR params, struct LDKCVec_ChannelDetailsZ *first_hops, const struct LDKScore *NONNULL_PTR scorer
2524         export function Router_find_route(this_arg: number, payer: Uint8Array, params: number, first_hops: number[], scorer: number): number {
2525                 if(!isWasmInitialized) {
2526                         throw new Error("initializeWasm() must be awaited first!");
2527                 }
2528                 const nativeResponseValue = wasm.Router_find_route(this_arg, encodeArray(payer), params, first_hops, scorer);
2529                 return nativeResponseValue;
2530         }
2531         // struct LDKStr _ldk_get_compiled_version(void);
2532         export function _ldk_get_compiled_version(): String {
2533                 if(!isWasmInitialized) {
2534                         throw new Error("initializeWasm() must be awaited first!");
2535                 }
2536                 const nativeResponseValue = wasm._ldk_get_compiled_version();
2537                 return nativeResponseValue;
2538         }
2539         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
2540         export function _ldk_c_bindings_get_compiled_version(): String {
2541                 if(!isWasmInitialized) {
2542                         throw new Error("initializeWasm() must be awaited first!");
2543                 }
2544                 const nativeResponseValue = wasm._ldk_c_bindings_get_compiled_version();
2545                 return nativeResponseValue;
2546         }
2547         // void Transaction_free(struct LDKTransaction _res);
2548         export function Transaction_free(_res: Uint8Array): void {
2549                 if(!isWasmInitialized) {
2550                         throw new Error("initializeWasm() must be awaited first!");
2551                 }
2552                 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
2553                 // debug statements here
2554         }
2555         // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
2556         export function TxOut_new(script_pubkey: Uint8Array, value: number): number {
2557                 if(!isWasmInitialized) {
2558                         throw new Error("initializeWasm() must be awaited first!");
2559                 }
2560                 const nativeResponseValue = wasm.TxOut_new(encodeArray(script_pubkey), value);
2561                 return nativeResponseValue;
2562         }
2563         // void TxOut_free(struct LDKTxOut _res);
2564         export function TxOut_free(_res: number): void {
2565                 if(!isWasmInitialized) {
2566                         throw new Error("initializeWasm() must be awaited first!");
2567                 }
2568                 const nativeResponseValue = wasm.TxOut_free(_res);
2569                 // debug statements here
2570         }
2571         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
2572         export function TxOut_clone(orig: number): number {
2573                 if(!isWasmInitialized) {
2574                         throw new Error("initializeWasm() must be awaited first!");
2575                 }
2576                 const nativeResponseValue = wasm.TxOut_clone(orig);
2577                 return nativeResponseValue;
2578         }
2579         // void Str_free(struct LDKStr _res);
2580         export function Str_free(_res: String): void {
2581                 if(!isWasmInitialized) {
2582                         throw new Error("initializeWasm() must be awaited first!");
2583                 }
2584                 const nativeResponseValue = wasm.Str_free(_res);
2585                 // debug statements here
2586         }
2587         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
2588         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
2589                 if(!isWasmInitialized) {
2590                         throw new Error("initializeWasm() must be awaited first!");
2591                 }
2592                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
2593                 return nativeResponseValue;
2594         }
2595         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
2596         export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
2597                 if(!isWasmInitialized) {
2598                         throw new Error("initializeWasm() must be awaited first!");
2599                 }
2600                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
2601                 return nativeResponseValue;
2602         }
2603         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
2604         export function CResult_SecretKeyErrorZ_free(_res: number): void {
2605                 if(!isWasmInitialized) {
2606                         throw new Error("initializeWasm() must be awaited first!");
2607                 }
2608                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
2609                 // debug statements here
2610         }
2611         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
2612         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
2613                 if(!isWasmInitialized) {
2614                         throw new Error("initializeWasm() must be awaited first!");
2615                 }
2616                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
2617                 return nativeResponseValue;
2618         }
2619         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
2620         export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
2621                 if(!isWasmInitialized) {
2622                         throw new Error("initializeWasm() must be awaited first!");
2623                 }
2624                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
2625                 return nativeResponseValue;
2626         }
2627         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
2628         export function CResult_PublicKeyErrorZ_free(_res: number): void {
2629                 if(!isWasmInitialized) {
2630                         throw new Error("initializeWasm() must be awaited first!");
2631                 }
2632                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
2633                 // debug statements here
2634         }
2635         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
2636         export function CResult_PublicKeyErrorZ_clone(orig: number): number {
2637                 if(!isWasmInitialized) {
2638                         throw new Error("initializeWasm() must be awaited first!");
2639                 }
2640                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
2641                 return nativeResponseValue;
2642         }
2643         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
2644         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
2645                 if(!isWasmInitialized) {
2646                         throw new Error("initializeWasm() must be awaited first!");
2647                 }
2648                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
2649                 return nativeResponseValue;
2650         }
2651         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
2652         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
2653                 if(!isWasmInitialized) {
2654                         throw new Error("initializeWasm() must be awaited first!");
2655                 }
2656                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
2657                 return nativeResponseValue;
2658         }
2659         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
2660         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
2661                 if(!isWasmInitialized) {
2662                         throw new Error("initializeWasm() must be awaited first!");
2663                 }
2664                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
2665                 // debug statements here
2666         }
2667         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
2668         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
2669                 if(!isWasmInitialized) {
2670                         throw new Error("initializeWasm() must be awaited first!");
2671                 }
2672                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
2673                 return nativeResponseValue;
2674         }
2675         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
2676         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
2677                 if(!isWasmInitialized) {
2678                         throw new Error("initializeWasm() must be awaited first!");
2679                 }
2680                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
2681                 return nativeResponseValue;
2682         }
2683         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
2684         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
2685                 if(!isWasmInitialized) {
2686                         throw new Error("initializeWasm() must be awaited first!");
2687                 }
2688                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
2689                 return nativeResponseValue;
2690         }
2691         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
2692         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
2693                 if(!isWasmInitialized) {
2694                         throw new Error("initializeWasm() must be awaited first!");
2695                 }
2696                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
2697                 // debug statements here
2698         }
2699         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
2700         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
2701                 if(!isWasmInitialized) {
2702                         throw new Error("initializeWasm() must be awaited first!");
2703                 }
2704                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
2705                 return nativeResponseValue;
2706         }
2707         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
2708         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
2709                 if(!isWasmInitialized) {
2710                         throw new Error("initializeWasm() must be awaited first!");
2711                 }
2712                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
2713                 return nativeResponseValue;
2714         }
2715         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
2716         export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
2717                 if(!isWasmInitialized) {
2718                         throw new Error("initializeWasm() must be awaited first!");
2719                 }
2720                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
2721                 return nativeResponseValue;
2722         }
2723         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
2724         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
2725                 if(!isWasmInitialized) {
2726                         throw new Error("initializeWasm() must be awaited first!");
2727                 }
2728                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
2729                 // debug statements here
2730         }
2731         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
2732         export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
2733                 if(!isWasmInitialized) {
2734                         throw new Error("initializeWasm() must be awaited first!");
2735                 }
2736                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
2737                 return nativeResponseValue;
2738         }
2739         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
2740         export function COption_u32Z_some(o: number): number {
2741                 if(!isWasmInitialized) {
2742                         throw new Error("initializeWasm() must be awaited first!");
2743                 }
2744                 const nativeResponseValue = wasm.COption_u32Z_some(o);
2745                 return nativeResponseValue;
2746         }
2747         // struct LDKCOption_u32Z COption_u32Z_none(void);
2748         export function COption_u32Z_none(): number {
2749                 if(!isWasmInitialized) {
2750                         throw new Error("initializeWasm() must be awaited first!");
2751                 }
2752                 const nativeResponseValue = wasm.COption_u32Z_none();
2753                 return nativeResponseValue;
2754         }
2755         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
2756         export function COption_u32Z_free(_res: number): void {
2757                 if(!isWasmInitialized) {
2758                         throw new Error("initializeWasm() must be awaited first!");
2759                 }
2760                 const nativeResponseValue = wasm.COption_u32Z_free(_res);
2761                 // debug statements here
2762         }
2763         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
2764         export function COption_u32Z_clone(orig: number): number {
2765                 if(!isWasmInitialized) {
2766                         throw new Error("initializeWasm() must be awaited first!");
2767                 }
2768                 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
2769                 return nativeResponseValue;
2770         }
2771         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
2772         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
2773                 if(!isWasmInitialized) {
2774                         throw new Error("initializeWasm() must be awaited first!");
2775                 }
2776                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
2777                 return nativeResponseValue;
2778         }
2779         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
2780         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
2781                 if(!isWasmInitialized) {
2782                         throw new Error("initializeWasm() must be awaited first!");
2783                 }
2784                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
2785                 return nativeResponseValue;
2786         }
2787         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
2788         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
2789                 if(!isWasmInitialized) {
2790                         throw new Error("initializeWasm() must be awaited first!");
2791                 }
2792                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
2793                 // debug statements here
2794         }
2795         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
2796         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
2797                 if(!isWasmInitialized) {
2798                         throw new Error("initializeWasm() must be awaited first!");
2799                 }
2800                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
2801                 return nativeResponseValue;
2802         }
2803         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
2804         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2805                 if(!isWasmInitialized) {
2806                         throw new Error("initializeWasm() must be awaited first!");
2807                 }
2808                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
2809                 return nativeResponseValue;
2810         }
2811         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2812         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2813                 if(!isWasmInitialized) {
2814                         throw new Error("initializeWasm() must be awaited first!");
2815                 }
2816                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
2817                 return nativeResponseValue;
2818         }
2819         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
2820         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2821                 if(!isWasmInitialized) {
2822                         throw new Error("initializeWasm() must be awaited first!");
2823                 }
2824                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
2825                 // debug statements here
2826         }
2827         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2828         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2829                 if(!isWasmInitialized) {
2830                         throw new Error("initializeWasm() must be awaited first!");
2831                 }
2832                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
2833                 return nativeResponseValue;
2834         }
2835         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
2836         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2837                 if(!isWasmInitialized) {
2838                         throw new Error("initializeWasm() must be awaited first!");
2839                 }
2840                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
2841                 return nativeResponseValue;
2842         }
2843         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2844         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2845                 if(!isWasmInitialized) {
2846                         throw new Error("initializeWasm() must be awaited first!");
2847                 }
2848                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
2849                 return nativeResponseValue;
2850         }
2851         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
2852         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2853                 if(!isWasmInitialized) {
2854                         throw new Error("initializeWasm() must be awaited first!");
2855                 }
2856                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
2857                 // debug statements here
2858         }
2859         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2860         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2861                 if(!isWasmInitialized) {
2862                         throw new Error("initializeWasm() must be awaited first!");
2863                 }
2864                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
2865                 return nativeResponseValue;
2866         }
2867         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
2868         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
2869                 if(!isWasmInitialized) {
2870                         throw new Error("initializeWasm() must be awaited first!");
2871                 }
2872                 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
2873                 // debug statements here
2874         }
2875         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
2876         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2877                 if(!isWasmInitialized) {
2878                         throw new Error("initializeWasm() must be awaited first!");
2879                 }
2880                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
2881                 return nativeResponseValue;
2882         }
2883         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2884         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
2885                 if(!isWasmInitialized) {
2886                         throw new Error("initializeWasm() must be awaited first!");
2887                 }
2888                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
2889                 return nativeResponseValue;
2890         }
2891         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
2892         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2893                 if(!isWasmInitialized) {
2894                         throw new Error("initializeWasm() must be awaited first!");
2895                 }
2896                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
2897                 // debug statements here
2898         }
2899         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2900         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2901                 if(!isWasmInitialized) {
2902                         throw new Error("initializeWasm() must be awaited first!");
2903                 }
2904                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
2905                 return nativeResponseValue;
2906         }
2907         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
2908         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2909                 if(!isWasmInitialized) {
2910                         throw new Error("initializeWasm() must be awaited first!");
2911                 }
2912                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
2913                 return nativeResponseValue;
2914         }
2915         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2916         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
2917                 if(!isWasmInitialized) {
2918                         throw new Error("initializeWasm() must be awaited first!");
2919                 }
2920                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
2921                 return nativeResponseValue;
2922         }
2923         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
2924         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2925                 if(!isWasmInitialized) {
2926                         throw new Error("initializeWasm() must be awaited first!");
2927                 }
2928                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
2929                 // debug statements here
2930         }
2931         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2932         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2933                 if(!isWasmInitialized) {
2934                         throw new Error("initializeWasm() must be awaited first!");
2935                 }
2936                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
2937                 return nativeResponseValue;
2938         }
2939         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
2940         export function CResult_TrustedClosingTransactionNoneZ_ok(o: number): number {
2941                 if(!isWasmInitialized) {
2942                         throw new Error("initializeWasm() must be awaited first!");
2943                 }
2944                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_ok(o);
2945                 return nativeResponseValue;
2946         }
2947         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
2948         export function CResult_TrustedClosingTransactionNoneZ_err(): number {
2949                 if(!isWasmInitialized) {
2950                         throw new Error("initializeWasm() must be awaited first!");
2951                 }
2952                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_err();
2953                 return nativeResponseValue;
2954         }
2955         // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
2956         export function CResult_TrustedClosingTransactionNoneZ_free(_res: number): void {
2957                 if(!isWasmInitialized) {
2958                         throw new Error("initializeWasm() must be awaited first!");
2959                 }
2960                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_free(_res);
2961                 // debug statements here
2962         }
2963         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
2964         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
2965                 if(!isWasmInitialized) {
2966                         throw new Error("initializeWasm() must be awaited first!");
2967                 }
2968                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
2969                 return nativeResponseValue;
2970         }
2971         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2972         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
2973                 if(!isWasmInitialized) {
2974                         throw new Error("initializeWasm() must be awaited first!");
2975                 }
2976                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
2977                 return nativeResponseValue;
2978         }
2979         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
2980         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
2981                 if(!isWasmInitialized) {
2982                         throw new Error("initializeWasm() must be awaited first!");
2983                 }
2984                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
2985                 // debug statements here
2986         }
2987         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2988         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2989                 if(!isWasmInitialized) {
2990                         throw new Error("initializeWasm() must be awaited first!");
2991                 }
2992                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
2993                 return nativeResponseValue;
2994         }
2995         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2996         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2997                 if(!isWasmInitialized) {
2998                         throw new Error("initializeWasm() must be awaited first!");
2999                 }
3000                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
3001                 return nativeResponseValue;
3002         }
3003         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
3004         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
3005                 if(!isWasmInitialized) {
3006                         throw new Error("initializeWasm() must be awaited first!");
3007                 }
3008                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
3009                 return nativeResponseValue;
3010         }
3011         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
3012         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
3013                 if(!isWasmInitialized) {
3014                         throw new Error("initializeWasm() must be awaited first!");
3015                 }
3016                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
3017                 // debug statements here
3018         }
3019         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
3020         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
3021                 if(!isWasmInitialized) {
3022                         throw new Error("initializeWasm() must be awaited first!");
3023                 }
3024                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
3025                 return nativeResponseValue;
3026         }
3027         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
3028         export function CResult_CVec_SignatureZNoneZ_err(): number {
3029                 if(!isWasmInitialized) {
3030                         throw new Error("initializeWasm() must be awaited first!");
3031                 }
3032                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
3033                 return nativeResponseValue;
3034         }
3035         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
3036         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
3037                 if(!isWasmInitialized) {
3038                         throw new Error("initializeWasm() must be awaited first!");
3039                 }
3040                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
3041                 // debug statements here
3042         }
3043         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
3044         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
3045                 if(!isWasmInitialized) {
3046                         throw new Error("initializeWasm() must be awaited first!");
3047                 }
3048                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
3049                 return nativeResponseValue;
3050         }
3051         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
3052         export function CResult_ShutdownScriptDecodeErrorZ_ok(o: number): number {
3053                 if(!isWasmInitialized) {
3054                         throw new Error("initializeWasm() must be awaited first!");
3055                 }
3056                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_ok(o);
3057                 return nativeResponseValue;
3058         }
3059         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
3060         export function CResult_ShutdownScriptDecodeErrorZ_err(e: number): number {
3061                 if(!isWasmInitialized) {
3062                         throw new Error("initializeWasm() must be awaited first!");
3063                 }
3064                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_err(e);
3065                 return nativeResponseValue;
3066         }
3067         // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
3068         export function CResult_ShutdownScriptDecodeErrorZ_free(_res: number): void {
3069                 if(!isWasmInitialized) {
3070                         throw new Error("initializeWasm() must be awaited first!");
3071                 }
3072                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_free(_res);
3073                 // debug statements here
3074         }
3075         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
3076         export function CResult_ShutdownScriptDecodeErrorZ_clone(orig: number): number {
3077                 if(!isWasmInitialized) {
3078                         throw new Error("initializeWasm() must be awaited first!");
3079                 }
3080                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_clone(orig);
3081                 return nativeResponseValue;
3082         }
3083         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
3084         export function CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o: number): number {
3085                 if(!isWasmInitialized) {
3086                         throw new Error("initializeWasm() must be awaited first!");
3087                 }
3088                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o);
3089                 return nativeResponseValue;
3090         }
3091         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
3092         export function CResult_ShutdownScriptInvalidShutdownScriptZ_err(e: number): number {
3093                 if(!isWasmInitialized) {
3094                         throw new Error("initializeWasm() must be awaited first!");
3095                 }
3096                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e);
3097                 return nativeResponseValue;
3098         }
3099         // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
3100         export function CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res: number): void {
3101                 if(!isWasmInitialized) {
3102                         throw new Error("initializeWasm() must be awaited first!");
3103                 }
3104                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res);
3105                 // debug statements here
3106         }
3107         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
3108         export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig: number): number {
3109                 if(!isWasmInitialized) {
3110                         throw new Error("initializeWasm() must be awaited first!");
3111                 }
3112                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig);
3113                 return nativeResponseValue;
3114         }
3115         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
3116         export function CResult_NoneErrorZ_ok(): number {
3117                 if(!isWasmInitialized) {
3118                         throw new Error("initializeWasm() must be awaited first!");
3119                 }
3120                 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
3121                 return nativeResponseValue;
3122         }
3123         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
3124         export function CResult_NoneErrorZ_err(e: IOError): number {
3125                 if(!isWasmInitialized) {
3126                         throw new Error("initializeWasm() must be awaited first!");
3127                 }
3128                 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
3129                 return nativeResponseValue;
3130         }
3131         // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
3132         export function CResult_NoneErrorZ_free(_res: number): void {
3133                 if(!isWasmInitialized) {
3134                         throw new Error("initializeWasm() must be awaited first!");
3135                 }
3136                 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
3137                 // debug statements here
3138         }
3139         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
3140         export function CResult_NoneErrorZ_clone(orig: number): number {
3141                 if(!isWasmInitialized) {
3142                         throw new Error("initializeWasm() must be awaited first!");
3143                 }
3144                 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
3145                 return nativeResponseValue;
3146         }
3147         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
3148         export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
3149                 if(!isWasmInitialized) {
3150                         throw new Error("initializeWasm() must be awaited first!");
3151                 }
3152                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
3153                 return nativeResponseValue;
3154         }
3155         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
3156         export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
3157                 if(!isWasmInitialized) {
3158                         throw new Error("initializeWasm() must be awaited first!");
3159                 }
3160                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
3161                 return nativeResponseValue;
3162         }
3163         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
3164         export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
3165                 if(!isWasmInitialized) {
3166                         throw new Error("initializeWasm() must be awaited first!");
3167                 }
3168                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
3169                 // debug statements here
3170         }
3171         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
3172         export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
3173                 if(!isWasmInitialized) {
3174                         throw new Error("initializeWasm() must be awaited first!");
3175                 }
3176                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
3177                 return nativeResponseValue;
3178         }
3179         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
3180         export function CVec_RouteHopZ_free(_res: number[]): void {
3181                 if(!isWasmInitialized) {
3182                         throw new Error("initializeWasm() must be awaited first!");
3183                 }
3184                 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
3185                 // debug statements here
3186         }
3187         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
3188         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
3189                 if(!isWasmInitialized) {
3190                         throw new Error("initializeWasm() must be awaited first!");
3191                 }
3192                 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
3193                 // debug statements here
3194         }
3195         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
3196         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
3197                 if(!isWasmInitialized) {
3198                         throw new Error("initializeWasm() must be awaited first!");
3199                 }
3200                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
3201                 return nativeResponseValue;
3202         }
3203         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
3204         export function CResult_RouteDecodeErrorZ_err(e: number): number {
3205                 if(!isWasmInitialized) {
3206                         throw new Error("initializeWasm() must be awaited first!");
3207                 }
3208                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
3209                 return nativeResponseValue;
3210         }
3211         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
3212         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
3213                 if(!isWasmInitialized) {
3214                         throw new Error("initializeWasm() must be awaited first!");
3215                 }
3216                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
3217                 // debug statements here
3218         }
3219         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
3220         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
3221                 if(!isWasmInitialized) {
3222                         throw new Error("initializeWasm() must be awaited first!");
3223                 }
3224                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
3225                 return nativeResponseValue;
3226         }
3227         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_ok(struct LDKRouteParameters o);
3228         export function CResult_RouteParametersDecodeErrorZ_ok(o: number): number {
3229                 if(!isWasmInitialized) {
3230                         throw new Error("initializeWasm() must be awaited first!");
3231                 }
3232                 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_ok(o);
3233                 return nativeResponseValue;
3234         }
3235         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_err(struct LDKDecodeError e);
3236         export function CResult_RouteParametersDecodeErrorZ_err(e: number): number {
3237                 if(!isWasmInitialized) {
3238                         throw new Error("initializeWasm() must be awaited first!");
3239                 }
3240                 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_err(e);
3241                 return nativeResponseValue;
3242         }
3243         // void CResult_RouteParametersDecodeErrorZ_free(struct LDKCResult_RouteParametersDecodeErrorZ _res);
3244         export function CResult_RouteParametersDecodeErrorZ_free(_res: number): void {
3245                 if(!isWasmInitialized) {
3246                         throw new Error("initializeWasm() must be awaited first!");
3247                 }
3248                 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_free(_res);
3249                 // debug statements here
3250         }
3251         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_clone(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR orig);
3252         export function CResult_RouteParametersDecodeErrorZ_clone(orig: number): number {
3253                 if(!isWasmInitialized) {
3254                         throw new Error("initializeWasm() must be awaited first!");
3255                 }
3256                 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_clone(orig);
3257                 return nativeResponseValue;
3258         }
3259         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3260         export function CVec_RouteHintZ_free(_res: number[]): void {
3261                 if(!isWasmInitialized) {
3262                         throw new Error("initializeWasm() must be awaited first!");
3263                 }
3264                 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3265                 // debug statements here
3266         }
3267         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
3268         export function COption_u64Z_some(o: number): number {
3269                 if(!isWasmInitialized) {
3270                         throw new Error("initializeWasm() must be awaited first!");
3271                 }
3272                 const nativeResponseValue = wasm.COption_u64Z_some(o);
3273                 return nativeResponseValue;
3274         }
3275         // struct LDKCOption_u64Z COption_u64Z_none(void);
3276         export function COption_u64Z_none(): number {
3277                 if(!isWasmInitialized) {
3278                         throw new Error("initializeWasm() must be awaited first!");
3279                 }
3280                 const nativeResponseValue = wasm.COption_u64Z_none();
3281                 return nativeResponseValue;
3282         }
3283         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
3284         export function COption_u64Z_free(_res: number): void {
3285                 if(!isWasmInitialized) {
3286                         throw new Error("initializeWasm() must be awaited first!");
3287                 }
3288                 const nativeResponseValue = wasm.COption_u64Z_free(_res);
3289                 // debug statements here
3290         }
3291         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
3292         export function COption_u64Z_clone(orig: number): number {
3293                 if(!isWasmInitialized) {
3294                         throw new Error("initializeWasm() must be awaited first!");
3295                 }
3296                 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
3297                 return nativeResponseValue;
3298         }
3299         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_ok(struct LDKPayee o);
3300         export function CResult_PayeeDecodeErrorZ_ok(o: number): number {
3301                 if(!isWasmInitialized) {
3302                         throw new Error("initializeWasm() must be awaited first!");
3303                 }
3304                 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_ok(o);
3305                 return nativeResponseValue;
3306         }
3307         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_err(struct LDKDecodeError e);
3308         export function CResult_PayeeDecodeErrorZ_err(e: number): number {
3309                 if(!isWasmInitialized) {
3310                         throw new Error("initializeWasm() must be awaited first!");
3311                 }
3312                 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_err(e);
3313                 return nativeResponseValue;
3314         }
3315         // void CResult_PayeeDecodeErrorZ_free(struct LDKCResult_PayeeDecodeErrorZ _res);
3316         export function CResult_PayeeDecodeErrorZ_free(_res: number): void {
3317                 if(!isWasmInitialized) {
3318                         throw new Error("initializeWasm() must be awaited first!");
3319                 }
3320                 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_free(_res);
3321                 // debug statements here
3322         }
3323         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_clone(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR orig);
3324         export function CResult_PayeeDecodeErrorZ_clone(orig: number): number {
3325                 if(!isWasmInitialized) {
3326                         throw new Error("initializeWasm() must be awaited first!");
3327                 }
3328                 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_clone(orig);
3329                 return nativeResponseValue;
3330         }
3331         // void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res);
3332         export function CVec_RouteHintHopZ_free(_res: number[]): void {
3333                 if(!isWasmInitialized) {
3334                         throw new Error("initializeWasm() must be awaited first!");
3335                 }
3336                 const nativeResponseValue = wasm.CVec_RouteHintHopZ_free(_res);
3337                 // debug statements here
3338         }
3339         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_ok(struct LDKRouteHint o);
3340         export function CResult_RouteHintDecodeErrorZ_ok(o: number): number {
3341                 if(!isWasmInitialized) {
3342                         throw new Error("initializeWasm() must be awaited first!");
3343                 }
3344                 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_ok(o);
3345                 return nativeResponseValue;
3346         }
3347         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_err(struct LDKDecodeError e);
3348         export function CResult_RouteHintDecodeErrorZ_err(e: number): number {
3349                 if(!isWasmInitialized) {
3350                         throw new Error("initializeWasm() must be awaited first!");
3351                 }
3352                 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_err(e);
3353                 return nativeResponseValue;
3354         }
3355         // void CResult_RouteHintDecodeErrorZ_free(struct LDKCResult_RouteHintDecodeErrorZ _res);
3356         export function CResult_RouteHintDecodeErrorZ_free(_res: number): void {
3357                 if(!isWasmInitialized) {
3358                         throw new Error("initializeWasm() must be awaited first!");
3359                 }
3360                 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_free(_res);
3361                 // debug statements here
3362         }
3363         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_clone(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR orig);
3364         export function CResult_RouteHintDecodeErrorZ_clone(orig: number): number {
3365                 if(!isWasmInitialized) {
3366                         throw new Error("initializeWasm() must be awaited first!");
3367                 }
3368                 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_clone(orig);
3369                 return nativeResponseValue;
3370         }
3371         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_ok(struct LDKRouteHintHop o);
3372         export function CResult_RouteHintHopDecodeErrorZ_ok(o: number): number {
3373                 if(!isWasmInitialized) {
3374                         throw new Error("initializeWasm() must be awaited first!");
3375                 }
3376                 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_ok(o);
3377                 return nativeResponseValue;
3378         }
3379         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_err(struct LDKDecodeError e);
3380         export function CResult_RouteHintHopDecodeErrorZ_err(e: number): number {
3381                 if(!isWasmInitialized) {
3382                         throw new Error("initializeWasm() must be awaited first!");
3383                 }
3384                 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_err(e);
3385                 return nativeResponseValue;
3386         }
3387         // void CResult_RouteHintHopDecodeErrorZ_free(struct LDKCResult_RouteHintHopDecodeErrorZ _res);
3388         export function CResult_RouteHintHopDecodeErrorZ_free(_res: number): void {
3389                 if(!isWasmInitialized) {
3390                         throw new Error("initializeWasm() must be awaited first!");
3391                 }
3392                 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_free(_res);
3393                 // debug statements here
3394         }
3395         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_clone(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR orig);
3396         export function CResult_RouteHintHopDecodeErrorZ_clone(orig: number): number {
3397                 if(!isWasmInitialized) {
3398                         throw new Error("initializeWasm() must be awaited first!");
3399                 }
3400                 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_clone(orig);
3401                 return nativeResponseValue;
3402         }
3403         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
3404         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
3405                 if(!isWasmInitialized) {
3406                         throw new Error("initializeWasm() must be awaited first!");
3407                 }
3408                 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
3409                 // debug statements here
3410         }
3411         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
3412         export function CResult_RouteLightningErrorZ_ok(o: number): number {
3413                 if(!isWasmInitialized) {
3414                         throw new Error("initializeWasm() must be awaited first!");
3415                 }
3416                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
3417                 return nativeResponseValue;
3418         }
3419         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
3420         export function CResult_RouteLightningErrorZ_err(e: number): number {
3421                 if(!isWasmInitialized) {
3422                         throw new Error("initializeWasm() must be awaited first!");
3423                 }
3424                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
3425                 return nativeResponseValue;
3426         }
3427         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
3428         export function CResult_RouteLightningErrorZ_free(_res: number): void {
3429                 if(!isWasmInitialized) {
3430                         throw new Error("initializeWasm() must be awaited first!");
3431                 }
3432                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
3433                 // debug statements here
3434         }
3435         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
3436         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
3437                 if(!isWasmInitialized) {
3438                         throw new Error("initializeWasm() must be awaited first!");
3439                 }
3440                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
3441                 return nativeResponseValue;
3442         }
3443         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
3444         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
3445                 if(!isWasmInitialized) {
3446                         throw new Error("initializeWasm() must be awaited first!");
3447                 }
3448                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
3449                 return nativeResponseValue;
3450         }
3451         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
3452         export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
3453                 if(!isWasmInitialized) {
3454                         throw new Error("initializeWasm() must be awaited first!");
3455                 }
3456                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
3457                 return nativeResponseValue;
3458         }
3459         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
3460         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
3461                 if(!isWasmInitialized) {
3462                         throw new Error("initializeWasm() must be awaited first!");
3463                 }
3464                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
3465                 // debug statements here
3466         }
3467         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
3468         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
3469                 if(!isWasmInitialized) {
3470                         throw new Error("initializeWasm() must be awaited first!");
3471                 }
3472                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
3473                 return nativeResponseValue;
3474         }
3475         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
3476         export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
3477                 if(!isWasmInitialized) {
3478                         throw new Error("initializeWasm() must be awaited first!");
3479                 }
3480                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
3481                 return nativeResponseValue;
3482         }
3483         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
3484         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
3485                 if(!isWasmInitialized) {
3486                         throw new Error("initializeWasm() must be awaited first!");
3487                 }
3488                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
3489                 return nativeResponseValue;
3490         }
3491         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
3492         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
3493                 if(!isWasmInitialized) {
3494                         throw new Error("initializeWasm() must be awaited first!");
3495                 }
3496                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
3497                 // debug statements here
3498         }
3499         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
3500         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
3501                 if(!isWasmInitialized) {
3502                         throw new Error("initializeWasm() must be awaited first!");
3503                 }
3504                 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
3505                 // debug statements here
3506         }
3507         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
3508         export function CVec_TxidZ_free(_res: Uint8Array[]): void {
3509                 if(!isWasmInitialized) {
3510                         throw new Error("initializeWasm() must be awaited first!");
3511                 }
3512                 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
3513                 // debug statements here
3514         }
3515         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
3516         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
3517                 if(!isWasmInitialized) {
3518                         throw new Error("initializeWasm() must be awaited first!");
3519                 }
3520                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
3521                 return nativeResponseValue;
3522         }
3523         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
3524         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
3525                 if(!isWasmInitialized) {
3526                         throw new Error("initializeWasm() must be awaited first!");
3527                 }
3528                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
3529                 return nativeResponseValue;
3530         }
3531         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
3532         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
3533                 if(!isWasmInitialized) {
3534                         throw new Error("initializeWasm() must be awaited first!");
3535                 }
3536                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
3537                 // debug statements here
3538         }
3539         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
3540         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
3541                 if(!isWasmInitialized) {
3542                         throw new Error("initializeWasm() must be awaited first!");
3543                 }
3544                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
3545                 return nativeResponseValue;
3546         }
3547         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
3548         export function CVec_MonitorEventZ_free(_res: number[]): void {
3549                 if(!isWasmInitialized) {
3550                         throw new Error("initializeWasm() must be awaited first!");
3551                 }
3552                 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
3553                 // debug statements here
3554         }
3555         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
3556         export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
3557                 if(!isWasmInitialized) {
3558                         throw new Error("initializeWasm() must be awaited first!");
3559                 }
3560                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
3561                 return nativeResponseValue;
3562         }
3563         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
3564         export function COption_C2Tuple_usizeTransactionZZ_none(): number {
3565                 if(!isWasmInitialized) {
3566                         throw new Error("initializeWasm() must be awaited first!");
3567                 }
3568                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
3569                 return nativeResponseValue;
3570         }
3571         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
3572         export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
3573                 if(!isWasmInitialized) {
3574                         throw new Error("initializeWasm() must be awaited first!");
3575                 }
3576                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
3577                 // debug statements here
3578         }
3579         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
3580         export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
3581                 if(!isWasmInitialized) {
3582                         throw new Error("initializeWasm() must be awaited first!");
3583                 }
3584                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
3585                 return nativeResponseValue;
3586         }
3587         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
3588         export function COption_NetworkUpdateZ_some(o: number): number {
3589                 if(!isWasmInitialized) {
3590                         throw new Error("initializeWasm() must be awaited first!");
3591                 }
3592                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_some(o);
3593                 return nativeResponseValue;
3594         }
3595         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
3596         export function COption_NetworkUpdateZ_none(): number {
3597                 if(!isWasmInitialized) {
3598                         throw new Error("initializeWasm() must be awaited first!");
3599                 }
3600                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_none();
3601                 return nativeResponseValue;
3602         }
3603         // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
3604         export function COption_NetworkUpdateZ_free(_res: number): void {
3605                 if(!isWasmInitialized) {
3606                         throw new Error("initializeWasm() must be awaited first!");
3607                 }
3608                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_free(_res);
3609                 // debug statements here
3610         }
3611         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
3612         export function COption_NetworkUpdateZ_clone(orig: number): number {
3613                 if(!isWasmInitialized) {
3614                         throw new Error("initializeWasm() must be awaited first!");
3615                 }
3616                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_clone(orig);
3617                 return nativeResponseValue;
3618         }
3619         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
3620         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
3621                 if(!isWasmInitialized) {
3622                         throw new Error("initializeWasm() must be awaited first!");
3623                 }
3624                 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
3625                 // debug statements here
3626         }
3627         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
3628         export function CVec_MessageSendEventZ_free(_res: number[]): void {
3629                 if(!isWasmInitialized) {
3630                         throw new Error("initializeWasm() must be awaited first!");
3631                 }
3632                 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
3633                 // debug statements here
3634         }
3635         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
3636         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
3637                 if(!isWasmInitialized) {
3638                         throw new Error("initializeWasm() must be awaited first!");
3639                 }
3640                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
3641                 return nativeResponseValue;
3642         }
3643         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3644         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
3645                 if(!isWasmInitialized) {
3646                         throw new Error("initializeWasm() must be awaited first!");
3647                 }
3648                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
3649                 return nativeResponseValue;
3650         }
3651         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
3652         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
3653                 if(!isWasmInitialized) {
3654                         throw new Error("initializeWasm() must be awaited first!");
3655                 }
3656                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
3657                 // debug statements here
3658         }
3659         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
3660         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
3661                 if(!isWasmInitialized) {
3662                         throw new Error("initializeWasm() must be awaited first!");
3663                 }
3664                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
3665                 return nativeResponseValue;
3666         }
3667         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3668         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
3669                 if(!isWasmInitialized) {
3670                         throw new Error("initializeWasm() must be awaited first!");
3671                 }
3672                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
3673                 return nativeResponseValue;
3674         }
3675         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
3676         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
3677                 if(!isWasmInitialized) {
3678                         throw new Error("initializeWasm() must be awaited first!");
3679                 }
3680                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
3681                 // debug statements here
3682         }
3683         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
3684         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
3685                 if(!isWasmInitialized) {
3686                         throw new Error("initializeWasm() must be awaited first!");
3687                 }
3688                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
3689                 return nativeResponseValue;
3690         }
3691         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3692         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
3693                 if(!isWasmInitialized) {
3694                         throw new Error("initializeWasm() must be awaited first!");
3695                 }
3696                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
3697                 return nativeResponseValue;
3698         }
3699         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
3700         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
3701                 if(!isWasmInitialized) {
3702                         throw new Error("initializeWasm() must be awaited first!");
3703                 }
3704                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
3705                 // debug statements here
3706         }
3707         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
3708         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
3709                 if(!isWasmInitialized) {
3710                         throw new Error("initializeWasm() must be awaited first!");
3711                 }
3712                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
3713                 return nativeResponseValue;
3714         }
3715         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3716         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
3717                 if(!isWasmInitialized) {
3718                         throw new Error("initializeWasm() must be awaited first!");
3719                 }
3720                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
3721                 return nativeResponseValue;
3722         }
3723         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
3724         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
3725                 if(!isWasmInitialized) {
3726                         throw new Error("initializeWasm() must be awaited first!");
3727                 }
3728                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
3729                 // debug statements here
3730         }
3731         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_ok(struct LDKScoringParameters o);
3732         export function CResult_ScoringParametersDecodeErrorZ_ok(o: number): number {
3733                 if(!isWasmInitialized) {
3734                         throw new Error("initializeWasm() must be awaited first!");
3735                 }
3736                 const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_ok(o);
3737                 return nativeResponseValue;
3738         }
3739         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_err(struct LDKDecodeError e);
3740         export function CResult_ScoringParametersDecodeErrorZ_err(e: number): number {
3741                 if(!isWasmInitialized) {
3742                         throw new Error("initializeWasm() must be awaited first!");
3743                 }
3744                 const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_err(e);
3745                 return nativeResponseValue;
3746         }
3747         // void CResult_ScoringParametersDecodeErrorZ_free(struct LDKCResult_ScoringParametersDecodeErrorZ _res);
3748         export function CResult_ScoringParametersDecodeErrorZ_free(_res: number): void {
3749                 if(!isWasmInitialized) {
3750                         throw new Error("initializeWasm() must be awaited first!");
3751                 }
3752                 const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_free(_res);
3753                 // debug statements here
3754         }
3755         // struct LDKCResult_ScorerDecodeErrorZ CResult_ScorerDecodeErrorZ_ok(struct LDKScorer o);
3756         export function CResult_ScorerDecodeErrorZ_ok(o: number): number {
3757                 if(!isWasmInitialized) {
3758                         throw new Error("initializeWasm() must be awaited first!");
3759                 }
3760                 const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_ok(o);
3761                 return nativeResponseValue;
3762         }
3763         // struct LDKCResult_ScorerDecodeErrorZ CResult_ScorerDecodeErrorZ_err(struct LDKDecodeError e);
3764         export function CResult_ScorerDecodeErrorZ_err(e: number): number {
3765                 if(!isWasmInitialized) {
3766                         throw new Error("initializeWasm() must be awaited first!");
3767                 }
3768                 const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_err(e);
3769                 return nativeResponseValue;
3770         }
3771         // void CResult_ScorerDecodeErrorZ_free(struct LDKCResult_ScorerDecodeErrorZ _res);
3772         export function CResult_ScorerDecodeErrorZ_free(_res: number): void {
3773                 if(!isWasmInitialized) {
3774                         throw new Error("initializeWasm() must be awaited first!");
3775                 }
3776                 const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_free(_res);
3777                 // debug statements here
3778         }
3779         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
3780         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
3781                 if(!isWasmInitialized) {
3782                         throw new Error("initializeWasm() must be awaited first!");
3783                 }
3784                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
3785                 return nativeResponseValue;
3786         }
3787         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3788         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
3789                 if(!isWasmInitialized) {
3790                         throw new Error("initializeWasm() must be awaited first!");
3791                 }
3792                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
3793                 return nativeResponseValue;
3794         }
3795         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
3796         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
3797                 if(!isWasmInitialized) {
3798                         throw new Error("initializeWasm() must be awaited first!");
3799                 }
3800                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
3801                 // debug statements here
3802         }
3803         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3804         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3805                 if(!isWasmInitialized) {
3806                         throw new Error("initializeWasm() must be awaited first!");
3807                 }
3808                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
3809                 return nativeResponseValue;
3810         }
3811         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
3812         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
3813                 if(!isWasmInitialized) {
3814                         throw new Error("initializeWasm() must be awaited first!");
3815                 }
3816                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
3817                 return nativeResponseValue;
3818         }
3819         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3820         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
3821                 if(!isWasmInitialized) {
3822                         throw new Error("initializeWasm() must be awaited first!");
3823                 }
3824                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
3825                 return nativeResponseValue;
3826         }
3827         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
3828         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
3829                 if(!isWasmInitialized) {
3830                         throw new Error("initializeWasm() must be awaited first!");
3831                 }
3832                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
3833                 // debug statements here
3834         }
3835         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3836         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3837                 if(!isWasmInitialized) {
3838                         throw new Error("initializeWasm() must be awaited first!");
3839                 }
3840                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
3841                 return nativeResponseValue;
3842         }
3843         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
3844         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
3845                 if(!isWasmInitialized) {
3846                         throw new Error("initializeWasm() must be awaited first!");
3847                 }
3848                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
3849                 return nativeResponseValue;
3850         }
3851         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3852         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
3853                 if(!isWasmInitialized) {
3854                         throw new Error("initializeWasm() must be awaited first!");
3855                 }
3856                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
3857                 return nativeResponseValue;
3858         }
3859         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
3860         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
3861                 if(!isWasmInitialized) {
3862                         throw new Error("initializeWasm() must be awaited first!");
3863                 }
3864                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
3865                 // debug statements here
3866         }
3867         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3868         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3869                 if(!isWasmInitialized) {
3870                         throw new Error("initializeWasm() must be awaited first!");
3871                 }
3872                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
3873                 return nativeResponseValue;
3874         }
3875         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
3876         export function CResult_NoneNoneZ_ok(): number {
3877                 if(!isWasmInitialized) {
3878                         throw new Error("initializeWasm() must be awaited first!");
3879                 }
3880                 const nativeResponseValue = wasm.CResult_NoneNoneZ_ok();
3881                 return nativeResponseValue;
3882         }
3883         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
3884         export function CResult_NoneNoneZ_err(): number {
3885                 if(!isWasmInitialized) {
3886                         throw new Error("initializeWasm() must be awaited first!");
3887                 }
3888                 const nativeResponseValue = wasm.CResult_NoneNoneZ_err();
3889                 return nativeResponseValue;
3890         }
3891         // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
3892         export function CResult_NoneNoneZ_free(_res: number): void {
3893                 if(!isWasmInitialized) {
3894                         throw new Error("initializeWasm() must be awaited first!");
3895                 }
3896                 const nativeResponseValue = wasm.CResult_NoneNoneZ_free(_res);
3897                 // debug statements here
3898         }
3899         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
3900         export function CResult_NoneNoneZ_clone(orig: number): number {
3901                 if(!isWasmInitialized) {
3902                         throw new Error("initializeWasm() must be awaited first!");
3903                 }
3904                 const nativeResponseValue = wasm.CResult_NoneNoneZ_clone(orig);
3905                 return nativeResponseValue;
3906         }
3907         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
3908         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
3909                 if(!isWasmInitialized) {
3910                         throw new Error("initializeWasm() must be awaited first!");
3911                 }
3912                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
3913                 return nativeResponseValue;
3914         }
3915         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
3916         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
3917                 if(!isWasmInitialized) {
3918                         throw new Error("initializeWasm() must be awaited first!");
3919                 }
3920                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
3921                 return nativeResponseValue;
3922         }
3923         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
3924         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
3925                 if(!isWasmInitialized) {
3926                         throw new Error("initializeWasm() must be awaited first!");
3927                 }
3928                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
3929                 // debug statements here
3930         }
3931         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
3932         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
3933                 if(!isWasmInitialized) {
3934                         throw new Error("initializeWasm() must be awaited first!");
3935                 }
3936                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
3937                 return nativeResponseValue;
3938         }
3939         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
3940         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
3941                 if(!isWasmInitialized) {
3942                         throw new Error("initializeWasm() must be awaited first!");
3943                 }
3944                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
3945                 return nativeResponseValue;
3946         }
3947         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
3948         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
3949                 if(!isWasmInitialized) {
3950                         throw new Error("initializeWasm() must be awaited first!");
3951                 }
3952                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
3953                 // debug statements here
3954         }
3955         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
3956         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
3957                 if(!isWasmInitialized) {
3958                         throw new Error("initializeWasm() must be awaited first!");
3959                 }
3960                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
3961                 return nativeResponseValue;
3962         }
3963         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
3964         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
3965                 if(!isWasmInitialized) {
3966                         throw new Error("initializeWasm() must be awaited first!");
3967                 }
3968                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
3969                 return nativeResponseValue;
3970         }
3971         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
3972         export function CResult_SignatureNoneZ_err(): number {
3973                 if(!isWasmInitialized) {
3974                         throw new Error("initializeWasm() must be awaited first!");
3975                 }
3976                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
3977                 return nativeResponseValue;
3978         }
3979         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
3980         export function CResult_SignatureNoneZ_free(_res: number): void {
3981                 if(!isWasmInitialized) {
3982                         throw new Error("initializeWasm() must be awaited first!");
3983                 }
3984                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
3985                 // debug statements here
3986         }
3987         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
3988         export function CResult_SignatureNoneZ_clone(orig: number): number {
3989                 if(!isWasmInitialized) {
3990                         throw new Error("initializeWasm() must be awaited first!");
3991                 }
3992                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
3993                 return nativeResponseValue;
3994         }
3995         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
3996         export function CResult_SignDecodeErrorZ_ok(o: number): number {
3997                 if(!isWasmInitialized) {
3998                         throw new Error("initializeWasm() must be awaited first!");
3999                 }
4000                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
4001                 return nativeResponseValue;
4002         }
4003         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
4004         export function CResult_SignDecodeErrorZ_err(e: number): number {
4005                 if(!isWasmInitialized) {
4006                         throw new Error("initializeWasm() must be awaited first!");
4007                 }
4008                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
4009                 return nativeResponseValue;
4010         }
4011         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
4012         export function CResult_SignDecodeErrorZ_free(_res: number): void {
4013                 if(!isWasmInitialized) {
4014                         throw new Error("initializeWasm() must be awaited first!");
4015                 }
4016                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
4017                 // debug statements here
4018         }
4019         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
4020         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
4021                 if(!isWasmInitialized) {
4022                         throw new Error("initializeWasm() must be awaited first!");
4023                 }
4024                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
4025                 return nativeResponseValue;
4026         }
4027         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
4028         export function CVec_u8Z_free(_res: Uint8Array): void {
4029                 if(!isWasmInitialized) {
4030                         throw new Error("initializeWasm() must be awaited first!");
4031                 }
4032                 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
4033                 // debug statements here
4034         }
4035         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
4036         export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
4037                 if(!isWasmInitialized) {
4038                         throw new Error("initializeWasm() must be awaited first!");
4039                 }
4040                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_ok(encodeArray(arg));
4041                 return nativeResponseValue;
4042         }
4043         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
4044         export function CResult_RecoverableSignatureNoneZ_err(): number {
4045                 if(!isWasmInitialized) {
4046                         throw new Error("initializeWasm() must be awaited first!");
4047                 }
4048                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_err();
4049                 return nativeResponseValue;
4050         }
4051         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
4052         export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
4053                 if(!isWasmInitialized) {
4054                         throw new Error("initializeWasm() must be awaited first!");
4055                 }
4056                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_free(_res);
4057                 // debug statements here
4058         }
4059         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
4060         export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
4061                 if(!isWasmInitialized) {
4062                         throw new Error("initializeWasm() must be awaited first!");
4063                 }
4064                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone(orig);
4065                 return nativeResponseValue;
4066         }
4067         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
4068         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
4069                 if(!isWasmInitialized) {
4070                         throw new Error("initializeWasm() must be awaited first!");
4071                 }
4072                 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
4073                 // debug statements here
4074         }
4075         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
4076         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
4077                 if(!isWasmInitialized) {
4078                         throw new Error("initializeWasm() must be awaited first!");
4079                 }
4080                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
4081                 return nativeResponseValue;
4082         }
4083         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
4084         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
4085                 if(!isWasmInitialized) {
4086                         throw new Error("initializeWasm() must be awaited first!");
4087                 }
4088                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
4089                 return nativeResponseValue;
4090         }
4091         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
4092         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
4093                 if(!isWasmInitialized) {
4094                         throw new Error("initializeWasm() must be awaited first!");
4095                 }
4096                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
4097                 // debug statements here
4098         }
4099         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
4100         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
4101                 if(!isWasmInitialized) {
4102                         throw new Error("initializeWasm() must be awaited first!");
4103                 }
4104                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
4105                 return nativeResponseValue;
4106         }
4107         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
4108         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
4109                 if(!isWasmInitialized) {
4110                         throw new Error("initializeWasm() must be awaited first!");
4111                 }
4112                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
4113                 return nativeResponseValue;
4114         }
4115         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
4116         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
4117                 if(!isWasmInitialized) {
4118                         throw new Error("initializeWasm() must be awaited first!");
4119                 }
4120                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
4121                 return nativeResponseValue;
4122         }
4123         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
4124         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
4125                 if(!isWasmInitialized) {
4126                         throw new Error("initializeWasm() must be awaited first!");
4127                 }
4128                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
4129                 // debug statements here
4130         }
4131         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
4132         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
4133                 if(!isWasmInitialized) {
4134                         throw new Error("initializeWasm() must be awaited first!");
4135                 }
4136                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
4137                 return nativeResponseValue;
4138         }
4139         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
4140         export function CVec_TxOutZ_free(_res: number[]): void {
4141                 if(!isWasmInitialized) {
4142                         throw new Error("initializeWasm() must be awaited first!");
4143                 }
4144                 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
4145                 // debug statements here
4146         }
4147         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
4148         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
4149                 if(!isWasmInitialized) {
4150                         throw new Error("initializeWasm() must be awaited first!");
4151                 }
4152                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
4153                 return nativeResponseValue;
4154         }
4155         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
4156         export function CResult_TransactionNoneZ_err(): number {
4157                 if(!isWasmInitialized) {
4158                         throw new Error("initializeWasm() must be awaited first!");
4159                 }
4160                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
4161                 return nativeResponseValue;
4162         }
4163         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
4164         export function CResult_TransactionNoneZ_free(_res: number): void {
4165                 if(!isWasmInitialized) {
4166                         throw new Error("initializeWasm() must be awaited first!");
4167                 }
4168                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
4169                 // debug statements here
4170         }
4171         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
4172         export function CResult_TransactionNoneZ_clone(orig: number): number {
4173                 if(!isWasmInitialized) {
4174                         throw new Error("initializeWasm() must be awaited first!");
4175                 }
4176                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
4177                 return nativeResponseValue;
4178         }
4179         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
4180         export function C2Tuple_BlockHashChannelMonitorZ_clone(orig: number): number {
4181                 if(!isWasmInitialized) {
4182                         throw new Error("initializeWasm() must be awaited first!");
4183                 }
4184                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_clone(orig);
4185                 return nativeResponseValue;
4186         }
4187         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
4188         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
4189                 if(!isWasmInitialized) {
4190                         throw new Error("initializeWasm() must be awaited first!");
4191                 }
4192                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
4193                 return nativeResponseValue;
4194         }
4195         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
4196         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
4197                 if(!isWasmInitialized) {
4198                         throw new Error("initializeWasm() must be awaited first!");
4199                 }
4200                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
4201                 // debug statements here
4202         }
4203         // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
4204         export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
4205                 if(!isWasmInitialized) {
4206                         throw new Error("initializeWasm() must be awaited first!");
4207                 }
4208                 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
4209                 // debug statements here
4210         }
4211         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
4212         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
4213                 if(!isWasmInitialized) {
4214                         throw new Error("initializeWasm() must be awaited first!");
4215                 }
4216                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
4217                 return nativeResponseValue;
4218         }
4219         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
4220         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: IOError): number {
4221                 if(!isWasmInitialized) {
4222                         throw new Error("initializeWasm() must be awaited first!");
4223                 }
4224                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
4225                 return nativeResponseValue;
4226         }
4227         // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
4228         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
4229                 if(!isWasmInitialized) {
4230                         throw new Error("initializeWasm() must be awaited first!");
4231                 }
4232                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
4233                 // debug statements here
4234         }
4235         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR orig);
4236         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig: number): number {
4237                 if(!isWasmInitialized) {
4238                         throw new Error("initializeWasm() must be awaited first!");
4239                 }
4240                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig);
4241                 return nativeResponseValue;
4242         }
4243         // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
4244         export function COption_u16Z_some(o: number): number {
4245                 if(!isWasmInitialized) {
4246                         throw new Error("initializeWasm() must be awaited first!");
4247                 }
4248                 const nativeResponseValue = wasm.COption_u16Z_some(o);
4249                 return nativeResponseValue;
4250         }
4251         // struct LDKCOption_u16Z COption_u16Z_none(void);
4252         export function COption_u16Z_none(): number {
4253                 if(!isWasmInitialized) {
4254                         throw new Error("initializeWasm() must be awaited first!");
4255                 }
4256                 const nativeResponseValue = wasm.COption_u16Z_none();
4257                 return nativeResponseValue;
4258         }
4259         // void COption_u16Z_free(struct LDKCOption_u16Z _res);
4260         export function COption_u16Z_free(_res: number): void {
4261                 if(!isWasmInitialized) {
4262                         throw new Error("initializeWasm() must be awaited first!");
4263                 }
4264                 const nativeResponseValue = wasm.COption_u16Z_free(_res);
4265                 // debug statements here
4266         }
4267         // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
4268         export function COption_u16Z_clone(orig: number): number {
4269                 if(!isWasmInitialized) {
4270                         throw new Error("initializeWasm() must be awaited first!");
4271                 }
4272                 const nativeResponseValue = wasm.COption_u16Z_clone(orig);
4273                 return nativeResponseValue;
4274         }
4275         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
4276         export function CResult_NoneAPIErrorZ_ok(): number {
4277                 if(!isWasmInitialized) {
4278                         throw new Error("initializeWasm() must be awaited first!");
4279                 }
4280                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
4281                 return nativeResponseValue;
4282         }
4283         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
4284         export function CResult_NoneAPIErrorZ_err(e: number): number {
4285                 if(!isWasmInitialized) {
4286                         throw new Error("initializeWasm() must be awaited first!");
4287                 }
4288                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
4289                 return nativeResponseValue;
4290         }
4291         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
4292         export function CResult_NoneAPIErrorZ_free(_res: number): void {
4293                 if(!isWasmInitialized) {
4294                         throw new Error("initializeWasm() must be awaited first!");
4295                 }
4296                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
4297                 // debug statements here
4298         }
4299         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
4300         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
4301                 if(!isWasmInitialized) {
4302                         throw new Error("initializeWasm() must be awaited first!");
4303                 }
4304                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
4305                 return nativeResponseValue;
4306         }
4307         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
4308         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
4309                 if(!isWasmInitialized) {
4310                         throw new Error("initializeWasm() must be awaited first!");
4311                 }
4312                 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
4313                 // debug statements here
4314         }
4315         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
4316         export function CVec_APIErrorZ_free(_res: number[]): void {
4317                 if(!isWasmInitialized) {
4318                         throw new Error("initializeWasm() must be awaited first!");
4319                 }
4320                 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
4321                 // debug statements here
4322         }
4323         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_ok(struct LDKThirtyTwoBytes o);
4324         export function CResult__u832APIErrorZ_ok(o: Uint8Array): number {
4325                 if(!isWasmInitialized) {
4326                         throw new Error("initializeWasm() must be awaited first!");
4327                 }
4328                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_ok(encodeArray(o));
4329                 return nativeResponseValue;
4330         }
4331         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_err(struct LDKAPIError e);
4332         export function CResult__u832APIErrorZ_err(e: number): number {
4333                 if(!isWasmInitialized) {
4334                         throw new Error("initializeWasm() must be awaited first!");
4335                 }
4336                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_err(e);
4337                 return nativeResponseValue;
4338         }
4339         // void CResult__u832APIErrorZ_free(struct LDKCResult__u832APIErrorZ _res);
4340         export function CResult__u832APIErrorZ_free(_res: number): void {
4341                 if(!isWasmInitialized) {
4342                         throw new Error("initializeWasm() must be awaited first!");
4343                 }
4344                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_free(_res);
4345                 // debug statements here
4346         }
4347         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_clone(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR orig);
4348         export function CResult__u832APIErrorZ_clone(orig: number): number {
4349                 if(!isWasmInitialized) {
4350                         throw new Error("initializeWasm() must be awaited first!");
4351                 }
4352                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_clone(orig);
4353                 return nativeResponseValue;
4354         }
4355         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
4356         export function CResult_PaymentIdPaymentSendFailureZ_ok(o: Uint8Array): number {
4357                 if(!isWasmInitialized) {
4358                         throw new Error("initializeWasm() must be awaited first!");
4359                 }
4360                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_ok(encodeArray(o));
4361                 return nativeResponseValue;
4362         }
4363         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
4364         export function CResult_PaymentIdPaymentSendFailureZ_err(e: number): number {
4365                 if(!isWasmInitialized) {
4366                         throw new Error("initializeWasm() must be awaited first!");
4367                 }
4368                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_err(e);
4369                 return nativeResponseValue;
4370         }
4371         // void CResult_PaymentIdPaymentSendFailureZ_free(struct LDKCResult_PaymentIdPaymentSendFailureZ _res);
4372         export function CResult_PaymentIdPaymentSendFailureZ_free(_res: number): void {
4373                 if(!isWasmInitialized) {
4374                         throw new Error("initializeWasm() must be awaited first!");
4375                 }
4376                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_free(_res);
4377                 // debug statements here
4378         }
4379         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_clone(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR orig);
4380         export function CResult_PaymentIdPaymentSendFailureZ_clone(orig: number): number {
4381                 if(!isWasmInitialized) {
4382                         throw new Error("initializeWasm() must be awaited first!");
4383                 }
4384                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_clone(orig);
4385                 return nativeResponseValue;
4386         }
4387         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
4388         export function CResult_NonePaymentSendFailureZ_ok(): number {
4389                 if(!isWasmInitialized) {
4390                         throw new Error("initializeWasm() must be awaited first!");
4391                 }
4392                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
4393                 return nativeResponseValue;
4394         }
4395         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
4396         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
4397                 if(!isWasmInitialized) {
4398                         throw new Error("initializeWasm() must be awaited first!");
4399                 }
4400                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
4401                 return nativeResponseValue;
4402         }
4403         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
4404         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
4405                 if(!isWasmInitialized) {
4406                         throw new Error("initializeWasm() must be awaited first!");
4407                 }
4408                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
4409                 // debug statements here
4410         }
4411         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
4412         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
4413                 if(!isWasmInitialized) {
4414                         throw new Error("initializeWasm() must be awaited first!");
4415                 }
4416                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
4417                 return nativeResponseValue;
4418         }
4419         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_clone(const struct LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR orig);
4420         export function C2Tuple_PaymentHashPaymentIdZ_clone(orig: number): number {
4421                 if(!isWasmInitialized) {
4422                         throw new Error("initializeWasm() must be awaited first!");
4423                 }
4424                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_clone(orig);
4425                 return nativeResponseValue;
4426         }
4427         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
4428         export function C2Tuple_PaymentHashPaymentIdZ_new(a: Uint8Array, b: Uint8Array): number {
4429                 if(!isWasmInitialized) {
4430                         throw new Error("initializeWasm() must be awaited first!");
4431                 }
4432                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_new(encodeArray(a), encodeArray(b));
4433                 return nativeResponseValue;
4434         }
4435         // void C2Tuple_PaymentHashPaymentIdZ_free(struct LDKC2Tuple_PaymentHashPaymentIdZ _res);
4436         export function C2Tuple_PaymentHashPaymentIdZ_free(_res: number): void {
4437                 if(!isWasmInitialized) {
4438                         throw new Error("initializeWasm() must be awaited first!");
4439                 }
4440                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_free(_res);
4441                 // debug statements here
4442         }
4443         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(struct LDKC2Tuple_PaymentHashPaymentIdZ o);
4444         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o: number): number {
4445                 if(!isWasmInitialized) {
4446                         throw new Error("initializeWasm() must be awaited first!");
4447                 }
4448                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o);
4449                 return nativeResponseValue;
4450         }
4451         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
4452         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e: number): number {
4453                 if(!isWasmInitialized) {
4454                         throw new Error("initializeWasm() must be awaited first!");
4455                 }
4456                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e);
4457                 return nativeResponseValue;
4458         }
4459         // void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ _res);
4460         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res: number): void {
4461                 if(!isWasmInitialized) {
4462                         throw new Error("initializeWasm() must be awaited first!");
4463                 }
4464                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res);
4465                 // debug statements here
4466         }
4467         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR orig);
4468         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig: number): number {
4469                 if(!isWasmInitialized) {
4470                         throw new Error("initializeWasm() must be awaited first!");
4471                 }
4472                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig);
4473                 return nativeResponseValue;
4474         }
4475         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
4476         export function CVec_NetAddressZ_free(_res: number[]): void {
4477                 if(!isWasmInitialized) {
4478                         throw new Error("initializeWasm() must be awaited first!");
4479                 }
4480                 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
4481                 // debug statements here
4482         }
4483         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
4484         export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
4485                 if(!isWasmInitialized) {
4486                         throw new Error("initializeWasm() must be awaited first!");
4487                 }
4488                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
4489                 return nativeResponseValue;
4490         }
4491         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
4492         export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
4493                 if(!isWasmInitialized) {
4494                         throw new Error("initializeWasm() must be awaited first!");
4495                 }
4496                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_new(encodeArray(a), encodeArray(b));
4497                 return nativeResponseValue;
4498         }
4499         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
4500         export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
4501                 if(!isWasmInitialized) {
4502                         throw new Error("initializeWasm() must be awaited first!");
4503                 }
4504                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_free(_res);
4505                 // debug statements here
4506         }
4507         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
4508         export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
4509                 if(!isWasmInitialized) {
4510                         throw new Error("initializeWasm() must be awaited first!");
4511                 }
4512                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_ok(encodeArray(o));
4513                 return nativeResponseValue;
4514         }
4515         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
4516         export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
4517                 if(!isWasmInitialized) {
4518                         throw new Error("initializeWasm() must be awaited first!");
4519                 }
4520                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_err(e);
4521                 return nativeResponseValue;
4522         }
4523         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
4524         export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
4525                 if(!isWasmInitialized) {
4526                         throw new Error("initializeWasm() must be awaited first!");
4527                 }
4528                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_free(_res);
4529                 // debug statements here
4530         }
4531         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
4532         export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
4533                 if(!isWasmInitialized) {
4534                         throw new Error("initializeWasm() must be awaited first!");
4535                 }
4536                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone(orig);
4537                 return nativeResponseValue;
4538         }
4539         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
4540         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
4541                 if(!isWasmInitialized) {
4542                         throw new Error("initializeWasm() must be awaited first!");
4543                 }
4544                 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
4545                 // debug statements here
4546         }
4547         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
4548         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
4549                 if(!isWasmInitialized) {
4550                         throw new Error("initializeWasm() must be awaited first!");
4551                 }
4552                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
4553                 return nativeResponseValue;
4554         }
4555         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
4556         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
4557                 if(!isWasmInitialized) {
4558                         throw new Error("initializeWasm() must be awaited first!");
4559                 }
4560                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
4561                 // debug statements here
4562         }
4563         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
4564         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
4565                 if(!isWasmInitialized) {
4566                         throw new Error("initializeWasm() must be awaited first!");
4567                 }
4568                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
4569                 return nativeResponseValue;
4570         }
4571         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
4572         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
4573                 if(!isWasmInitialized) {
4574                         throw new Error("initializeWasm() must be awaited first!");
4575                 }
4576                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
4577                 return nativeResponseValue;
4578         }
4579         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
4580         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
4581                 if(!isWasmInitialized) {
4582                         throw new Error("initializeWasm() must be awaited first!");
4583                 }
4584                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
4585                 // debug statements here
4586         }
4587         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
4588         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
4589                 if(!isWasmInitialized) {
4590                         throw new Error("initializeWasm() must be awaited first!");
4591                 }
4592                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
4593                 return nativeResponseValue;
4594         }
4595         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
4596         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
4597                 if(!isWasmInitialized) {
4598                         throw new Error("initializeWasm() must be awaited first!");
4599                 }
4600                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
4601                 return nativeResponseValue;
4602         }
4603         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
4604         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
4605                 if(!isWasmInitialized) {
4606                         throw new Error("initializeWasm() must be awaited first!");
4607                 }
4608                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
4609                 // debug statements here
4610         }
4611         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
4612         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
4613                 if(!isWasmInitialized) {
4614                         throw new Error("initializeWasm() must be awaited first!");
4615                 }
4616                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
4617                 return nativeResponseValue;
4618         }
4619         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
4620         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
4621                 if(!isWasmInitialized) {
4622                         throw new Error("initializeWasm() must be awaited first!");
4623                 }
4624                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
4625                 return nativeResponseValue;
4626         }
4627         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
4628         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
4629                 if(!isWasmInitialized) {
4630                         throw new Error("initializeWasm() must be awaited first!");
4631                 }
4632                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
4633                 return nativeResponseValue;
4634         }
4635         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
4636         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
4637                 if(!isWasmInitialized) {
4638                         throw new Error("initializeWasm() must be awaited first!");
4639                 }
4640                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
4641                 // debug statements here
4642         }
4643         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
4644         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
4645                 if(!isWasmInitialized) {
4646                         throw new Error("initializeWasm() must be awaited first!");
4647                 }
4648                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
4649                 return nativeResponseValue;
4650         }
4651         // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
4652         export function COption_TypeZ_some(o: number): number {
4653                 if(!isWasmInitialized) {
4654                         throw new Error("initializeWasm() must be awaited first!");
4655                 }
4656                 const nativeResponseValue = wasm.COption_TypeZ_some(o);
4657                 return nativeResponseValue;
4658         }
4659         // struct LDKCOption_TypeZ COption_TypeZ_none(void);
4660         export function COption_TypeZ_none(): number {
4661                 if(!isWasmInitialized) {
4662                         throw new Error("initializeWasm() must be awaited first!");
4663                 }
4664                 const nativeResponseValue = wasm.COption_TypeZ_none();
4665                 return nativeResponseValue;
4666         }
4667         // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
4668         export function COption_TypeZ_free(_res: number): void {
4669                 if(!isWasmInitialized) {
4670                         throw new Error("initializeWasm() must be awaited first!");
4671                 }
4672                 const nativeResponseValue = wasm.COption_TypeZ_free(_res);
4673                 // debug statements here
4674         }
4675         // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
4676         export function COption_TypeZ_clone(orig: number): number {
4677                 if(!isWasmInitialized) {
4678                         throw new Error("initializeWasm() must be awaited first!");
4679                 }
4680                 const nativeResponseValue = wasm.COption_TypeZ_clone(orig);
4681                 return nativeResponseValue;
4682         }
4683         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
4684         export function CResult_COption_TypeZDecodeErrorZ_ok(o: number): number {
4685                 if(!isWasmInitialized) {
4686                         throw new Error("initializeWasm() must be awaited first!");
4687                 }
4688                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_ok(o);
4689                 return nativeResponseValue;
4690         }
4691         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
4692         export function CResult_COption_TypeZDecodeErrorZ_err(e: number): number {
4693                 if(!isWasmInitialized) {
4694                         throw new Error("initializeWasm() must be awaited first!");
4695                 }
4696                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_err(e);
4697                 return nativeResponseValue;
4698         }
4699         // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
4700         export function CResult_COption_TypeZDecodeErrorZ_free(_res: number): void {
4701                 if(!isWasmInitialized) {
4702                         throw new Error("initializeWasm() must be awaited first!");
4703                 }
4704                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_free(_res);
4705                 // debug statements here
4706         }
4707         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
4708         export function CResult_COption_TypeZDecodeErrorZ_clone(orig: number): number {
4709                 if(!isWasmInitialized) {
4710                         throw new Error("initializeWasm() must be awaited first!");
4711                 }
4712                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_clone(orig);
4713                 return nativeResponseValue;
4714         }
4715         // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_ok(struct LDKThirtyTwoBytes o);
4716         export function CResult_PaymentIdPaymentErrorZ_ok(o: Uint8Array): number {
4717                 if(!isWasmInitialized) {
4718                         throw new Error("initializeWasm() must be awaited first!");
4719                 }
4720                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_ok(encodeArray(o));
4721                 return nativeResponseValue;
4722         }
4723         // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_err(struct LDKPaymentError e);
4724         export function CResult_PaymentIdPaymentErrorZ_err(e: number): number {
4725                 if(!isWasmInitialized) {
4726                         throw new Error("initializeWasm() must be awaited first!");
4727                 }
4728                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_err(e);
4729                 return nativeResponseValue;
4730         }
4731         // void CResult_PaymentIdPaymentErrorZ_free(struct LDKCResult_PaymentIdPaymentErrorZ _res);
4732         export function CResult_PaymentIdPaymentErrorZ_free(_res: number): void {
4733                 if(!isWasmInitialized) {
4734                         throw new Error("initializeWasm() must be awaited first!");
4735                 }
4736                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_free(_res);
4737                 // debug statements here
4738         }
4739         // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_clone(const struct LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR orig);
4740         export function CResult_PaymentIdPaymentErrorZ_clone(orig: number): number {
4741                 if(!isWasmInitialized) {
4742                         throw new Error("initializeWasm() must be awaited first!");
4743                 }
4744                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_clone(orig);
4745                 return nativeResponseValue;
4746         }
4747         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
4748         export function CResult_SiPrefixNoneZ_ok(o: SiPrefix): number {
4749                 if(!isWasmInitialized) {
4750                         throw new Error("initializeWasm() must be awaited first!");
4751                 }
4752                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_ok(o);
4753                 return nativeResponseValue;
4754         }
4755         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
4756         export function CResult_SiPrefixNoneZ_err(): number {
4757                 if(!isWasmInitialized) {
4758                         throw new Error("initializeWasm() must be awaited first!");
4759                 }
4760                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_err();
4761                 return nativeResponseValue;
4762         }
4763         // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
4764         export function CResult_SiPrefixNoneZ_free(_res: number): void {
4765                 if(!isWasmInitialized) {
4766                         throw new Error("initializeWasm() must be awaited first!");
4767                 }
4768                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_free(_res);
4769                 // debug statements here
4770         }
4771         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
4772         export function CResult_SiPrefixNoneZ_clone(orig: number): number {
4773                 if(!isWasmInitialized) {
4774                         throw new Error("initializeWasm() must be awaited first!");
4775                 }
4776                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone(orig);
4777                 return nativeResponseValue;
4778         }
4779         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
4780         export function CResult_InvoiceNoneZ_ok(o: number): number {
4781                 if(!isWasmInitialized) {
4782                         throw new Error("initializeWasm() must be awaited first!");
4783                 }
4784                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_ok(o);
4785                 return nativeResponseValue;
4786         }
4787         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
4788         export function CResult_InvoiceNoneZ_err(): number {
4789                 if(!isWasmInitialized) {
4790                         throw new Error("initializeWasm() must be awaited first!");
4791                 }
4792                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_err();
4793                 return nativeResponseValue;
4794         }
4795         // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
4796         export function CResult_InvoiceNoneZ_free(_res: number): void {
4797                 if(!isWasmInitialized) {
4798                         throw new Error("initializeWasm() must be awaited first!");
4799                 }
4800                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_free(_res);
4801                 // debug statements here
4802         }
4803         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
4804         export function CResult_InvoiceNoneZ_clone(orig: number): number {
4805                 if(!isWasmInitialized) {
4806                         throw new Error("initializeWasm() must be awaited first!");
4807                 }
4808                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone(orig);
4809                 return nativeResponseValue;
4810         }
4811         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
4812         export function CResult_SignedRawInvoiceNoneZ_ok(o: number): number {
4813                 if(!isWasmInitialized) {
4814                         throw new Error("initializeWasm() must be awaited first!");
4815                 }
4816                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_ok(o);
4817                 return nativeResponseValue;
4818         }
4819         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
4820         export function CResult_SignedRawInvoiceNoneZ_err(): number {
4821                 if(!isWasmInitialized) {
4822                         throw new Error("initializeWasm() must be awaited first!");
4823                 }
4824                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_err();
4825                 return nativeResponseValue;
4826         }
4827         // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
4828         export function CResult_SignedRawInvoiceNoneZ_free(_res: number): void {
4829                 if(!isWasmInitialized) {
4830                         throw new Error("initializeWasm() must be awaited first!");
4831                 }
4832                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_free(_res);
4833                 // debug statements here
4834         }
4835         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
4836         export function CResult_SignedRawInvoiceNoneZ_clone(orig: number): number {
4837                 if(!isWasmInitialized) {
4838                         throw new Error("initializeWasm() must be awaited first!");
4839                 }
4840                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone(orig);
4841                 return nativeResponseValue;
4842         }
4843         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
4844         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig: number): number {
4845                 if(!isWasmInitialized) {
4846                         throw new Error("initializeWasm() must be awaited first!");
4847                 }
4848                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig);
4849                 return nativeResponseValue;
4850         }
4851         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
4852         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a: number, b: Uint8Array, c: number): number {
4853                 if(!isWasmInitialized) {
4854                         throw new Error("initializeWasm() must be awaited first!");
4855                 }
4856                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a, encodeArray(b), c);
4857                 return nativeResponseValue;
4858         }
4859         // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
4860         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res: number): void {
4861                 if(!isWasmInitialized) {
4862                         throw new Error("initializeWasm() must be awaited first!");
4863                 }
4864                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res);
4865                 // debug statements here
4866         }
4867         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
4868         export function CResult_PayeePubKeyErrorZ_ok(o: number): number {
4869                 if(!isWasmInitialized) {
4870                         throw new Error("initializeWasm() must be awaited first!");
4871                 }
4872                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_ok(o);
4873                 return nativeResponseValue;
4874         }
4875         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
4876         export function CResult_PayeePubKeyErrorZ_err(e: Secp256k1Error): number {
4877                 if(!isWasmInitialized) {
4878                         throw new Error("initializeWasm() must be awaited first!");
4879                 }
4880                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_err(e);
4881                 return nativeResponseValue;
4882         }
4883         // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
4884         export function CResult_PayeePubKeyErrorZ_free(_res: number): void {
4885                 if(!isWasmInitialized) {
4886                         throw new Error("initializeWasm() must be awaited first!");
4887                 }
4888                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_free(_res);
4889                 // debug statements here
4890         }
4891         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
4892         export function CResult_PayeePubKeyErrorZ_clone(orig: number): number {
4893                 if(!isWasmInitialized) {
4894                         throw new Error("initializeWasm() must be awaited first!");
4895                 }
4896                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone(orig);
4897                 return nativeResponseValue;
4898         }
4899         // void CVec_PrivateRouteZ_free(struct LDKCVec_PrivateRouteZ _res);
4900         export function CVec_PrivateRouteZ_free(_res: number[]): void {
4901                 if(!isWasmInitialized) {
4902                         throw new Error("initializeWasm() must be awaited first!");
4903                 }
4904                 const nativeResponseValue = wasm.CVec_PrivateRouteZ_free(_res);
4905                 // debug statements here
4906         }
4907         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
4908         export function CResult_PositiveTimestampCreationErrorZ_ok(o: number): number {
4909                 if(!isWasmInitialized) {
4910                         throw new Error("initializeWasm() must be awaited first!");
4911                 }
4912                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_ok(o);
4913                 return nativeResponseValue;
4914         }
4915         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
4916         export function CResult_PositiveTimestampCreationErrorZ_err(e: CreationError): number {
4917                 if(!isWasmInitialized) {
4918                         throw new Error("initializeWasm() must be awaited first!");
4919                 }
4920                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_err(e);
4921                 return nativeResponseValue;
4922         }
4923         // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
4924         export function CResult_PositiveTimestampCreationErrorZ_free(_res: number): void {
4925                 if(!isWasmInitialized) {
4926                         throw new Error("initializeWasm() must be awaited first!");
4927                 }
4928                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_free(_res);
4929                 // debug statements here
4930         }
4931         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
4932         export function CResult_PositiveTimestampCreationErrorZ_clone(orig: number): number {
4933                 if(!isWasmInitialized) {
4934                         throw new Error("initializeWasm() must be awaited first!");
4935                 }
4936                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone(orig);
4937                 return nativeResponseValue;
4938         }
4939         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
4940         export function CResult_NoneSemanticErrorZ_ok(): number {
4941                 if(!isWasmInitialized) {
4942                         throw new Error("initializeWasm() must be awaited first!");
4943                 }
4944                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_ok();
4945                 return nativeResponseValue;
4946         }
4947         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
4948         export function CResult_NoneSemanticErrorZ_err(e: SemanticError): number {
4949                 if(!isWasmInitialized) {
4950                         throw new Error("initializeWasm() must be awaited first!");
4951                 }
4952                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_err(e);
4953                 return nativeResponseValue;
4954         }
4955         // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
4956         export function CResult_NoneSemanticErrorZ_free(_res: number): void {
4957                 if(!isWasmInitialized) {
4958                         throw new Error("initializeWasm() must be awaited first!");
4959                 }
4960                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_free(_res);
4961                 // debug statements here
4962         }
4963         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
4964         export function CResult_NoneSemanticErrorZ_clone(orig: number): number {
4965                 if(!isWasmInitialized) {
4966                         throw new Error("initializeWasm() must be awaited first!");
4967                 }
4968                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone(orig);
4969                 return nativeResponseValue;
4970         }
4971         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
4972         export function CResult_InvoiceSemanticErrorZ_ok(o: number): number {
4973                 if(!isWasmInitialized) {
4974                         throw new Error("initializeWasm() must be awaited first!");
4975                 }
4976                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_ok(o);
4977                 return nativeResponseValue;
4978         }
4979         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
4980         export function CResult_InvoiceSemanticErrorZ_err(e: SemanticError): number {
4981                 if(!isWasmInitialized) {
4982                         throw new Error("initializeWasm() must be awaited first!");
4983                 }
4984                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_err(e);
4985                 return nativeResponseValue;
4986         }
4987         // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
4988         export function CResult_InvoiceSemanticErrorZ_free(_res: number): void {
4989                 if(!isWasmInitialized) {
4990                         throw new Error("initializeWasm() must be awaited first!");
4991                 }
4992                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_free(_res);
4993                 // debug statements here
4994         }
4995         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
4996         export function CResult_InvoiceSemanticErrorZ_clone(orig: number): number {
4997                 if(!isWasmInitialized) {
4998                         throw new Error("initializeWasm() must be awaited first!");
4999                 }
5000                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone(orig);
5001                 return nativeResponseValue;
5002         }
5003         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
5004         export function CResult_DescriptionCreationErrorZ_ok(o: number): number {
5005                 if(!isWasmInitialized) {
5006                         throw new Error("initializeWasm() must be awaited first!");
5007                 }
5008                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_ok(o);
5009                 return nativeResponseValue;
5010         }
5011         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
5012         export function CResult_DescriptionCreationErrorZ_err(e: CreationError): number {
5013                 if(!isWasmInitialized) {
5014                         throw new Error("initializeWasm() must be awaited first!");
5015                 }
5016                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_err(e);
5017                 return nativeResponseValue;
5018         }
5019         // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
5020         export function CResult_DescriptionCreationErrorZ_free(_res: number): void {
5021                 if(!isWasmInitialized) {
5022                         throw new Error("initializeWasm() must be awaited first!");
5023                 }
5024                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_free(_res);
5025                 // debug statements here
5026         }
5027         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
5028         export function CResult_DescriptionCreationErrorZ_clone(orig: number): number {
5029                 if(!isWasmInitialized) {
5030                         throw new Error("initializeWasm() must be awaited first!");
5031                 }
5032                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone(orig);
5033                 return nativeResponseValue;
5034         }
5035         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
5036         export function CResult_ExpiryTimeCreationErrorZ_ok(o: number): number {
5037                 if(!isWasmInitialized) {
5038                         throw new Error("initializeWasm() must be awaited first!");
5039                 }
5040                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_ok(o);
5041                 return nativeResponseValue;
5042         }
5043         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
5044         export function CResult_ExpiryTimeCreationErrorZ_err(e: CreationError): number {
5045                 if(!isWasmInitialized) {
5046                         throw new Error("initializeWasm() must be awaited first!");
5047                 }
5048                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_err(e);
5049                 return nativeResponseValue;
5050         }
5051         // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
5052         export function CResult_ExpiryTimeCreationErrorZ_free(_res: number): void {
5053                 if(!isWasmInitialized) {
5054                         throw new Error("initializeWasm() must be awaited first!");
5055                 }
5056                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_free(_res);
5057                 // debug statements here
5058         }
5059         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
5060         export function CResult_ExpiryTimeCreationErrorZ_clone(orig: number): number {
5061                 if(!isWasmInitialized) {
5062                         throw new Error("initializeWasm() must be awaited first!");
5063                 }
5064                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone(orig);
5065                 return nativeResponseValue;
5066         }
5067         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_ok(struct LDKPrivateRoute o);
5068         export function CResult_PrivateRouteCreationErrorZ_ok(o: number): number {
5069                 if(!isWasmInitialized) {
5070                         throw new Error("initializeWasm() must be awaited first!");
5071                 }
5072                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_ok(o);
5073                 return nativeResponseValue;
5074         }
5075         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_err(enum LDKCreationError e);
5076         export function CResult_PrivateRouteCreationErrorZ_err(e: CreationError): number {
5077                 if(!isWasmInitialized) {
5078                         throw new Error("initializeWasm() must be awaited first!");
5079                 }
5080                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_err(e);
5081                 return nativeResponseValue;
5082         }
5083         // void CResult_PrivateRouteCreationErrorZ_free(struct LDKCResult_PrivateRouteCreationErrorZ _res);
5084         export function CResult_PrivateRouteCreationErrorZ_free(_res: number): void {
5085                 if(!isWasmInitialized) {
5086                         throw new Error("initializeWasm() must be awaited first!");
5087                 }
5088                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_free(_res);
5089                 // debug statements here
5090         }
5091         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_clone(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR orig);
5092         export function CResult_PrivateRouteCreationErrorZ_clone(orig: number): number {
5093                 if(!isWasmInitialized) {
5094                         throw new Error("initializeWasm() must be awaited first!");
5095                 }
5096                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_clone(orig);
5097                 return nativeResponseValue;
5098         }
5099         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
5100         export function CResult_StringErrorZ_ok(o: String): number {
5101                 if(!isWasmInitialized) {
5102                         throw new Error("initializeWasm() must be awaited first!");
5103                 }
5104                 const nativeResponseValue = wasm.CResult_StringErrorZ_ok(o);
5105                 return nativeResponseValue;
5106         }
5107         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
5108         export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
5109                 if(!isWasmInitialized) {
5110                         throw new Error("initializeWasm() must be awaited first!");
5111                 }
5112                 const nativeResponseValue = wasm.CResult_StringErrorZ_err(e);
5113                 return nativeResponseValue;
5114         }
5115         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
5116         export function CResult_StringErrorZ_free(_res: number): void {
5117                 if(!isWasmInitialized) {
5118                         throw new Error("initializeWasm() must be awaited first!");
5119                 }
5120                 const nativeResponseValue = wasm.CResult_StringErrorZ_free(_res);
5121                 // debug statements here
5122         }
5123         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
5124         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
5125                 if(!isWasmInitialized) {
5126                         throw new Error("initializeWasm() must be awaited first!");
5127                 }
5128                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
5129                 return nativeResponseValue;
5130         }
5131         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5132         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
5133                 if(!isWasmInitialized) {
5134                         throw new Error("initializeWasm() must be awaited first!");
5135                 }
5136                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
5137                 return nativeResponseValue;
5138         }
5139         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
5140         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
5141                 if(!isWasmInitialized) {
5142                         throw new Error("initializeWasm() must be awaited first!");
5143                 }
5144                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
5145                 // debug statements here
5146         }
5147         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
5148         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
5149                 if(!isWasmInitialized) {
5150                         throw new Error("initializeWasm() must be awaited first!");
5151                 }
5152                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
5153                 return nativeResponseValue;
5154         }
5155         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
5156         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
5157                 if(!isWasmInitialized) {
5158                         throw new Error("initializeWasm() must be awaited first!");
5159                 }
5160                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
5161                 return nativeResponseValue;
5162         }
5163         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5164         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
5165                 if(!isWasmInitialized) {
5166                         throw new Error("initializeWasm() must be awaited first!");
5167                 }
5168                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
5169                 return nativeResponseValue;
5170         }
5171         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
5172         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
5173                 if(!isWasmInitialized) {
5174                         throw new Error("initializeWasm() must be awaited first!");
5175                 }
5176                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
5177                 // debug statements here
5178         }
5179         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
5180         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
5181                 if(!isWasmInitialized) {
5182                         throw new Error("initializeWasm() must be awaited first!");
5183                 }
5184                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
5185                 return nativeResponseValue;
5186         }
5187         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
5188         export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
5189                 if(!isWasmInitialized) {
5190                         throw new Error("initializeWasm() must be awaited first!");
5191                 }
5192                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
5193                 return nativeResponseValue;
5194         }
5195         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
5196         export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
5197                 if(!isWasmInitialized) {
5198                         throw new Error("initializeWasm() must be awaited first!");
5199                 }
5200                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
5201                 return nativeResponseValue;
5202         }
5203         // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
5204         export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
5205                 if(!isWasmInitialized) {
5206                         throw new Error("initializeWasm() must be awaited first!");
5207                 }
5208                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
5209                 // debug statements here
5210         }
5211         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
5212         export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
5213                 if(!isWasmInitialized) {
5214                         throw new Error("initializeWasm() must be awaited first!");
5215                 }
5216                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
5217                 return nativeResponseValue;
5218         }
5219         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
5220         export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
5221                 if(!isWasmInitialized) {
5222                         throw new Error("initializeWasm() must be awaited first!");
5223                 }
5224                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
5225                 return nativeResponseValue;
5226         }
5227         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
5228         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
5229                 if(!isWasmInitialized) {
5230                         throw new Error("initializeWasm() must be awaited first!");
5231                 }
5232                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
5233                 return nativeResponseValue;
5234         }
5235         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
5236         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
5237                 if(!isWasmInitialized) {
5238                         throw new Error("initializeWasm() must be awaited first!");
5239                 }
5240                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
5241                 // debug statements here
5242         }
5243         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
5244         export function C2Tuple_u32ScriptZ_clone(orig: number): number {
5245                 if(!isWasmInitialized) {
5246                         throw new Error("initializeWasm() must be awaited first!");
5247                 }
5248                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
5249                 return nativeResponseValue;
5250         }
5251         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
5252         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
5253                 if(!isWasmInitialized) {
5254                         throw new Error("initializeWasm() must be awaited first!");
5255                 }
5256                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
5257                 return nativeResponseValue;
5258         }
5259         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
5260         export function C2Tuple_u32ScriptZ_free(_res: number): void {
5261                 if(!isWasmInitialized) {
5262                         throw new Error("initializeWasm() must be awaited first!");
5263                 }
5264                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
5265                 // debug statements here
5266         }
5267         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
5268         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
5269                 if(!isWasmInitialized) {
5270                         throw new Error("initializeWasm() must be awaited first!");
5271                 }
5272                 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
5273                 // debug statements here
5274         }
5275         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
5276         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig: number): number {
5277                 if(!isWasmInitialized) {
5278                         throw new Error("initializeWasm() must be awaited first!");
5279                 }
5280                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig);
5281                 return nativeResponseValue;
5282         }
5283         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
5284         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
5285                 if(!isWasmInitialized) {
5286                         throw new Error("initializeWasm() must be awaited first!");
5287                 }
5288                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
5289                 return nativeResponseValue;
5290         }
5291         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
5292         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
5293                 if(!isWasmInitialized) {
5294                         throw new Error("initializeWasm() must be awaited first!");
5295                 }
5296                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
5297                 // debug statements here
5298         }
5299         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
5300         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
5301                 if(!isWasmInitialized) {
5302                         throw new Error("initializeWasm() must be awaited first!");
5303                 }
5304                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
5305                 // debug statements here
5306         }
5307         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
5308         export function CVec_EventZ_free(_res: number[]): void {
5309                 if(!isWasmInitialized) {
5310                         throw new Error("initializeWasm() must be awaited first!");
5311                 }
5312                 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
5313                 // debug statements here
5314         }
5315         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
5316         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
5317                 if(!isWasmInitialized) {
5318                         throw new Error("initializeWasm() must be awaited first!");
5319                 }
5320                 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
5321                 // debug statements here
5322         }
5323         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
5324         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
5325                 if(!isWasmInitialized) {
5326                         throw new Error("initializeWasm() must be awaited first!");
5327                 }
5328                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
5329                 return nativeResponseValue;
5330         }
5331         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
5332         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
5333                 if(!isWasmInitialized) {
5334                         throw new Error("initializeWasm() must be awaited first!");
5335                 }
5336                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
5337                 return nativeResponseValue;
5338         }
5339         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
5340         export function C2Tuple_u32TxOutZ_free(_res: number): void {
5341                 if(!isWasmInitialized) {
5342                         throw new Error("initializeWasm() must be awaited first!");
5343                 }
5344                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
5345                 // debug statements here
5346         }
5347         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
5348         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
5349                 if(!isWasmInitialized) {
5350                         throw new Error("initializeWasm() must be awaited first!");
5351                 }
5352                 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
5353                 // debug statements here
5354         }
5355         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
5356         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
5357                 if(!isWasmInitialized) {
5358                         throw new Error("initializeWasm() must be awaited first!");
5359                 }
5360                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
5361                 return nativeResponseValue;
5362         }
5363         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
5364         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
5365                 if(!isWasmInitialized) {
5366                         throw new Error("initializeWasm() must be awaited first!");
5367                 }
5368                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
5369                 return nativeResponseValue;
5370         }
5371         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
5372         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
5373                 if(!isWasmInitialized) {
5374                         throw new Error("initializeWasm() must be awaited first!");
5375                 }
5376                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
5377                 // debug statements here
5378         }
5379         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
5380         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
5381                 if(!isWasmInitialized) {
5382                         throw new Error("initializeWasm() must be awaited first!");
5383                 }
5384                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
5385                 // debug statements here
5386         }
5387         // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
5388         export function CVec_BalanceZ_free(_res: number[]): void {
5389                 if(!isWasmInitialized) {
5390                         throw new Error("initializeWasm() must be awaited first!");
5391                 }
5392                 const nativeResponseValue = wasm.CVec_BalanceZ_free(_res);
5393                 // debug statements here
5394         }
5395         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
5396         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
5397                 if(!isWasmInitialized) {
5398                         throw new Error("initializeWasm() must be awaited first!");
5399                 }
5400                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
5401                 return nativeResponseValue;
5402         }
5403         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
5404         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
5405                 if(!isWasmInitialized) {
5406                         throw new Error("initializeWasm() must be awaited first!");
5407                 }
5408                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
5409                 return nativeResponseValue;
5410         }
5411         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
5412         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
5413                 if(!isWasmInitialized) {
5414                         throw new Error("initializeWasm() must be awaited first!");
5415                 }
5416                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
5417                 // debug statements here
5418         }
5419         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
5420         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig: number): number {
5421                 if(!isWasmInitialized) {
5422                         throw new Error("initializeWasm() must be awaited first!");
5423                 }
5424                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig);
5425                 return nativeResponseValue;
5426         }
5427         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
5428         export function CResult_NoneLightningErrorZ_ok(): number {
5429                 if(!isWasmInitialized) {
5430                         throw new Error("initializeWasm() must be awaited first!");
5431                 }
5432                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
5433                 return nativeResponseValue;
5434         }
5435         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
5436         export function CResult_NoneLightningErrorZ_err(e: number): number {
5437                 if(!isWasmInitialized) {
5438                         throw new Error("initializeWasm() must be awaited first!");
5439                 }
5440                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
5441                 return nativeResponseValue;
5442         }
5443         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
5444         export function CResult_NoneLightningErrorZ_free(_res: number): void {
5445                 if(!isWasmInitialized) {
5446                         throw new Error("initializeWasm() must be awaited first!");
5447                 }
5448                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
5449                 // debug statements here
5450         }
5451         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
5452         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
5453                 if(!isWasmInitialized) {
5454                         throw new Error("initializeWasm() must be awaited first!");
5455                 }
5456                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
5457                 return nativeResponseValue;
5458         }
5459         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
5460         export function C2Tuple_PublicKeyTypeZ_clone(orig: number): number {
5461                 if(!isWasmInitialized) {
5462                         throw new Error("initializeWasm() must be awaited first!");
5463                 }
5464                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_clone(orig);
5465                 return nativeResponseValue;
5466         }
5467         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
5468         export function C2Tuple_PublicKeyTypeZ_new(a: Uint8Array, b: number): number {
5469                 if(!isWasmInitialized) {
5470                         throw new Error("initializeWasm() must be awaited first!");
5471                 }
5472                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_new(encodeArray(a), b);
5473                 return nativeResponseValue;
5474         }
5475         // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
5476         export function C2Tuple_PublicKeyTypeZ_free(_res: number): void {
5477                 if(!isWasmInitialized) {
5478                         throw new Error("initializeWasm() must be awaited first!");
5479                 }
5480                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_free(_res);
5481                 // debug statements here
5482         }
5483         // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
5484         export function CVec_C2Tuple_PublicKeyTypeZZ_free(_res: number[]): void {
5485                 if(!isWasmInitialized) {
5486                         throw new Error("initializeWasm() must be awaited first!");
5487                 }
5488                 const nativeResponseValue = wasm.CVec_C2Tuple_PublicKeyTypeZZ_free(_res);
5489                 // debug statements here
5490         }
5491         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
5492         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
5493                 if(!isWasmInitialized) {
5494                         throw new Error("initializeWasm() must be awaited first!");
5495                 }
5496                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
5497                 return nativeResponseValue;
5498         }
5499         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
5500         export function CResult_boolLightningErrorZ_err(e: number): number {
5501                 if(!isWasmInitialized) {
5502                         throw new Error("initializeWasm() must be awaited first!");
5503                 }
5504                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
5505                 return nativeResponseValue;
5506         }
5507         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
5508         export function CResult_boolLightningErrorZ_free(_res: number): void {
5509                 if(!isWasmInitialized) {
5510                         throw new Error("initializeWasm() must be awaited first!");
5511                 }
5512                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
5513                 // debug statements here
5514         }
5515         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
5516         export function CResult_boolLightningErrorZ_clone(orig: number): number {
5517                 if(!isWasmInitialized) {
5518                         throw new Error("initializeWasm() must be awaited first!");
5519                 }
5520                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
5521                 return nativeResponseValue;
5522         }
5523         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
5524         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
5525                 if(!isWasmInitialized) {
5526                         throw new Error("initializeWasm() must be awaited first!");
5527                 }
5528                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
5529                 return nativeResponseValue;
5530         }
5531         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
5532         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
5533                 if(!isWasmInitialized) {
5534                         throw new Error("initializeWasm() must be awaited first!");
5535                 }
5536                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
5537                 return nativeResponseValue;
5538         }
5539         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
5540         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
5541                 if(!isWasmInitialized) {
5542                         throw new Error("initializeWasm() must be awaited first!");
5543                 }
5544                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
5545                 // debug statements here
5546         }
5547         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
5548         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
5549                 if(!isWasmInitialized) {
5550                         throw new Error("initializeWasm() must be awaited first!");
5551                 }
5552                 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
5553                 // debug statements here
5554         }
5555         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
5556         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
5557                 if(!isWasmInitialized) {
5558                         throw new Error("initializeWasm() must be awaited first!");
5559                 }
5560                 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
5561                 // debug statements here
5562         }
5563         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
5564         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
5565                 if(!isWasmInitialized) {
5566                         throw new Error("initializeWasm() must be awaited first!");
5567                 }
5568                 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
5569                 // debug statements here
5570         }
5571         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
5572         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
5573                 if(!isWasmInitialized) {
5574                         throw new Error("initializeWasm() must be awaited first!");
5575                 }
5576                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
5577                 return nativeResponseValue;
5578         }
5579         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
5580         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
5581                 if(!isWasmInitialized) {
5582                         throw new Error("initializeWasm() must be awaited first!");
5583                 }
5584                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
5585                 return nativeResponseValue;
5586         }
5587         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
5588         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
5589                 if(!isWasmInitialized) {
5590                         throw new Error("initializeWasm() must be awaited first!");
5591                 }
5592                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
5593                 // debug statements here
5594         }
5595         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
5596         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
5597                 if(!isWasmInitialized) {
5598                         throw new Error("initializeWasm() must be awaited first!");
5599                 }
5600                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
5601                 return nativeResponseValue;
5602         }
5603         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
5604         export function CResult_NonePeerHandleErrorZ_ok(): number {
5605                 if(!isWasmInitialized) {
5606                         throw new Error("initializeWasm() must be awaited first!");
5607                 }
5608                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
5609                 return nativeResponseValue;
5610         }
5611         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
5612         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
5613                 if(!isWasmInitialized) {
5614                         throw new Error("initializeWasm() must be awaited first!");
5615                 }
5616                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
5617                 return nativeResponseValue;
5618         }
5619         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
5620         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
5621                 if(!isWasmInitialized) {
5622                         throw new Error("initializeWasm() must be awaited first!");
5623                 }
5624                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
5625                 // debug statements here
5626         }
5627         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
5628         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
5629                 if(!isWasmInitialized) {
5630                         throw new Error("initializeWasm() must be awaited first!");
5631                 }
5632                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
5633                 return nativeResponseValue;
5634         }
5635         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
5636         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
5637                 if(!isWasmInitialized) {
5638                         throw new Error("initializeWasm() must be awaited first!");
5639                 }
5640                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
5641                 return nativeResponseValue;
5642         }
5643         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
5644         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
5645                 if(!isWasmInitialized) {
5646                         throw new Error("initializeWasm() must be awaited first!");
5647                 }
5648                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
5649                 return nativeResponseValue;
5650         }
5651         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
5652         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
5653                 if(!isWasmInitialized) {
5654                         throw new Error("initializeWasm() must be awaited first!");
5655                 }
5656                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
5657                 // debug statements here
5658         }
5659         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
5660         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
5661                 if(!isWasmInitialized) {
5662                         throw new Error("initializeWasm() must be awaited first!");
5663                 }
5664                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
5665                 return nativeResponseValue;
5666         }
5667         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
5668         export function CResult_NodeIdDecodeErrorZ_ok(o: number): number {
5669                 if(!isWasmInitialized) {
5670                         throw new Error("initializeWasm() must be awaited first!");
5671                 }
5672                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_ok(o);
5673                 return nativeResponseValue;
5674         }
5675         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
5676         export function CResult_NodeIdDecodeErrorZ_err(e: number): number {
5677                 if(!isWasmInitialized) {
5678                         throw new Error("initializeWasm() must be awaited first!");
5679                 }
5680                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_err(e);
5681                 return nativeResponseValue;
5682         }
5683         // void CResult_NodeIdDecodeErrorZ_free(struct LDKCResult_NodeIdDecodeErrorZ _res);
5684         export function CResult_NodeIdDecodeErrorZ_free(_res: number): void {
5685                 if(!isWasmInitialized) {
5686                         throw new Error("initializeWasm() must be awaited first!");
5687                 }
5688                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_free(_res);
5689                 // debug statements here
5690         }
5691         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
5692         export function CResult_NodeIdDecodeErrorZ_clone(orig: number): number {
5693                 if(!isWasmInitialized) {
5694                         throw new Error("initializeWasm() must be awaited first!");
5695                 }
5696                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_clone(orig);
5697                 return nativeResponseValue;
5698         }
5699         // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
5700         export function COption_AccessZ_some(o: number): number {
5701                 if(!isWasmInitialized) {
5702                         throw new Error("initializeWasm() must be awaited first!");
5703                 }
5704                 const nativeResponseValue = wasm.COption_AccessZ_some(o);
5705                 return nativeResponseValue;
5706         }
5707         // struct LDKCOption_AccessZ COption_AccessZ_none(void);
5708         export function COption_AccessZ_none(): number {
5709                 if(!isWasmInitialized) {
5710                         throw new Error("initializeWasm() must be awaited first!");
5711                 }
5712                 const nativeResponseValue = wasm.COption_AccessZ_none();
5713                 return nativeResponseValue;
5714         }
5715         // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
5716         export function COption_AccessZ_free(_res: number): void {
5717                 if(!isWasmInitialized) {
5718                         throw new Error("initializeWasm() must be awaited first!");
5719                 }
5720                 const nativeResponseValue = wasm.COption_AccessZ_free(_res);
5721                 // debug statements here
5722         }
5723         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
5724         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
5725                 if(!isWasmInitialized) {
5726                         throw new Error("initializeWasm() must be awaited first!");
5727                 }
5728                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
5729                 return nativeResponseValue;
5730         }
5731         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
5732         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
5733                 if(!isWasmInitialized) {
5734                         throw new Error("initializeWasm() must be awaited first!");
5735                 }
5736                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
5737                 return nativeResponseValue;
5738         }
5739         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
5740         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
5741                 if(!isWasmInitialized) {
5742                         throw new Error("initializeWasm() must be awaited first!");
5743                 }
5744                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
5745                 // debug statements here
5746         }
5747         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
5748         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
5749                 if(!isWasmInitialized) {
5750                         throw new Error("initializeWasm() must be awaited first!");
5751                 }
5752                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
5753                 return nativeResponseValue;
5754         }
5755         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
5756         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
5757                 if(!isWasmInitialized) {
5758                         throw new Error("initializeWasm() must be awaited first!");
5759                 }
5760                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
5761                 return nativeResponseValue;
5762         }
5763         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
5764         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
5765                 if(!isWasmInitialized) {
5766                         throw new Error("initializeWasm() must be awaited first!");
5767                 }
5768                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
5769                 return nativeResponseValue;
5770         }
5771         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
5772         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
5773                 if(!isWasmInitialized) {
5774                         throw new Error("initializeWasm() must be awaited first!");
5775                 }
5776                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
5777                 // debug statements here
5778         }
5779         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
5780         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
5781                 if(!isWasmInitialized) {
5782                         throw new Error("initializeWasm() must be awaited first!");
5783                 }
5784                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
5785                 return nativeResponseValue;
5786         }
5787         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
5788         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
5789                 if(!isWasmInitialized) {
5790                         throw new Error("initializeWasm() must be awaited first!");
5791                 }
5792                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
5793                 return nativeResponseValue;
5794         }
5795         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
5796         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
5797                 if(!isWasmInitialized) {
5798                         throw new Error("initializeWasm() must be awaited first!");
5799                 }
5800                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
5801                 return nativeResponseValue;
5802         }
5803         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
5804         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
5805                 if(!isWasmInitialized) {
5806                         throw new Error("initializeWasm() must be awaited first!");
5807                 }
5808                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
5809                 // debug statements here
5810         }
5811         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
5812         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
5813                 if(!isWasmInitialized) {
5814                         throw new Error("initializeWasm() must be awaited first!");
5815                 }
5816                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
5817                 return nativeResponseValue;
5818         }
5819         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
5820         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
5821                 if(!isWasmInitialized) {
5822                         throw new Error("initializeWasm() must be awaited first!");
5823                 }
5824                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
5825                 return nativeResponseValue;
5826         }
5827         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
5828         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
5829                 if(!isWasmInitialized) {
5830                         throw new Error("initializeWasm() must be awaited first!");
5831                 }
5832                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
5833                 return nativeResponseValue;
5834         }
5835         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
5836         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
5837                 if(!isWasmInitialized) {
5838                         throw new Error("initializeWasm() must be awaited first!");
5839                 }
5840                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
5841                 // debug statements here
5842         }
5843         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
5844         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
5845                 if(!isWasmInitialized) {
5846                         throw new Error("initializeWasm() must be awaited first!");
5847                 }
5848                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
5849                 return nativeResponseValue;
5850         }
5851         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
5852         export function CVec_u64Z_free(_res: number[]): void {
5853                 if(!isWasmInitialized) {
5854                         throw new Error("initializeWasm() must be awaited first!");
5855                 }
5856                 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
5857                 // debug statements here
5858         }
5859         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
5860         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
5861                 if(!isWasmInitialized) {
5862                         throw new Error("initializeWasm() must be awaited first!");
5863                 }
5864                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
5865                 return nativeResponseValue;
5866         }
5867         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
5868         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
5869                 if(!isWasmInitialized) {
5870                         throw new Error("initializeWasm() must be awaited first!");
5871                 }
5872                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
5873                 return nativeResponseValue;
5874         }
5875         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
5876         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
5877                 if(!isWasmInitialized) {
5878                         throw new Error("initializeWasm() must be awaited first!");
5879                 }
5880                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
5881                 // debug statements here
5882         }
5883         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
5884         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
5885                 if(!isWasmInitialized) {
5886                         throw new Error("initializeWasm() must be awaited first!");
5887                 }
5888                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
5889                 return nativeResponseValue;
5890         }
5891         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
5892         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
5893                 if(!isWasmInitialized) {
5894                         throw new Error("initializeWasm() must be awaited first!");
5895                 }
5896                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
5897                 return nativeResponseValue;
5898         }
5899         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
5900         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
5901                 if(!isWasmInitialized) {
5902                         throw new Error("initializeWasm() must be awaited first!");
5903                 }
5904                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
5905                 return nativeResponseValue;
5906         }
5907         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
5908         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
5909                 if(!isWasmInitialized) {
5910                         throw new Error("initializeWasm() must be awaited first!");
5911                 }
5912                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
5913                 // debug statements here
5914         }
5915         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
5916         export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
5917                 if(!isWasmInitialized) {
5918                         throw new Error("initializeWasm() must be awaited first!");
5919                 }
5920                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
5921                 return nativeResponseValue;
5922         }
5923         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_some(struct LDKCVec_NetAddressZ o);
5924         export function COption_CVec_NetAddressZZ_some(o: number[]): number {
5925                 if(!isWasmInitialized) {
5926                         throw new Error("initializeWasm() must be awaited first!");
5927                 }
5928                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_some(o);
5929                 return nativeResponseValue;
5930         }
5931         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_none(void);
5932         export function COption_CVec_NetAddressZZ_none(): number {
5933                 if(!isWasmInitialized) {
5934                         throw new Error("initializeWasm() must be awaited first!");
5935                 }
5936                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_none();
5937                 return nativeResponseValue;
5938         }
5939         // void COption_CVec_NetAddressZZ_free(struct LDKCOption_CVec_NetAddressZZ _res);
5940         export function COption_CVec_NetAddressZZ_free(_res: number): void {
5941                 if(!isWasmInitialized) {
5942                         throw new Error("initializeWasm() must be awaited first!");
5943                 }
5944                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_free(_res);
5945                 // debug statements here
5946         }
5947         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_clone(const struct LDKCOption_CVec_NetAddressZZ *NONNULL_PTR orig);
5948         export function COption_CVec_NetAddressZZ_clone(orig: number): number {
5949                 if(!isWasmInitialized) {
5950                         throw new Error("initializeWasm() must be awaited first!");
5951                 }
5952                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_clone(orig);
5953                 return nativeResponseValue;
5954         }
5955         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
5956         export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
5957                 if(!isWasmInitialized) {
5958                         throw new Error("initializeWasm() must be awaited first!");
5959                 }
5960                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_ok(o);
5961                 return nativeResponseValue;
5962         }
5963         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
5964         export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
5965                 if(!isWasmInitialized) {
5966                         throw new Error("initializeWasm() must be awaited first!");
5967                 }
5968                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_err(e);
5969                 return nativeResponseValue;
5970         }
5971         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
5972         export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
5973                 if(!isWasmInitialized) {
5974                         throw new Error("initializeWasm() must be awaited first!");
5975                 }
5976                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_free(_res);
5977                 // debug statements here
5978         }
5979         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
5980         export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
5981                 if(!isWasmInitialized) {
5982                         throw new Error("initializeWasm() must be awaited first!");
5983                 }
5984                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone(orig);
5985                 return nativeResponseValue;
5986         }
5987         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
5988         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
5989                 if(!isWasmInitialized) {
5990                         throw new Error("initializeWasm() must be awaited first!");
5991                 }
5992                 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
5993                 // debug statements here
5994         }
5995         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
5996         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
5997                 if(!isWasmInitialized) {
5998                         throw new Error("initializeWasm() must be awaited first!");
5999                 }
6000                 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
6001                 // debug statements here
6002         }
6003         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
6004         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
6005                 if(!isWasmInitialized) {
6006                         throw new Error("initializeWasm() must be awaited first!");
6007                 }
6008                 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
6009                 // debug statements here
6010         }
6011         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
6012         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
6013                 if(!isWasmInitialized) {
6014                         throw new Error("initializeWasm() must be awaited first!");
6015                 }
6016                 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
6017                 // debug statements here
6018         }
6019         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
6020         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
6021                 if(!isWasmInitialized) {
6022                         throw new Error("initializeWasm() must be awaited first!");
6023                 }
6024                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
6025                 return nativeResponseValue;
6026         }
6027         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
6028         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
6029                 if(!isWasmInitialized) {
6030                         throw new Error("initializeWasm() must be awaited first!");
6031                 }
6032                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
6033                 return nativeResponseValue;
6034         }
6035         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
6036         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
6037                 if(!isWasmInitialized) {
6038                         throw new Error("initializeWasm() must be awaited first!");
6039                 }
6040                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
6041                 // debug statements here
6042         }
6043         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
6044         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
6045                 if(!isWasmInitialized) {
6046                         throw new Error("initializeWasm() must be awaited first!");
6047                 }
6048                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
6049                 return nativeResponseValue;
6050         }
6051         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
6052         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
6053                 if(!isWasmInitialized) {
6054                         throw new Error("initializeWasm() must be awaited first!");
6055                 }
6056                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
6057                 return nativeResponseValue;
6058         }
6059         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
6060         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
6061                 if(!isWasmInitialized) {
6062                         throw new Error("initializeWasm() must be awaited first!");
6063                 }
6064                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
6065                 return nativeResponseValue;
6066         }
6067         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
6068         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
6069                 if(!isWasmInitialized) {
6070                         throw new Error("initializeWasm() must be awaited first!");
6071                 }
6072                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
6073                 // debug statements here
6074         }
6075         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
6076         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
6077                 if(!isWasmInitialized) {
6078                         throw new Error("initializeWasm() must be awaited first!");
6079                 }
6080                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
6081                 return nativeResponseValue;
6082         }
6083         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
6084         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
6085                 if(!isWasmInitialized) {
6086                         throw new Error("initializeWasm() must be awaited first!");
6087                 }
6088                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
6089                 return nativeResponseValue;
6090         }
6091         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
6092         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
6093                 if(!isWasmInitialized) {
6094                         throw new Error("initializeWasm() must be awaited first!");
6095                 }
6096                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
6097                 return nativeResponseValue;
6098         }
6099         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
6100         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
6101                 if(!isWasmInitialized) {
6102                         throw new Error("initializeWasm() must be awaited first!");
6103                 }
6104                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
6105                 // debug statements here
6106         }
6107         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
6108         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
6109                 if(!isWasmInitialized) {
6110                         throw new Error("initializeWasm() must be awaited first!");
6111                 }
6112                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
6113                 return nativeResponseValue;
6114         }
6115         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
6116         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
6117                 if(!isWasmInitialized) {
6118                         throw new Error("initializeWasm() must be awaited first!");
6119                 }
6120                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
6121                 return nativeResponseValue;
6122         }
6123         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
6124         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
6125                 if(!isWasmInitialized) {
6126                         throw new Error("initializeWasm() must be awaited first!");
6127                 }
6128                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
6129                 return nativeResponseValue;
6130         }
6131         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
6132         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
6133                 if(!isWasmInitialized) {
6134                         throw new Error("initializeWasm() must be awaited first!");
6135                 }
6136                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
6137                 // debug statements here
6138         }
6139         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
6140         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
6141                 if(!isWasmInitialized) {
6142                         throw new Error("initializeWasm() must be awaited first!");
6143                 }
6144                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
6145                 return nativeResponseValue;
6146         }
6147         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
6148         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: number): number {
6149                 if(!isWasmInitialized) {
6150                         throw new Error("initializeWasm() must be awaited first!");
6151                 }
6152                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o);
6153                 return nativeResponseValue;
6154         }
6155         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
6156         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: number): number {
6157                 if(!isWasmInitialized) {
6158                         throw new Error("initializeWasm() must be awaited first!");
6159                 }
6160                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e);
6161                 return nativeResponseValue;
6162         }
6163         // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
6164         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: number): void {
6165                 if(!isWasmInitialized) {
6166                         throw new Error("initializeWasm() must be awaited first!");
6167                 }
6168                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res);
6169                 // debug statements here
6170         }
6171         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
6172         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: number): number {
6173                 if(!isWasmInitialized) {
6174                         throw new Error("initializeWasm() must be awaited first!");
6175                 }
6176                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig);
6177                 return nativeResponseValue;
6178         }
6179         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
6180         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
6181                 if(!isWasmInitialized) {
6182                         throw new Error("initializeWasm() must be awaited first!");
6183                 }
6184                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
6185                 return nativeResponseValue;
6186         }
6187         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
6188         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
6189                 if(!isWasmInitialized) {
6190                         throw new Error("initializeWasm() must be awaited first!");
6191                 }
6192                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
6193                 return nativeResponseValue;
6194         }
6195         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
6196         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
6197                 if(!isWasmInitialized) {
6198                         throw new Error("initializeWasm() must be awaited first!");
6199                 }
6200                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
6201                 // debug statements here
6202         }
6203         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
6204         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
6205                 if(!isWasmInitialized) {
6206                         throw new Error("initializeWasm() must be awaited first!");
6207                 }
6208                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
6209                 return nativeResponseValue;
6210         }
6211         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
6212         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
6213                 if(!isWasmInitialized) {
6214                         throw new Error("initializeWasm() must be awaited first!");
6215                 }
6216                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
6217                 return nativeResponseValue;
6218         }
6219         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
6220         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
6221                 if(!isWasmInitialized) {
6222                         throw new Error("initializeWasm() must be awaited first!");
6223                 }
6224                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
6225                 return nativeResponseValue;
6226         }
6227         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
6228         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
6229                 if(!isWasmInitialized) {
6230                         throw new Error("initializeWasm() must be awaited first!");
6231                 }
6232                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
6233                 // debug statements here
6234         }
6235         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
6236         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
6237                 if(!isWasmInitialized) {
6238                         throw new Error("initializeWasm() must be awaited first!");
6239                 }
6240                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
6241                 return nativeResponseValue;
6242         }
6243         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
6244         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
6245                 if(!isWasmInitialized) {
6246                         throw new Error("initializeWasm() must be awaited first!");
6247                 }
6248                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
6249                 return nativeResponseValue;
6250         }
6251         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
6252         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
6253                 if(!isWasmInitialized) {
6254                         throw new Error("initializeWasm() must be awaited first!");
6255                 }
6256                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
6257                 return nativeResponseValue;
6258         }
6259         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
6260         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
6261                 if(!isWasmInitialized) {
6262                         throw new Error("initializeWasm() must be awaited first!");
6263                 }
6264                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
6265                 // debug statements here
6266         }
6267         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
6268         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
6269                 if(!isWasmInitialized) {
6270                         throw new Error("initializeWasm() must be awaited first!");
6271                 }
6272                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
6273                 return nativeResponseValue;
6274         }
6275         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
6276         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
6277                 if(!isWasmInitialized) {
6278                         throw new Error("initializeWasm() must be awaited first!");
6279                 }
6280                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
6281                 return nativeResponseValue;
6282         }
6283         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
6284         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
6285                 if(!isWasmInitialized) {
6286                         throw new Error("initializeWasm() must be awaited first!");
6287                 }
6288                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
6289                 return nativeResponseValue;
6290         }
6291         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
6292         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
6293                 if(!isWasmInitialized) {
6294                         throw new Error("initializeWasm() must be awaited first!");
6295                 }
6296                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
6297                 // debug statements here
6298         }
6299         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
6300         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
6301                 if(!isWasmInitialized) {
6302                         throw new Error("initializeWasm() must be awaited first!");
6303                 }
6304                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
6305                 return nativeResponseValue;
6306         }
6307         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
6308         export function CResult_InitDecodeErrorZ_ok(o: number): number {
6309                 if(!isWasmInitialized) {
6310                         throw new Error("initializeWasm() must be awaited first!");
6311                 }
6312                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
6313                 return nativeResponseValue;
6314         }
6315         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
6316         export function CResult_InitDecodeErrorZ_err(e: number): number {
6317                 if(!isWasmInitialized) {
6318                         throw new Error("initializeWasm() must be awaited first!");
6319                 }
6320                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
6321                 return nativeResponseValue;
6322         }
6323         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
6324         export function CResult_InitDecodeErrorZ_free(_res: number): void {
6325                 if(!isWasmInitialized) {
6326                         throw new Error("initializeWasm() must be awaited first!");
6327                 }
6328                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
6329                 // debug statements here
6330         }
6331         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
6332         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
6333                 if(!isWasmInitialized) {
6334                         throw new Error("initializeWasm() must be awaited first!");
6335                 }
6336                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
6337                 return nativeResponseValue;
6338         }
6339         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
6340         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
6341                 if(!isWasmInitialized) {
6342                         throw new Error("initializeWasm() must be awaited first!");
6343                 }
6344                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
6345                 return nativeResponseValue;
6346         }
6347         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
6348         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
6349                 if(!isWasmInitialized) {
6350                         throw new Error("initializeWasm() must be awaited first!");
6351                 }
6352                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
6353                 return nativeResponseValue;
6354         }
6355         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
6356         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
6357                 if(!isWasmInitialized) {
6358                         throw new Error("initializeWasm() must be awaited first!");
6359                 }
6360                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
6361                 // debug statements here
6362         }
6363         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
6364         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
6365                 if(!isWasmInitialized) {
6366                         throw new Error("initializeWasm() must be awaited first!");
6367                 }
6368                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
6369                 return nativeResponseValue;
6370         }
6371         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
6372         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
6373                 if(!isWasmInitialized) {
6374                         throw new Error("initializeWasm() must be awaited first!");
6375                 }
6376                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
6377                 return nativeResponseValue;
6378         }
6379         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
6380         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
6381                 if(!isWasmInitialized) {
6382                         throw new Error("initializeWasm() must be awaited first!");
6383                 }
6384                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
6385                 return nativeResponseValue;
6386         }
6387         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
6388         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
6389                 if(!isWasmInitialized) {
6390                         throw new Error("initializeWasm() must be awaited first!");
6391                 }
6392                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
6393                 // debug statements here
6394         }
6395         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
6396         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
6397                 if(!isWasmInitialized) {
6398                         throw new Error("initializeWasm() must be awaited first!");
6399                 }
6400                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
6401                 return nativeResponseValue;
6402         }
6403         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
6404         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
6405                 if(!isWasmInitialized) {
6406                         throw new Error("initializeWasm() must be awaited first!");
6407                 }
6408                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
6409                 return nativeResponseValue;
6410         }
6411         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
6412         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
6413                 if(!isWasmInitialized) {
6414                         throw new Error("initializeWasm() must be awaited first!");
6415                 }
6416                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
6417                 return nativeResponseValue;
6418         }
6419         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
6420         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
6421                 if(!isWasmInitialized) {
6422                         throw new Error("initializeWasm() must be awaited first!");
6423                 }
6424                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
6425                 // debug statements here
6426         }
6427         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
6428         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
6429                 if(!isWasmInitialized) {
6430                         throw new Error("initializeWasm() must be awaited first!");
6431                 }
6432                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
6433                 return nativeResponseValue;
6434         }
6435         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
6436         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
6437                 if(!isWasmInitialized) {
6438                         throw new Error("initializeWasm() must be awaited first!");
6439                 }
6440                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
6441                 return nativeResponseValue;
6442         }
6443         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6444         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
6445                 if(!isWasmInitialized) {
6446                         throw new Error("initializeWasm() must be awaited first!");
6447                 }
6448                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
6449                 return nativeResponseValue;
6450         }
6451         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
6452         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
6453                 if(!isWasmInitialized) {
6454                         throw new Error("initializeWasm() must be awaited first!");
6455                 }
6456                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
6457                 // debug statements here
6458         }
6459         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
6460         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
6461                 if(!isWasmInitialized) {
6462                         throw new Error("initializeWasm() must be awaited first!");
6463                 }
6464                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
6465                 return nativeResponseValue;
6466         }
6467         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
6468         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
6469                 if(!isWasmInitialized) {
6470                         throw new Error("initializeWasm() must be awaited first!");
6471                 }
6472                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
6473                 return nativeResponseValue;
6474         }
6475         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6476         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
6477                 if(!isWasmInitialized) {
6478                         throw new Error("initializeWasm() must be awaited first!");
6479                 }
6480                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
6481                 return nativeResponseValue;
6482         }
6483         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
6484         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
6485                 if(!isWasmInitialized) {
6486                         throw new Error("initializeWasm() must be awaited first!");
6487                 }
6488                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
6489                 // debug statements here
6490         }
6491         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
6492         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
6493                 if(!isWasmInitialized) {
6494                         throw new Error("initializeWasm() must be awaited first!");
6495                 }
6496                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
6497                 return nativeResponseValue;
6498         }
6499         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
6500         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
6501                 if(!isWasmInitialized) {
6502                         throw new Error("initializeWasm() must be awaited first!");
6503                 }
6504                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
6505                 return nativeResponseValue;
6506         }
6507         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
6508         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
6509                 if(!isWasmInitialized) {
6510                         throw new Error("initializeWasm() must be awaited first!");
6511                 }
6512                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
6513                 return nativeResponseValue;
6514         }
6515         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
6516         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
6517                 if(!isWasmInitialized) {
6518                         throw new Error("initializeWasm() must be awaited first!");
6519                 }
6520                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
6521                 // debug statements here
6522         }
6523         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
6524         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
6525                 if(!isWasmInitialized) {
6526                         throw new Error("initializeWasm() must be awaited first!");
6527                 }
6528                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
6529                 return nativeResponseValue;
6530         }
6531         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
6532         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
6533                 if(!isWasmInitialized) {
6534                         throw new Error("initializeWasm() must be awaited first!");
6535                 }
6536                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
6537                 return nativeResponseValue;
6538         }
6539         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6540         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
6541                 if(!isWasmInitialized) {
6542                         throw new Error("initializeWasm() must be awaited first!");
6543                 }
6544                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
6545                 return nativeResponseValue;
6546         }
6547         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
6548         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
6549                 if(!isWasmInitialized) {
6550                         throw new Error("initializeWasm() must be awaited first!");
6551                 }
6552                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
6553                 // debug statements here
6554         }
6555         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
6556         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
6557                 if(!isWasmInitialized) {
6558                         throw new Error("initializeWasm() must be awaited first!");
6559                 }
6560                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
6561                 return nativeResponseValue;
6562         }
6563         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
6564         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
6565                 if(!isWasmInitialized) {
6566                         throw new Error("initializeWasm() must be awaited first!");
6567                 }
6568                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
6569                 return nativeResponseValue;
6570         }
6571         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6572         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
6573                 if(!isWasmInitialized) {
6574                         throw new Error("initializeWasm() must be awaited first!");
6575                 }
6576                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
6577                 return nativeResponseValue;
6578         }
6579         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
6580         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
6581                 if(!isWasmInitialized) {
6582                         throw new Error("initializeWasm() must be awaited first!");
6583                 }
6584                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
6585                 // debug statements here
6586         }
6587         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
6588         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
6589                 if(!isWasmInitialized) {
6590                         throw new Error("initializeWasm() must be awaited first!");
6591                 }
6592                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
6593                 return nativeResponseValue;
6594         }
6595         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
6596         export function CResult_PingDecodeErrorZ_ok(o: number): number {
6597                 if(!isWasmInitialized) {
6598                         throw new Error("initializeWasm() must be awaited first!");
6599                 }
6600                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
6601                 return nativeResponseValue;
6602         }
6603         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
6604         export function CResult_PingDecodeErrorZ_err(e: number): number {
6605                 if(!isWasmInitialized) {
6606                         throw new Error("initializeWasm() must be awaited first!");
6607                 }
6608                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
6609                 return nativeResponseValue;
6610         }
6611         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
6612         export function CResult_PingDecodeErrorZ_free(_res: number): void {
6613                 if(!isWasmInitialized) {
6614                         throw new Error("initializeWasm() must be awaited first!");
6615                 }
6616                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
6617                 // debug statements here
6618         }
6619         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
6620         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
6621                 if(!isWasmInitialized) {
6622                         throw new Error("initializeWasm() must be awaited first!");
6623                 }
6624                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
6625                 return nativeResponseValue;
6626         }
6627         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
6628         export function CResult_PongDecodeErrorZ_ok(o: number): number {
6629                 if(!isWasmInitialized) {
6630                         throw new Error("initializeWasm() must be awaited first!");
6631                 }
6632                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
6633                 return nativeResponseValue;
6634         }
6635         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
6636         export function CResult_PongDecodeErrorZ_err(e: number): number {
6637                 if(!isWasmInitialized) {
6638                         throw new Error("initializeWasm() must be awaited first!");
6639                 }
6640                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
6641                 return nativeResponseValue;
6642         }
6643         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
6644         export function CResult_PongDecodeErrorZ_free(_res: number): void {
6645                 if(!isWasmInitialized) {
6646                         throw new Error("initializeWasm() must be awaited first!");
6647                 }
6648                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
6649                 // debug statements here
6650         }
6651         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
6652         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
6653                 if(!isWasmInitialized) {
6654                         throw new Error("initializeWasm() must be awaited first!");
6655                 }
6656                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
6657                 return nativeResponseValue;
6658         }
6659         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
6660         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
6661                 if(!isWasmInitialized) {
6662                         throw new Error("initializeWasm() must be awaited first!");
6663                 }
6664                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
6665                 return nativeResponseValue;
6666         }
6667         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6668         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
6669                 if(!isWasmInitialized) {
6670                         throw new Error("initializeWasm() must be awaited first!");
6671                 }
6672                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
6673                 return nativeResponseValue;
6674         }
6675         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
6676         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
6677                 if(!isWasmInitialized) {
6678                         throw new Error("initializeWasm() must be awaited first!");
6679                 }
6680                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
6681                 // debug statements here
6682         }
6683         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6684         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
6685                 if(!isWasmInitialized) {
6686                         throw new Error("initializeWasm() must be awaited first!");
6687                 }
6688                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
6689                 return nativeResponseValue;
6690         }
6691         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
6692         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
6693                 if(!isWasmInitialized) {
6694                         throw new Error("initializeWasm() must be awaited first!");
6695                 }
6696                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
6697                 return nativeResponseValue;
6698         }
6699         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6700         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
6701                 if(!isWasmInitialized) {
6702                         throw new Error("initializeWasm() must be awaited first!");
6703                 }
6704                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
6705                 return nativeResponseValue;
6706         }
6707         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
6708         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
6709                 if(!isWasmInitialized) {
6710                         throw new Error("initializeWasm() must be awaited first!");
6711                 }
6712                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
6713                 // debug statements here
6714         }
6715         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6716         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
6717                 if(!isWasmInitialized) {
6718                         throw new Error("initializeWasm() must be awaited first!");
6719                 }
6720                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
6721                 return nativeResponseValue;
6722         }
6723         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
6724         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
6725                 if(!isWasmInitialized) {
6726                         throw new Error("initializeWasm() must be awaited first!");
6727                 }
6728                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
6729                 return nativeResponseValue;
6730         }
6731         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6732         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
6733                 if(!isWasmInitialized) {
6734                         throw new Error("initializeWasm() must be awaited first!");
6735                 }
6736                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
6737                 return nativeResponseValue;
6738         }
6739         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
6740         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
6741                 if(!isWasmInitialized) {
6742                         throw new Error("initializeWasm() must be awaited first!");
6743                 }
6744                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
6745                 // debug statements here
6746         }
6747         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
6748         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
6749                 if(!isWasmInitialized) {
6750                         throw new Error("initializeWasm() must be awaited first!");
6751                 }
6752                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
6753                 return nativeResponseValue;
6754         }
6755         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
6756         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
6757                 if(!isWasmInitialized) {
6758                         throw new Error("initializeWasm() must be awaited first!");
6759                 }
6760                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
6761                 return nativeResponseValue;
6762         }
6763         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6764         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
6765                 if(!isWasmInitialized) {
6766                         throw new Error("initializeWasm() must be awaited first!");
6767                 }
6768                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
6769                 return nativeResponseValue;
6770         }
6771         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
6772         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
6773                 if(!isWasmInitialized) {
6774                         throw new Error("initializeWasm() must be awaited first!");
6775                 }
6776                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
6777                 // debug statements here
6778         }
6779         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
6780         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
6781                 if(!isWasmInitialized) {
6782                         throw new Error("initializeWasm() must be awaited first!");
6783                 }
6784                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
6785                 return nativeResponseValue;
6786         }
6787         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
6788         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
6789                 if(!isWasmInitialized) {
6790                         throw new Error("initializeWasm() must be awaited first!");
6791                 }
6792                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
6793                 return nativeResponseValue;
6794         }
6795         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
6796         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
6797                 if(!isWasmInitialized) {
6798                         throw new Error("initializeWasm() must be awaited first!");
6799                 }
6800                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
6801                 return nativeResponseValue;
6802         }
6803         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
6804         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
6805                 if(!isWasmInitialized) {
6806                         throw new Error("initializeWasm() must be awaited first!");
6807                 }
6808                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
6809                 // debug statements here
6810         }
6811         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
6812         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
6813                 if(!isWasmInitialized) {
6814                         throw new Error("initializeWasm() must be awaited first!");
6815                 }
6816                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
6817                 return nativeResponseValue;
6818         }
6819         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
6820         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
6821                 if(!isWasmInitialized) {
6822                         throw new Error("initializeWasm() must be awaited first!");
6823                 }
6824                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
6825                 return nativeResponseValue;
6826         }
6827         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6828         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
6829                 if(!isWasmInitialized) {
6830                         throw new Error("initializeWasm() must be awaited first!");
6831                 }
6832                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
6833                 return nativeResponseValue;
6834         }
6835         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
6836         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
6837                 if(!isWasmInitialized) {
6838                         throw new Error("initializeWasm() must be awaited first!");
6839                 }
6840                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
6841                 // debug statements here
6842         }
6843         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6844         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
6845                 if(!isWasmInitialized) {
6846                         throw new Error("initializeWasm() must be awaited first!");
6847                 }
6848                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
6849                 return nativeResponseValue;
6850         }
6851         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
6852         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
6853                 if(!isWasmInitialized) {
6854                         throw new Error("initializeWasm() must be awaited first!");
6855                 }
6856                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
6857                 return nativeResponseValue;
6858         }
6859         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6860         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
6861                 if(!isWasmInitialized) {
6862                         throw new Error("initializeWasm() must be awaited first!");
6863                 }
6864                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
6865                 return nativeResponseValue;
6866         }
6867         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
6868         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
6869                 if(!isWasmInitialized) {
6870                         throw new Error("initializeWasm() must be awaited first!");
6871                 }
6872                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
6873                 // debug statements here
6874         }
6875         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6876         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
6877                 if(!isWasmInitialized) {
6878                         throw new Error("initializeWasm() must be awaited first!");
6879                 }
6880                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
6881                 return nativeResponseValue;
6882         }
6883         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
6884         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
6885                 if(!isWasmInitialized) {
6886                         throw new Error("initializeWasm() must be awaited first!");
6887                 }
6888                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
6889                 return nativeResponseValue;
6890         }
6891         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
6892         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
6893                 if(!isWasmInitialized) {
6894                         throw new Error("initializeWasm() must be awaited first!");
6895                 }
6896                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
6897                 return nativeResponseValue;
6898         }
6899         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
6900         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
6901                 if(!isWasmInitialized) {
6902                         throw new Error("initializeWasm() must be awaited first!");
6903                 }
6904                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
6905                 // debug statements here
6906         }
6907         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
6908         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
6909                 if(!isWasmInitialized) {
6910                         throw new Error("initializeWasm() must be awaited first!");
6911                 }
6912                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
6913                 return nativeResponseValue;
6914         }
6915         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
6916         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
6917                 if(!isWasmInitialized) {
6918                         throw new Error("initializeWasm() must be awaited first!");
6919                 }
6920                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
6921                 return nativeResponseValue;
6922         }
6923         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
6924         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
6925                 if(!isWasmInitialized) {
6926                         throw new Error("initializeWasm() must be awaited first!");
6927                 }
6928                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
6929                 return nativeResponseValue;
6930         }
6931         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
6932         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
6933                 if(!isWasmInitialized) {
6934                         throw new Error("initializeWasm() must be awaited first!");
6935                 }
6936                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
6937                 // debug statements here
6938         }
6939         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
6940         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
6941                 if(!isWasmInitialized) {
6942                         throw new Error("initializeWasm() must be awaited first!");
6943                 }
6944                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
6945                 return nativeResponseValue;
6946         }
6947         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
6948         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
6949                 if(!isWasmInitialized) {
6950                         throw new Error("initializeWasm() must be awaited first!");
6951                 }
6952                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
6953                 return nativeResponseValue;
6954         }
6955         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
6956         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
6957                 if(!isWasmInitialized) {
6958                         throw new Error("initializeWasm() must be awaited first!");
6959                 }
6960                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
6961                 return nativeResponseValue;
6962         }
6963         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
6964         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
6965                 if(!isWasmInitialized) {
6966                         throw new Error("initializeWasm() must be awaited first!");
6967                 }
6968                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
6969                 // debug statements here
6970         }
6971         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
6972         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
6973                 if(!isWasmInitialized) {
6974                         throw new Error("initializeWasm() must be awaited first!");
6975                 }
6976                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
6977                 return nativeResponseValue;
6978         }
6979         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
6980         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
6981                 if(!isWasmInitialized) {
6982                         throw new Error("initializeWasm() must be awaited first!");
6983                 }
6984                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
6985                 return nativeResponseValue;
6986         }
6987         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
6988         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
6989                 if(!isWasmInitialized) {
6990                         throw new Error("initializeWasm() must be awaited first!");
6991                 }
6992                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
6993                 return nativeResponseValue;
6994         }
6995         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
6996         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
6997                 if(!isWasmInitialized) {
6998                         throw new Error("initializeWasm() must be awaited first!");
6999                 }
7000                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
7001                 // debug statements here
7002         }
7003         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
7004         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
7005                 if(!isWasmInitialized) {
7006                         throw new Error("initializeWasm() must be awaited first!");
7007                 }
7008                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
7009                 return nativeResponseValue;
7010         }
7011         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
7012         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
7013                 if(!isWasmInitialized) {
7014                         throw new Error("initializeWasm() must be awaited first!");
7015                 }
7016                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
7017                 return nativeResponseValue;
7018         }
7019         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
7020         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
7021                 if(!isWasmInitialized) {
7022                         throw new Error("initializeWasm() must be awaited first!");
7023                 }
7024                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
7025                 return nativeResponseValue;
7026         }
7027         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
7028         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
7029                 if(!isWasmInitialized) {
7030                         throw new Error("initializeWasm() must be awaited first!");
7031                 }
7032                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
7033                 // debug statements here
7034         }
7035         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
7036         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
7037                 if(!isWasmInitialized) {
7038                         throw new Error("initializeWasm() must be awaited first!");
7039                 }
7040                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
7041                 return nativeResponseValue;
7042         }
7043         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
7044         export function CResult_InvoiceSignOrCreationErrorZ_ok(o: number): number {
7045                 if(!isWasmInitialized) {
7046                         throw new Error("initializeWasm() must be awaited first!");
7047                 }
7048                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_ok(o);
7049                 return nativeResponseValue;
7050         }
7051         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
7052         export function CResult_InvoiceSignOrCreationErrorZ_err(e: number): number {
7053                 if(!isWasmInitialized) {
7054                         throw new Error("initializeWasm() must be awaited first!");
7055                 }
7056                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_err(e);
7057                 return nativeResponseValue;
7058         }
7059         // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
7060         export function CResult_InvoiceSignOrCreationErrorZ_free(_res: number): void {
7061                 if(!isWasmInitialized) {
7062                         throw new Error("initializeWasm() must be awaited first!");
7063                 }
7064                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_free(_res);
7065                 // debug statements here
7066         }
7067         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
7068         export function CResult_InvoiceSignOrCreationErrorZ_clone(orig: number): number {
7069                 if(!isWasmInitialized) {
7070                         throw new Error("initializeWasm() must be awaited first!");
7071                 }
7072                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone(orig);
7073                 return nativeResponseValue;
7074         }
7075         // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
7076         export function COption_FilterZ_some(o: number): number {
7077                 if(!isWasmInitialized) {
7078                         throw new Error("initializeWasm() must be awaited first!");
7079                 }
7080                 const nativeResponseValue = wasm.COption_FilterZ_some(o);
7081                 return nativeResponseValue;
7082         }
7083         // struct LDKCOption_FilterZ COption_FilterZ_none(void);
7084         export function COption_FilterZ_none(): number {
7085                 if(!isWasmInitialized) {
7086                         throw new Error("initializeWasm() must be awaited first!");
7087                 }
7088                 const nativeResponseValue = wasm.COption_FilterZ_none();
7089                 return nativeResponseValue;
7090         }
7091         // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
7092         export function COption_FilterZ_free(_res: number): void {
7093                 if(!isWasmInitialized) {
7094                         throw new Error("initializeWasm() must be awaited first!");
7095                 }
7096                 const nativeResponseValue = wasm.COption_FilterZ_free(_res);
7097                 // debug statements here
7098         }
7099         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
7100         export function CResult_LockedChannelMonitorNoneZ_ok(o: number): number {
7101                 if(!isWasmInitialized) {
7102                         throw new Error("initializeWasm() must be awaited first!");
7103                 }
7104                 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_ok(o);
7105                 return nativeResponseValue;
7106         }
7107         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
7108         export function CResult_LockedChannelMonitorNoneZ_err(): number {
7109                 if(!isWasmInitialized) {
7110                         throw new Error("initializeWasm() must be awaited first!");
7111                 }
7112                 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_err();
7113                 return nativeResponseValue;
7114         }
7115         // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
7116         export function CResult_LockedChannelMonitorNoneZ_free(_res: number): void {
7117                 if(!isWasmInitialized) {
7118                         throw new Error("initializeWasm() must be awaited first!");
7119                 }
7120                 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_free(_res);
7121                 // debug statements here
7122         }
7123         // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
7124         export function CVec_OutPointZ_free(_res: number[]): void {
7125                 if(!isWasmInitialized) {
7126                         throw new Error("initializeWasm() must be awaited first!");
7127                 }
7128                 const nativeResponseValue = wasm.CVec_OutPointZ_free(_res);
7129                 // debug statements here
7130         }
7131         // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
7132         export function PaymentPurpose_free(this_ptr: number): void {
7133                 if(!isWasmInitialized) {
7134                         throw new Error("initializeWasm() must be awaited first!");
7135                 }
7136                 const nativeResponseValue = wasm.PaymentPurpose_free(this_ptr);
7137                 // debug statements here
7138         }
7139         // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
7140         export function PaymentPurpose_clone(orig: number): number {
7141                 if(!isWasmInitialized) {
7142                         throw new Error("initializeWasm() must be awaited first!");
7143                 }
7144                 const nativeResponseValue = wasm.PaymentPurpose_clone(orig);
7145                 return nativeResponseValue;
7146         }
7147         // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t user_payment_id);
7148         export function PaymentPurpose_invoice_payment(payment_preimage: Uint8Array, payment_secret: Uint8Array, user_payment_id: number): number {
7149                 if(!isWasmInitialized) {
7150                         throw new Error("initializeWasm() must be awaited first!");
7151                 }
7152                 const nativeResponseValue = wasm.PaymentPurpose_invoice_payment(encodeArray(payment_preimage), encodeArray(payment_secret), user_payment_id);
7153                 return nativeResponseValue;
7154         }
7155         // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
7156         export function PaymentPurpose_spontaneous_payment(a: Uint8Array): number {
7157                 if(!isWasmInitialized) {
7158                         throw new Error("initializeWasm() must be awaited first!");
7159                 }
7160                 const nativeResponseValue = wasm.PaymentPurpose_spontaneous_payment(encodeArray(a));
7161                 return nativeResponseValue;
7162         }
7163         // void ClosureReason_free(struct LDKClosureReason this_ptr);
7164         export function ClosureReason_free(this_ptr: number): void {
7165                 if(!isWasmInitialized) {
7166                         throw new Error("initializeWasm() must be awaited first!");
7167                 }
7168                 const nativeResponseValue = wasm.ClosureReason_free(this_ptr);
7169                 // debug statements here
7170         }
7171         // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
7172         export function ClosureReason_clone(orig: number): number {
7173                 if(!isWasmInitialized) {
7174                         throw new Error("initializeWasm() must be awaited first!");
7175                 }
7176                 const nativeResponseValue = wasm.ClosureReason_clone(orig);
7177                 return nativeResponseValue;
7178         }
7179         // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
7180         export function ClosureReason_counterparty_force_closed(peer_msg: String): number {
7181                 if(!isWasmInitialized) {
7182                         throw new Error("initializeWasm() must be awaited first!");
7183                 }
7184                 const nativeResponseValue = wasm.ClosureReason_counterparty_force_closed(peer_msg);
7185                 return nativeResponseValue;
7186         }
7187         // struct LDKClosureReason ClosureReason_holder_force_closed(void);
7188         export function ClosureReason_holder_force_closed(): number {
7189                 if(!isWasmInitialized) {
7190                         throw new Error("initializeWasm() must be awaited first!");
7191                 }
7192                 const nativeResponseValue = wasm.ClosureReason_holder_force_closed();
7193                 return nativeResponseValue;
7194         }
7195         // struct LDKClosureReason ClosureReason_cooperative_closure(void);
7196         export function ClosureReason_cooperative_closure(): number {
7197                 if(!isWasmInitialized) {
7198                         throw new Error("initializeWasm() must be awaited first!");
7199                 }
7200                 const nativeResponseValue = wasm.ClosureReason_cooperative_closure();
7201                 return nativeResponseValue;
7202         }
7203         // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
7204         export function ClosureReason_commitment_tx_confirmed(): number {
7205                 if(!isWasmInitialized) {
7206                         throw new Error("initializeWasm() must be awaited first!");
7207                 }
7208                 const nativeResponseValue = wasm.ClosureReason_commitment_tx_confirmed();
7209                 return nativeResponseValue;
7210         }
7211         // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
7212         export function ClosureReason_processing_error(err: String): number {
7213                 if(!isWasmInitialized) {
7214                         throw new Error("initializeWasm() must be awaited first!");
7215                 }
7216                 const nativeResponseValue = wasm.ClosureReason_processing_error(err);
7217                 return nativeResponseValue;
7218         }
7219         // struct LDKClosureReason ClosureReason_disconnected_peer(void);
7220         export function ClosureReason_disconnected_peer(): number {
7221                 if(!isWasmInitialized) {
7222                         throw new Error("initializeWasm() must be awaited first!");
7223                 }
7224                 const nativeResponseValue = wasm.ClosureReason_disconnected_peer();
7225                 return nativeResponseValue;
7226         }
7227         // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
7228         export function ClosureReason_outdated_channel_manager(): number {
7229                 if(!isWasmInitialized) {
7230                         throw new Error("initializeWasm() must be awaited first!");
7231                 }
7232                 const nativeResponseValue = wasm.ClosureReason_outdated_channel_manager();
7233                 return nativeResponseValue;
7234         }
7235         // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
7236         export function ClosureReason_write(obj: number): Uint8Array {
7237                 if(!isWasmInitialized) {
7238                         throw new Error("initializeWasm() must be awaited first!");
7239                 }
7240                 const nativeResponseValue = wasm.ClosureReason_write(obj);
7241                 return decodeArray(nativeResponseValue);
7242         }
7243         // void Event_free(struct LDKEvent this_ptr);
7244         export function Event_free(this_ptr: number): void {
7245                 if(!isWasmInitialized) {
7246                         throw new Error("initializeWasm() must be awaited first!");
7247                 }
7248                 const nativeResponseValue = wasm.Event_free(this_ptr);
7249                 // debug statements here
7250         }
7251         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
7252         export function Event_clone(orig: number): number {
7253                 if(!isWasmInitialized) {
7254                         throw new Error("initializeWasm() must be awaited first!");
7255                 }
7256                 const nativeResponseValue = wasm.Event_clone(orig);
7257                 return nativeResponseValue;
7258         }
7259         // 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);
7260         export function Event_funding_generation_ready(temporary_channel_id: Uint8Array, channel_value_satoshis: number, output_script: Uint8Array, user_channel_id: number): number {
7261                 if(!isWasmInitialized) {
7262                         throw new Error("initializeWasm() must be awaited first!");
7263                 }
7264                 const nativeResponseValue = wasm.Event_funding_generation_ready(encodeArray(temporary_channel_id), channel_value_satoshis, encodeArray(output_script), user_channel_id);
7265                 return nativeResponseValue;
7266         }
7267         // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
7268         export function Event_payment_received(payment_hash: Uint8Array, amt: number, purpose: number): number {
7269                 if(!isWasmInitialized) {
7270                         throw new Error("initializeWasm() must be awaited first!");
7271                 }
7272                 const nativeResponseValue = wasm.Event_payment_received(encodeArray(payment_hash), amt, purpose);
7273                 return nativeResponseValue;
7274         }
7275         // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z fee_paid_msat);
7276         export function Event_payment_sent(payment_id: Uint8Array, payment_preimage: Uint8Array, payment_hash: Uint8Array, fee_paid_msat: number): number {
7277                 if(!isWasmInitialized) {
7278                         throw new Error("initializeWasm() must be awaited first!");
7279                 }
7280                 const nativeResponseValue = wasm.Event_payment_sent(encodeArray(payment_id), encodeArray(payment_preimage), encodeArray(payment_hash), fee_paid_msat);
7281                 return nativeResponseValue;
7282         }
7283         // struct LDKEvent Event_payment_path_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, bool rejected_by_dest, struct LDKCOption_NetworkUpdateZ network_update, bool all_paths_failed, struct LDKCVec_RouteHopZ path, struct LDKCOption_u64Z short_channel_id, struct LDKRouteParameters retry);
7284         export function Event_payment_path_failed(payment_id: Uint8Array, payment_hash: Uint8Array, rejected_by_dest: boolean, network_update: number, all_paths_failed: boolean, path: number[], short_channel_id: number, retry: number): number {
7285                 if(!isWasmInitialized) {
7286                         throw new Error("initializeWasm() must be awaited first!");
7287                 }
7288                 const nativeResponseValue = wasm.Event_payment_path_failed(encodeArray(payment_id), encodeArray(payment_hash), rejected_by_dest, network_update, all_paths_failed, path, short_channel_id, retry);
7289                 return nativeResponseValue;
7290         }
7291         // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
7292         export function Event_pending_htlcs_forwardable(time_forwardable: number): number {
7293                 if(!isWasmInitialized) {
7294                         throw new Error("initializeWasm() must be awaited first!");
7295                 }
7296                 const nativeResponseValue = wasm.Event_pending_htlcs_forwardable(time_forwardable);
7297                 return nativeResponseValue;
7298         }
7299         // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
7300         export function Event_spendable_outputs(outputs: number[]): number {
7301                 if(!isWasmInitialized) {
7302                         throw new Error("initializeWasm() must be awaited first!");
7303                 }
7304                 const nativeResponseValue = wasm.Event_spendable_outputs(outputs);
7305                 return nativeResponseValue;
7306         }
7307         // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
7308         export function Event_payment_forwarded(fee_earned_msat: number, claim_from_onchain_tx: boolean): number {
7309                 if(!isWasmInitialized) {
7310                         throw new Error("initializeWasm() must be awaited first!");
7311                 }
7312                 const nativeResponseValue = wasm.Event_payment_forwarded(fee_earned_msat, claim_from_onchain_tx);
7313                 return nativeResponseValue;
7314         }
7315         // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, uint64_t user_channel_id, struct LDKClosureReason reason);
7316         export function Event_channel_closed(channel_id: Uint8Array, user_channel_id: number, reason: number): number {
7317                 if(!isWasmInitialized) {
7318                         throw new Error("initializeWasm() must be awaited first!");
7319                 }
7320                 const nativeResponseValue = wasm.Event_channel_closed(encodeArray(channel_id), user_channel_id, reason);
7321                 return nativeResponseValue;
7322         }
7323         // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
7324         export function Event_discard_funding(channel_id: Uint8Array, transaction: Uint8Array): number {
7325                 if(!isWasmInitialized) {
7326                         throw new Error("initializeWasm() must be awaited first!");
7327                 }
7328                 const nativeResponseValue = wasm.Event_discard_funding(encodeArray(channel_id), encodeArray(transaction));
7329                 return nativeResponseValue;
7330         }
7331         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
7332         export function Event_write(obj: number): Uint8Array {
7333                 if(!isWasmInitialized) {
7334                         throw new Error("initializeWasm() must be awaited first!");
7335                 }
7336                 const nativeResponseValue = wasm.Event_write(obj);
7337                 return decodeArray(nativeResponseValue);
7338         }
7339         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
7340         export function MessageSendEvent_free(this_ptr: number): void {
7341                 if(!isWasmInitialized) {
7342                         throw new Error("initializeWasm() must be awaited first!");
7343                 }
7344                 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
7345                 // debug statements here
7346         }
7347         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
7348         export function MessageSendEvent_clone(orig: number): number {
7349                 if(!isWasmInitialized) {
7350                         throw new Error("initializeWasm() must be awaited first!");
7351                 }
7352                 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
7353                 return nativeResponseValue;
7354         }
7355         // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
7356         export function MessageSendEvent_send_accept_channel(node_id: Uint8Array, msg: number): number {
7357                 if(!isWasmInitialized) {
7358                         throw new Error("initializeWasm() must be awaited first!");
7359                 }
7360                 const nativeResponseValue = wasm.MessageSendEvent_send_accept_channel(encodeArray(node_id), msg);
7361                 return nativeResponseValue;
7362         }
7363         // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
7364         export function MessageSendEvent_send_open_channel(node_id: Uint8Array, msg: number): number {
7365                 if(!isWasmInitialized) {
7366                         throw new Error("initializeWasm() must be awaited first!");
7367                 }
7368                 const nativeResponseValue = wasm.MessageSendEvent_send_open_channel(encodeArray(node_id), msg);
7369                 return nativeResponseValue;
7370         }
7371         // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
7372         export function MessageSendEvent_send_funding_created(node_id: Uint8Array, msg: number): number {
7373                 if(!isWasmInitialized) {
7374                         throw new Error("initializeWasm() must be awaited first!");
7375                 }
7376                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_created(encodeArray(node_id), msg);
7377                 return nativeResponseValue;
7378         }
7379         // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
7380         export function MessageSendEvent_send_funding_signed(node_id: Uint8Array, msg: number): number {
7381                 if(!isWasmInitialized) {
7382                         throw new Error("initializeWasm() must be awaited first!");
7383                 }
7384                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_signed(encodeArray(node_id), msg);
7385                 return nativeResponseValue;
7386         }
7387         // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
7388         export function MessageSendEvent_send_funding_locked(node_id: Uint8Array, msg: number): number {
7389                 if(!isWasmInitialized) {
7390                         throw new Error("initializeWasm() must be awaited first!");
7391                 }
7392                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_locked(encodeArray(node_id), msg);
7393                 return nativeResponseValue;
7394         }
7395         // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
7396         export function MessageSendEvent_send_announcement_signatures(node_id: Uint8Array, msg: number): number {
7397                 if(!isWasmInitialized) {
7398                         throw new Error("initializeWasm() must be awaited first!");
7399                 }
7400                 const nativeResponseValue = wasm.MessageSendEvent_send_announcement_signatures(encodeArray(node_id), msg);
7401                 return nativeResponseValue;
7402         }
7403         // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
7404         export function MessageSendEvent_update_htlcs(node_id: Uint8Array, updates: number): number {
7405                 if(!isWasmInitialized) {
7406                         throw new Error("initializeWasm() must be awaited first!");
7407                 }
7408                 const nativeResponseValue = wasm.MessageSendEvent_update_htlcs(encodeArray(node_id), updates);
7409                 return nativeResponseValue;
7410         }
7411         // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
7412         export function MessageSendEvent_send_revoke_and_ack(node_id: Uint8Array, msg: number): number {
7413                 if(!isWasmInitialized) {
7414                         throw new Error("initializeWasm() must be awaited first!");
7415                 }
7416                 const nativeResponseValue = wasm.MessageSendEvent_send_revoke_and_ack(encodeArray(node_id), msg);
7417                 return nativeResponseValue;
7418         }
7419         // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
7420         export function MessageSendEvent_send_closing_signed(node_id: Uint8Array, msg: number): number {
7421                 if(!isWasmInitialized) {
7422                         throw new Error("initializeWasm() must be awaited first!");
7423                 }
7424                 const nativeResponseValue = wasm.MessageSendEvent_send_closing_signed(encodeArray(node_id), msg);
7425                 return nativeResponseValue;
7426         }
7427         // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
7428         export function MessageSendEvent_send_shutdown(node_id: Uint8Array, msg: number): number {
7429                 if(!isWasmInitialized) {
7430                         throw new Error("initializeWasm() must be awaited first!");
7431                 }
7432                 const nativeResponseValue = wasm.MessageSendEvent_send_shutdown(encodeArray(node_id), msg);
7433                 return nativeResponseValue;
7434         }
7435         // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
7436         export function MessageSendEvent_send_channel_reestablish(node_id: Uint8Array, msg: number): number {
7437                 if(!isWasmInitialized) {
7438                         throw new Error("initializeWasm() must be awaited first!");
7439                 }
7440                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_reestablish(encodeArray(node_id), msg);
7441                 return nativeResponseValue;
7442         }
7443         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
7444         export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
7445                 if(!isWasmInitialized) {
7446                         throw new Error("initializeWasm() must be awaited first!");
7447                 }
7448                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
7449                 return nativeResponseValue;
7450         }
7451         // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
7452         export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
7453                 if(!isWasmInitialized) {
7454                         throw new Error("initializeWasm() must be awaited first!");
7455                 }
7456                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_node_announcement(msg);
7457                 return nativeResponseValue;
7458         }
7459         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
7460         export function MessageSendEvent_broadcast_channel_update(msg: number): number {
7461                 if(!isWasmInitialized) {
7462                         throw new Error("initializeWasm() must be awaited first!");
7463                 }
7464                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_update(msg);
7465                 return nativeResponseValue;
7466         }
7467         // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
7468         export function MessageSendEvent_send_channel_update(node_id: Uint8Array, msg: number): number {
7469                 if(!isWasmInitialized) {
7470                         throw new Error("initializeWasm() must be awaited first!");
7471                 }
7472                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_update(encodeArray(node_id), msg);
7473                 return nativeResponseValue;
7474         }
7475         // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
7476         export function MessageSendEvent_handle_error(node_id: Uint8Array, action: number): number {
7477                 if(!isWasmInitialized) {
7478                         throw new Error("initializeWasm() must be awaited first!");
7479                 }
7480                 const nativeResponseValue = wasm.MessageSendEvent_handle_error(encodeArray(node_id), action);
7481                 return nativeResponseValue;
7482         }
7483         // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
7484         export function MessageSendEvent_send_channel_range_query(node_id: Uint8Array, msg: number): number {
7485                 if(!isWasmInitialized) {
7486                         throw new Error("initializeWasm() must be awaited first!");
7487                 }
7488                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_range_query(encodeArray(node_id), msg);
7489                 return nativeResponseValue;
7490         }
7491         // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
7492         export function MessageSendEvent_send_short_ids_query(node_id: Uint8Array, msg: number): number {
7493                 if(!isWasmInitialized) {
7494                         throw new Error("initializeWasm() must be awaited first!");
7495                 }
7496                 const nativeResponseValue = wasm.MessageSendEvent_send_short_ids_query(encodeArray(node_id), msg);
7497                 return nativeResponseValue;
7498         }
7499         // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
7500         export function MessageSendEvent_send_reply_channel_range(node_id: Uint8Array, msg: number): number {
7501                 if(!isWasmInitialized) {
7502                         throw new Error("initializeWasm() must be awaited first!");
7503                 }
7504                 const nativeResponseValue = wasm.MessageSendEvent_send_reply_channel_range(encodeArray(node_id), msg);
7505                 return nativeResponseValue;
7506         }
7507         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
7508         export function MessageSendEventsProvider_free(this_ptr: number): void {
7509                 if(!isWasmInitialized) {
7510                         throw new Error("initializeWasm() must be awaited first!");
7511                 }
7512                 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
7513                 // debug statements here
7514         }
7515         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
7516         export function EventsProvider_free(this_ptr: number): void {
7517                 if(!isWasmInitialized) {
7518                         throw new Error("initializeWasm() must be awaited first!");
7519                 }
7520                 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
7521                 // debug statements here
7522         }
7523         // void EventHandler_free(struct LDKEventHandler this_ptr);
7524         export function EventHandler_free(this_ptr: number): void {
7525                 if(!isWasmInitialized) {
7526                         throw new Error("initializeWasm() must be awaited first!");
7527                 }
7528                 const nativeResponseValue = wasm.EventHandler_free(this_ptr);
7529                 // debug statements here
7530         }
7531         // void APIError_free(struct LDKAPIError this_ptr);
7532         export function APIError_free(this_ptr: number): void {
7533                 if(!isWasmInitialized) {
7534                         throw new Error("initializeWasm() must be awaited first!");
7535                 }
7536                 const nativeResponseValue = wasm.APIError_free(this_ptr);
7537                 // debug statements here
7538         }
7539         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
7540         export function APIError_clone(orig: number): number {
7541                 if(!isWasmInitialized) {
7542                         throw new Error("initializeWasm() must be awaited first!");
7543                 }
7544                 const nativeResponseValue = wasm.APIError_clone(orig);
7545                 return nativeResponseValue;
7546         }
7547         // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
7548         export function APIError_apimisuse_error(err: String): number {
7549                 if(!isWasmInitialized) {
7550                         throw new Error("initializeWasm() must be awaited first!");
7551                 }
7552                 const nativeResponseValue = wasm.APIError_apimisuse_error(err);
7553                 return nativeResponseValue;
7554         }
7555         // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
7556         export function APIError_fee_rate_too_high(err: String, feerate: number): number {
7557                 if(!isWasmInitialized) {
7558                         throw new Error("initializeWasm() must be awaited first!");
7559                 }
7560                 const nativeResponseValue = wasm.APIError_fee_rate_too_high(err, feerate);
7561                 return nativeResponseValue;
7562         }
7563         // struct LDKAPIError APIError_route_error(struct LDKStr err);
7564         export function APIError_route_error(err: String): number {
7565                 if(!isWasmInitialized) {
7566                         throw new Error("initializeWasm() must be awaited first!");
7567                 }
7568                 const nativeResponseValue = wasm.APIError_route_error(err);
7569                 return nativeResponseValue;
7570         }
7571         // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
7572         export function APIError_channel_unavailable(err: String): number {
7573                 if(!isWasmInitialized) {
7574                         throw new Error("initializeWasm() must be awaited first!");
7575                 }
7576                 const nativeResponseValue = wasm.APIError_channel_unavailable(err);
7577                 return nativeResponseValue;
7578         }
7579         // struct LDKAPIError APIError_monitor_update_failed(void);
7580         export function APIError_monitor_update_failed(): number {
7581                 if(!isWasmInitialized) {
7582                         throw new Error("initializeWasm() must be awaited first!");
7583                 }
7584                 const nativeResponseValue = wasm.APIError_monitor_update_failed();
7585                 return nativeResponseValue;
7586         }
7587         // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
7588         export function APIError_incompatible_shutdown_script(script: number): number {
7589                 if(!isWasmInitialized) {
7590                         throw new Error("initializeWasm() must be awaited first!");
7591                 }
7592                 const nativeResponseValue = wasm.APIError_incompatible_shutdown_script(script);
7593                 return nativeResponseValue;
7594         }
7595         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
7596         export function sign(msg: Uint8Array, sk: Uint8Array): number {
7597                 if(!isWasmInitialized) {
7598                         throw new Error("initializeWasm() must be awaited first!");
7599                 }
7600                 const nativeResponseValue = wasm.sign(encodeArray(msg), encodeArray(sk));
7601                 return nativeResponseValue;
7602         }
7603         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
7604         export function recover_pk(msg: Uint8Array, sig: String): number {
7605                 if(!isWasmInitialized) {
7606                         throw new Error("initializeWasm() must be awaited first!");
7607                 }
7608                 const nativeResponseValue = wasm.recover_pk(encodeArray(msg), sig);
7609                 return nativeResponseValue;
7610         }
7611         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
7612         export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
7613                 if(!isWasmInitialized) {
7614                         throw new Error("initializeWasm() must be awaited first!");
7615                 }
7616                 const nativeResponseValue = wasm.verify(encodeArray(msg), sig, encodeArray(pk));
7617                 return nativeResponseValue;
7618         }
7619         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
7620         export function Level_clone(orig: number): Level {
7621                 if(!isWasmInitialized) {
7622                         throw new Error("initializeWasm() must be awaited first!");
7623                 }
7624                 const nativeResponseValue = wasm.Level_clone(orig);
7625                 return nativeResponseValue;
7626         }
7627         // enum LDKLevel Level_trace(void);
7628         export function Level_trace(): Level {
7629                 if(!isWasmInitialized) {
7630                         throw new Error("initializeWasm() must be awaited first!");
7631                 }
7632                 const nativeResponseValue = wasm.Level_trace();
7633                 return nativeResponseValue;
7634         }
7635         // enum LDKLevel Level_debug(void);
7636         export function Level_debug(): Level {
7637                 if(!isWasmInitialized) {
7638                         throw new Error("initializeWasm() must be awaited first!");
7639                 }
7640                 const nativeResponseValue = wasm.Level_debug();
7641                 return nativeResponseValue;
7642         }
7643         // enum LDKLevel Level_info(void);
7644         export function Level_info(): Level {
7645                 if(!isWasmInitialized) {
7646                         throw new Error("initializeWasm() must be awaited first!");
7647                 }
7648                 const nativeResponseValue = wasm.Level_info();
7649                 return nativeResponseValue;
7650         }
7651         // enum LDKLevel Level_warn(void);
7652         export function Level_warn(): Level {
7653                 if(!isWasmInitialized) {
7654                         throw new Error("initializeWasm() must be awaited first!");
7655                 }
7656                 const nativeResponseValue = wasm.Level_warn();
7657                 return nativeResponseValue;
7658         }
7659         // enum LDKLevel Level_error(void);
7660         export function Level_error(): Level {
7661                 if(!isWasmInitialized) {
7662                         throw new Error("initializeWasm() must be awaited first!");
7663                 }
7664                 const nativeResponseValue = wasm.Level_error();
7665                 return nativeResponseValue;
7666         }
7667         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
7668         export function Level_eq(a: number, b: number): boolean {
7669                 if(!isWasmInitialized) {
7670                         throw new Error("initializeWasm() must be awaited first!");
7671                 }
7672                 const nativeResponseValue = wasm.Level_eq(a, b);
7673                 return nativeResponseValue;
7674         }
7675         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
7676         export function Level_hash(o: number): number {
7677                 if(!isWasmInitialized) {
7678                         throw new Error("initializeWasm() must be awaited first!");
7679                 }
7680                 const nativeResponseValue = wasm.Level_hash(o);
7681                 return nativeResponseValue;
7682         }
7683         // MUST_USE_RES enum LDKLevel Level_max(void);
7684         export function Level_max(): Level {
7685                 if(!isWasmInitialized) {
7686                         throw new Error("initializeWasm() must be awaited first!");
7687                 }
7688                 const nativeResponseValue = wasm.Level_max();
7689                 return nativeResponseValue;
7690         }
7691         // void Logger_free(struct LDKLogger this_ptr);
7692         export function Logger_free(this_ptr: number): void {
7693                 if(!isWasmInitialized) {
7694                         throw new Error("initializeWasm() must be awaited first!");
7695                 }
7696                 const nativeResponseValue = wasm.Logger_free(this_ptr);
7697                 // debug statements here
7698         }
7699         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
7700         export function ChannelHandshakeConfig_free(this_obj: number): void {
7701                 if(!isWasmInitialized) {
7702                         throw new Error("initializeWasm() must be awaited first!");
7703                 }
7704                 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
7705                 // debug statements here
7706         }
7707         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
7708         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
7709                 if(!isWasmInitialized) {
7710                         throw new Error("initializeWasm() must be awaited first!");
7711                 }
7712                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
7713                 return nativeResponseValue;
7714         }
7715         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
7716         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
7717                 if(!isWasmInitialized) {
7718                         throw new Error("initializeWasm() must be awaited first!");
7719                 }
7720                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
7721                 // debug statements here
7722         }
7723         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
7724         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
7725                 if(!isWasmInitialized) {
7726                         throw new Error("initializeWasm() must be awaited first!");
7727                 }
7728                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
7729                 return nativeResponseValue;
7730         }
7731         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
7732         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
7733                 if(!isWasmInitialized) {
7734                         throw new Error("initializeWasm() must be awaited first!");
7735                 }
7736                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
7737                 // debug statements here
7738         }
7739         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
7740         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
7741                 if(!isWasmInitialized) {
7742                         throw new Error("initializeWasm() must be awaited first!");
7743                 }
7744                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
7745                 return nativeResponseValue;
7746         }
7747         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
7748         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
7749                 if(!isWasmInitialized) {
7750                         throw new Error("initializeWasm() must be awaited first!");
7751                 }
7752                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
7753                 // debug statements here
7754         }
7755         // 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);
7756         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
7757                 if(!isWasmInitialized) {
7758                         throw new Error("initializeWasm() must be awaited first!");
7759                 }
7760                 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
7761                 return nativeResponseValue;
7762         }
7763         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
7764         export function ChannelHandshakeConfig_clone(orig: number): number {
7765                 if(!isWasmInitialized) {
7766                         throw new Error("initializeWasm() must be awaited first!");
7767                 }
7768                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
7769                 return nativeResponseValue;
7770         }
7771         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
7772         export function ChannelHandshakeConfig_default(): number {
7773                 if(!isWasmInitialized) {
7774                         throw new Error("initializeWasm() must be awaited first!");
7775                 }
7776                 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
7777                 return nativeResponseValue;
7778         }
7779         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
7780         export function ChannelHandshakeLimits_free(this_obj: number): void {
7781                 if(!isWasmInitialized) {
7782                         throw new Error("initializeWasm() must be awaited first!");
7783                 }
7784                 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
7785                 // debug statements here
7786         }
7787         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7788         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
7789                 if(!isWasmInitialized) {
7790                         throw new Error("initializeWasm() must be awaited first!");
7791                 }
7792                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
7793                 return nativeResponseValue;
7794         }
7795         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7796         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
7797                 if(!isWasmInitialized) {
7798                         throw new Error("initializeWasm() must be awaited first!");
7799                 }
7800                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
7801                 // debug statements here
7802         }
7803         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7804         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
7805                 if(!isWasmInitialized) {
7806                         throw new Error("initializeWasm() must be awaited first!");
7807                 }
7808                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
7809                 return nativeResponseValue;
7810         }
7811         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7812         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
7813                 if(!isWasmInitialized) {
7814                         throw new Error("initializeWasm() must be awaited first!");
7815                 }
7816                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
7817                 // debug statements here
7818         }
7819         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7820         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
7821                 if(!isWasmInitialized) {
7822                         throw new Error("initializeWasm() must be awaited first!");
7823                 }
7824                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
7825                 return nativeResponseValue;
7826         }
7827         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7828         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7829                 if(!isWasmInitialized) {
7830                         throw new Error("initializeWasm() must be awaited first!");
7831                 }
7832                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
7833                 // debug statements here
7834         }
7835         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7836         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
7837                 if(!isWasmInitialized) {
7838                         throw new Error("initializeWasm() must be awaited first!");
7839                 }
7840                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
7841                 return nativeResponseValue;
7842         }
7843         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7844         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
7845                 if(!isWasmInitialized) {
7846                         throw new Error("initializeWasm() must be awaited first!");
7847                 }
7848                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
7849                 // debug statements here
7850         }
7851         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7852         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
7853                 if(!isWasmInitialized) {
7854                         throw new Error("initializeWasm() must be awaited first!");
7855                 }
7856                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
7857                 return nativeResponseValue;
7858         }
7859         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
7860         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
7861                 if(!isWasmInitialized) {
7862                         throw new Error("initializeWasm() must be awaited first!");
7863                 }
7864                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
7865                 // debug statements here
7866         }
7867         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7868         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
7869                 if(!isWasmInitialized) {
7870                         throw new Error("initializeWasm() must be awaited first!");
7871                 }
7872                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
7873                 return nativeResponseValue;
7874         }
7875         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
7876         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
7877                 if(!isWasmInitialized) {
7878                         throw new Error("initializeWasm() must be awaited first!");
7879                 }
7880                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
7881                 // debug statements here
7882         }
7883         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7884         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
7885                 if(!isWasmInitialized) {
7886                         throw new Error("initializeWasm() must be awaited first!");
7887                 }
7888                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
7889                 return nativeResponseValue;
7890         }
7891         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
7892         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
7893                 if(!isWasmInitialized) {
7894                         throw new Error("initializeWasm() must be awaited first!");
7895                 }
7896                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
7897                 // debug statements here
7898         }
7899         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7900         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
7901                 if(!isWasmInitialized) {
7902                         throw new Error("initializeWasm() must be awaited first!");
7903                 }
7904                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
7905                 return nativeResponseValue;
7906         }
7907         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
7908         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
7909                 if(!isWasmInitialized) {
7910                         throw new Error("initializeWasm() must be awaited first!");
7911                 }
7912                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
7913                 // debug statements here
7914         }
7915         // 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);
7916         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 {
7917                 if(!isWasmInitialized) {
7918                         throw new Error("initializeWasm() must be awaited first!");
7919                 }
7920                 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);
7921                 return nativeResponseValue;
7922         }
7923         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
7924         export function ChannelHandshakeLimits_clone(orig: number): number {
7925                 if(!isWasmInitialized) {
7926                         throw new Error("initializeWasm() must be awaited first!");
7927                 }
7928                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
7929                 return nativeResponseValue;
7930         }
7931         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
7932         export function ChannelHandshakeLimits_default(): number {
7933                 if(!isWasmInitialized) {
7934                         throw new Error("initializeWasm() must be awaited first!");
7935                 }
7936                 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
7937                 return nativeResponseValue;
7938         }
7939         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
7940         export function ChannelConfig_free(this_obj: number): void {
7941                 if(!isWasmInitialized) {
7942                         throw new Error("initializeWasm() must be awaited first!");
7943                 }
7944                 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
7945                 // debug statements here
7946         }
7947         // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7948         export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
7949                 if(!isWasmInitialized) {
7950                         throw new Error("initializeWasm() must be awaited first!");
7951                 }
7952                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
7953                 return nativeResponseValue;
7954         }
7955         // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
7956         export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
7957                 if(!isWasmInitialized) {
7958                         throw new Error("initializeWasm() must be awaited first!");
7959                 }
7960                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
7961                 // debug statements here
7962         }
7963         // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7964         export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
7965                 if(!isWasmInitialized) {
7966                         throw new Error("initializeWasm() must be awaited first!");
7967                 }
7968                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
7969                 return nativeResponseValue;
7970         }
7971         // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
7972         export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
7973                 if(!isWasmInitialized) {
7974                         throw new Error("initializeWasm() must be awaited first!");
7975                 }
7976                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
7977                 // debug statements here
7978         }
7979         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7980         export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
7981                 if(!isWasmInitialized) {
7982                         throw new Error("initializeWasm() must be awaited first!");
7983                 }
7984                 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
7985                 return nativeResponseValue;
7986         }
7987         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
7988         export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
7989                 if(!isWasmInitialized) {
7990                         throw new Error("initializeWasm() must be awaited first!");
7991                 }
7992                 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
7993                 // debug statements here
7994         }
7995         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7996         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
7997                 if(!isWasmInitialized) {
7998                         throw new Error("initializeWasm() must be awaited first!");
7999                 }
8000                 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
8001                 return nativeResponseValue;
8002         }
8003         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
8004         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
8005                 if(!isWasmInitialized) {
8006                         throw new Error("initializeWasm() must be awaited first!");
8007                 }
8008                 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
8009                 // debug statements here
8010         }
8011         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
8012         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
8013                 if(!isWasmInitialized) {
8014                         throw new Error("initializeWasm() must be awaited first!");
8015                 }
8016                 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
8017                 return nativeResponseValue;
8018         }
8019         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
8020         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
8021                 if(!isWasmInitialized) {
8022                         throw new Error("initializeWasm() must be awaited first!");
8023                 }
8024                 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
8025                 // debug statements here
8026         }
8027         // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
8028         export function ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr: number): number {
8029                 if(!isWasmInitialized) {
8030                         throw new Error("initializeWasm() must be awaited first!");
8031                 }
8032                 const nativeResponseValue = wasm.ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr);
8033                 return nativeResponseValue;
8034         }
8035         // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
8036         export function ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr: number, val: number): void {
8037                 if(!isWasmInitialized) {
8038                         throw new Error("initializeWasm() must be awaited first!");
8039                 }
8040                 const nativeResponseValue = wasm.ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr, val);
8041                 // debug statements here
8042         }
8043         // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
8044         export function ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr: number): number {
8045                 if(!isWasmInitialized) {
8046                         throw new Error("initializeWasm() must be awaited first!");
8047                 }
8048                 const nativeResponseValue = wasm.ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr);
8049                 return nativeResponseValue;
8050         }
8051         // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
8052         export function ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr: number, val: number): void {
8053                 if(!isWasmInitialized) {
8054                         throw new Error("initializeWasm() must be awaited first!");
8055                 }
8056                 const nativeResponseValue = wasm.ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr, val);
8057                 // debug statements here
8058         }
8059         // 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);
8060         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 {
8061                 if(!isWasmInitialized) {
8062                         throw new Error("initializeWasm() must be awaited first!");
8063                 }
8064                 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);
8065                 return nativeResponseValue;
8066         }
8067         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
8068         export function ChannelConfig_clone(orig: number): number {
8069                 if(!isWasmInitialized) {
8070                         throw new Error("initializeWasm() must be awaited first!");
8071                 }
8072                 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
8073                 return nativeResponseValue;
8074         }
8075         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
8076         export function ChannelConfig_default(): number {
8077                 if(!isWasmInitialized) {
8078                         throw new Error("initializeWasm() must be awaited first!");
8079                 }
8080                 const nativeResponseValue = wasm.ChannelConfig_default();
8081                 return nativeResponseValue;
8082         }
8083         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
8084         export function ChannelConfig_write(obj: number): Uint8Array {
8085                 if(!isWasmInitialized) {
8086                         throw new Error("initializeWasm() must be awaited first!");
8087                 }
8088                 const nativeResponseValue = wasm.ChannelConfig_write(obj);
8089                 return decodeArray(nativeResponseValue);
8090         }
8091         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
8092         export function ChannelConfig_read(ser: Uint8Array): number {
8093                 if(!isWasmInitialized) {
8094                         throw new Error("initializeWasm() must be awaited first!");
8095                 }
8096                 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
8097                 return nativeResponseValue;
8098         }
8099         // void UserConfig_free(struct LDKUserConfig this_obj);
8100         export function UserConfig_free(this_obj: number): void {
8101                 if(!isWasmInitialized) {
8102                         throw new Error("initializeWasm() must be awaited first!");
8103                 }
8104                 const nativeResponseValue = wasm.UserConfig_free(this_obj);
8105                 // debug statements here
8106         }
8107         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
8108         export function UserConfig_get_own_channel_config(this_ptr: number): number {
8109                 if(!isWasmInitialized) {
8110                         throw new Error("initializeWasm() must be awaited first!");
8111                 }
8112                 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
8113                 return nativeResponseValue;
8114         }
8115         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
8116         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
8117                 if(!isWasmInitialized) {
8118                         throw new Error("initializeWasm() must be awaited first!");
8119                 }
8120                 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
8121                 // debug statements here
8122         }
8123         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
8124         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
8125                 if(!isWasmInitialized) {
8126                         throw new Error("initializeWasm() must be awaited first!");
8127                 }
8128                 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
8129                 return nativeResponseValue;
8130         }
8131         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
8132         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
8133                 if(!isWasmInitialized) {
8134                         throw new Error("initializeWasm() must be awaited first!");
8135                 }
8136                 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
8137                 // debug statements here
8138         }
8139         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
8140         export function UserConfig_get_channel_options(this_ptr: number): number {
8141                 if(!isWasmInitialized) {
8142                         throw new Error("initializeWasm() must be awaited first!");
8143                 }
8144                 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
8145                 return nativeResponseValue;
8146         }
8147         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
8148         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
8149                 if(!isWasmInitialized) {
8150                         throw new Error("initializeWasm() must be awaited first!");
8151                 }
8152                 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
8153                 // debug statements here
8154         }
8155         // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
8156         export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
8157                 if(!isWasmInitialized) {
8158                         throw new Error("initializeWasm() must be awaited first!");
8159                 }
8160                 const nativeResponseValue = wasm.UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
8161                 return nativeResponseValue;
8162         }
8163         // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
8164         export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
8165                 if(!isWasmInitialized) {
8166                         throw new Error("initializeWasm() must be awaited first!");
8167                 }
8168                 const nativeResponseValue = wasm.UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
8169                 // debug statements here
8170         }
8171         // 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);
8172         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 {
8173                 if(!isWasmInitialized) {
8174                         throw new Error("initializeWasm() must be awaited first!");
8175                 }
8176                 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg, accept_forwards_to_priv_channels_arg);
8177                 return nativeResponseValue;
8178         }
8179         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
8180         export function UserConfig_clone(orig: number): number {
8181                 if(!isWasmInitialized) {
8182                         throw new Error("initializeWasm() must be awaited first!");
8183                 }
8184                 const nativeResponseValue = wasm.UserConfig_clone(orig);
8185                 return nativeResponseValue;
8186         }
8187         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
8188         export function UserConfig_default(): number {
8189                 if(!isWasmInitialized) {
8190                         throw new Error("initializeWasm() must be awaited first!");
8191                 }
8192                 const nativeResponseValue = wasm.UserConfig_default();
8193                 return nativeResponseValue;
8194         }
8195         // void BestBlock_free(struct LDKBestBlock this_obj);
8196         export function BestBlock_free(this_obj: number): void {
8197                 if(!isWasmInitialized) {
8198                         throw new Error("initializeWasm() must be awaited first!");
8199                 }
8200                 const nativeResponseValue = wasm.BestBlock_free(this_obj);
8201                 // debug statements here
8202         }
8203         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
8204         export function BestBlock_clone(orig: number): number {
8205                 if(!isWasmInitialized) {
8206                         throw new Error("initializeWasm() must be awaited first!");
8207                 }
8208                 const nativeResponseValue = wasm.BestBlock_clone(orig);
8209                 return nativeResponseValue;
8210         }
8211         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
8212         export function BestBlock_from_genesis(network: Network): number {
8213                 if(!isWasmInitialized) {
8214                         throw new Error("initializeWasm() must be awaited first!");
8215                 }
8216                 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
8217                 return nativeResponseValue;
8218         }
8219         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
8220         export function BestBlock_new(block_hash: Uint8Array, height: number): number {
8221                 if(!isWasmInitialized) {
8222                         throw new Error("initializeWasm() must be awaited first!");
8223                 }
8224                 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
8225                 return nativeResponseValue;
8226         }
8227         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
8228         export function BestBlock_block_hash(this_arg: number): Uint8Array {
8229                 if(!isWasmInitialized) {
8230                         throw new Error("initializeWasm() must be awaited first!");
8231                 }
8232                 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
8233                 return decodeArray(nativeResponseValue);
8234         }
8235         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
8236         export function BestBlock_height(this_arg: number): number {
8237                 if(!isWasmInitialized) {
8238                         throw new Error("initializeWasm() must be awaited first!");
8239                 }
8240                 const nativeResponseValue = wasm.BestBlock_height(this_arg);
8241                 return nativeResponseValue;
8242         }
8243         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
8244         export function AccessError_clone(orig: number): AccessError {
8245                 if(!isWasmInitialized) {
8246                         throw new Error("initializeWasm() must be awaited first!");
8247                 }
8248                 const nativeResponseValue = wasm.AccessError_clone(orig);
8249                 return nativeResponseValue;
8250         }
8251         // enum LDKAccessError AccessError_unknown_chain(void);
8252         export function AccessError_unknown_chain(): AccessError {
8253                 if(!isWasmInitialized) {
8254                         throw new Error("initializeWasm() must be awaited first!");
8255                 }
8256                 const nativeResponseValue = wasm.AccessError_unknown_chain();
8257                 return nativeResponseValue;
8258         }
8259         // enum LDKAccessError AccessError_unknown_tx(void);
8260         export function AccessError_unknown_tx(): AccessError {
8261                 if(!isWasmInitialized) {
8262                         throw new Error("initializeWasm() must be awaited first!");
8263                 }
8264                 const nativeResponseValue = wasm.AccessError_unknown_tx();
8265                 return nativeResponseValue;
8266         }
8267         // void Access_free(struct LDKAccess this_ptr);
8268         export function Access_free(this_ptr: number): void {
8269                 if(!isWasmInitialized) {
8270                         throw new Error("initializeWasm() must be awaited first!");
8271                 }
8272                 const nativeResponseValue = wasm.Access_free(this_ptr);
8273                 // debug statements here
8274         }
8275         // void Listen_free(struct LDKListen this_ptr);
8276         export function Listen_free(this_ptr: number): void {
8277                 if(!isWasmInitialized) {
8278                         throw new Error("initializeWasm() must be awaited first!");
8279                 }
8280                 const nativeResponseValue = wasm.Listen_free(this_ptr);
8281                 // debug statements here
8282         }
8283         // void Confirm_free(struct LDKConfirm this_ptr);
8284         export function Confirm_free(this_ptr: number): void {
8285                 if(!isWasmInitialized) {
8286                         throw new Error("initializeWasm() must be awaited first!");
8287                 }
8288                 const nativeResponseValue = wasm.Confirm_free(this_ptr);
8289                 // debug statements here
8290         }
8291         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
8292         export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
8293                 if(!isWasmInitialized) {
8294                         throw new Error("initializeWasm() must be awaited first!");
8295                 }
8296                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
8297                 return nativeResponseValue;
8298         }
8299         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
8300         export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
8301                 if(!isWasmInitialized) {
8302                         throw new Error("initializeWasm() must be awaited first!");
8303                 }
8304                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_temporary_failure();
8305                 return nativeResponseValue;
8306         }
8307         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
8308         export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
8309                 if(!isWasmInitialized) {
8310                         throw new Error("initializeWasm() must be awaited first!");
8311                 }
8312                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_permanent_failure();
8313                 return nativeResponseValue;
8314         }
8315         // void Watch_free(struct LDKWatch this_ptr);
8316         export function Watch_free(this_ptr: number): void {
8317                 if(!isWasmInitialized) {
8318                         throw new Error("initializeWasm() must be awaited first!");
8319                 }
8320                 const nativeResponseValue = wasm.Watch_free(this_ptr);
8321                 // debug statements here
8322         }
8323         // void Filter_free(struct LDKFilter this_ptr);
8324         export function Filter_free(this_ptr: number): void {
8325                 if(!isWasmInitialized) {
8326                         throw new Error("initializeWasm() must be awaited first!");
8327                 }
8328                 const nativeResponseValue = wasm.Filter_free(this_ptr);
8329                 // debug statements here
8330         }
8331         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
8332         export function WatchedOutput_free(this_obj: number): void {
8333                 if(!isWasmInitialized) {
8334                         throw new Error("initializeWasm() must be awaited first!");
8335                 }
8336                 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
8337                 // debug statements here
8338         }
8339         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
8340         export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
8341                 if(!isWasmInitialized) {
8342                         throw new Error("initializeWasm() must be awaited first!");
8343                 }
8344                 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
8345                 return decodeArray(nativeResponseValue);
8346         }
8347         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8348         export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
8349                 if(!isWasmInitialized) {
8350                         throw new Error("initializeWasm() must be awaited first!");
8351                 }
8352                 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
8353                 // debug statements here
8354         }
8355         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
8356         export function WatchedOutput_get_outpoint(this_ptr: number): number {
8357                 if(!isWasmInitialized) {
8358                         throw new Error("initializeWasm() must be awaited first!");
8359                 }
8360                 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
8361                 return nativeResponseValue;
8362         }
8363         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8364         export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
8365                 if(!isWasmInitialized) {
8366                         throw new Error("initializeWasm() must be awaited first!");
8367                 }
8368                 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
8369                 // debug statements here
8370         }
8371         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
8372         export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
8373                 if(!isWasmInitialized) {
8374                         throw new Error("initializeWasm() must be awaited first!");
8375                 }
8376                 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
8377                 return decodeArray(nativeResponseValue);
8378         }
8379         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
8380         export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
8381                 if(!isWasmInitialized) {
8382                         throw new Error("initializeWasm() must be awaited first!");
8383                 }
8384                 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
8385                 // debug statements here
8386         }
8387         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
8388         export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
8389                 if(!isWasmInitialized) {
8390                         throw new Error("initializeWasm() must be awaited first!");
8391                 }
8392                 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
8393                 return nativeResponseValue;
8394         }
8395         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
8396         export function WatchedOutput_clone(orig: number): number {
8397                 if(!isWasmInitialized) {
8398                         throw new Error("initializeWasm() must be awaited first!");
8399                 }
8400                 const nativeResponseValue = wasm.WatchedOutput_clone(orig);
8401                 return nativeResponseValue;
8402         }
8403         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
8404         export function WatchedOutput_hash(o: number): number {
8405                 if(!isWasmInitialized) {
8406                         throw new Error("initializeWasm() must be awaited first!");
8407                 }
8408                 const nativeResponseValue = wasm.WatchedOutput_hash(o);
8409                 return nativeResponseValue;
8410         }
8411         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
8412         export function BroadcasterInterface_free(this_ptr: number): void {
8413                 if(!isWasmInitialized) {
8414                         throw new Error("initializeWasm() must be awaited first!");
8415                 }
8416                 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
8417                 // debug statements here
8418         }
8419         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
8420         export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
8421                 if(!isWasmInitialized) {
8422                         throw new Error("initializeWasm() must be awaited first!");
8423                 }
8424                 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
8425                 return nativeResponseValue;
8426         }
8427         // enum LDKConfirmationTarget ConfirmationTarget_background(void);
8428         export function ConfirmationTarget_background(): ConfirmationTarget {
8429                 if(!isWasmInitialized) {
8430                         throw new Error("initializeWasm() must be awaited first!");
8431                 }
8432                 const nativeResponseValue = wasm.ConfirmationTarget_background();
8433                 return nativeResponseValue;
8434         }
8435         // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
8436         export function ConfirmationTarget_normal(): ConfirmationTarget {
8437                 if(!isWasmInitialized) {
8438                         throw new Error("initializeWasm() must be awaited first!");
8439                 }
8440                 const nativeResponseValue = wasm.ConfirmationTarget_normal();
8441                 return nativeResponseValue;
8442         }
8443         // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
8444         export function ConfirmationTarget_high_priority(): ConfirmationTarget {
8445                 if(!isWasmInitialized) {
8446                         throw new Error("initializeWasm() must be awaited first!");
8447                 }
8448                 const nativeResponseValue = wasm.ConfirmationTarget_high_priority();
8449                 return nativeResponseValue;
8450         }
8451         // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
8452         export function ConfirmationTarget_eq(a: number, b: number): boolean {
8453                 if(!isWasmInitialized) {
8454                         throw new Error("initializeWasm() must be awaited first!");
8455                 }
8456                 const nativeResponseValue = wasm.ConfirmationTarget_eq(a, b);
8457                 return nativeResponseValue;
8458         }
8459         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
8460         export function FeeEstimator_free(this_ptr: number): void {
8461                 if(!isWasmInitialized) {
8462                         throw new Error("initializeWasm() must be awaited first!");
8463                 }
8464                 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
8465                 // debug statements here
8466         }
8467         // void MonitorUpdateId_free(struct LDKMonitorUpdateId this_obj);
8468         export function MonitorUpdateId_free(this_obj: number): void {
8469                 if(!isWasmInitialized) {
8470                         throw new Error("initializeWasm() must be awaited first!");
8471                 }
8472                 const nativeResponseValue = wasm.MonitorUpdateId_free(this_obj);
8473                 // debug statements here
8474         }
8475         // struct LDKMonitorUpdateId MonitorUpdateId_clone(const struct LDKMonitorUpdateId *NONNULL_PTR orig);
8476         export function MonitorUpdateId_clone(orig: number): number {
8477                 if(!isWasmInitialized) {
8478                         throw new Error("initializeWasm() must be awaited first!");
8479                 }
8480                 const nativeResponseValue = wasm.MonitorUpdateId_clone(orig);
8481                 return nativeResponseValue;
8482         }
8483         // uint64_t MonitorUpdateId_hash(const struct LDKMonitorUpdateId *NONNULL_PTR o);
8484         export function MonitorUpdateId_hash(o: number): number {
8485                 if(!isWasmInitialized) {
8486                         throw new Error("initializeWasm() must be awaited first!");
8487                 }
8488                 const nativeResponseValue = wasm.MonitorUpdateId_hash(o);
8489                 return nativeResponseValue;
8490         }
8491         // bool MonitorUpdateId_eq(const struct LDKMonitorUpdateId *NONNULL_PTR a, const struct LDKMonitorUpdateId *NONNULL_PTR b);
8492         export function MonitorUpdateId_eq(a: number, b: number): boolean {
8493                 if(!isWasmInitialized) {
8494                         throw new Error("initializeWasm() must be awaited first!");
8495                 }
8496                 const nativeResponseValue = wasm.MonitorUpdateId_eq(a, b);
8497                 return nativeResponseValue;
8498         }
8499         // void Persist_free(struct LDKPersist this_ptr);
8500         export function Persist_free(this_ptr: number): void {
8501                 if(!isWasmInitialized) {
8502                         throw new Error("initializeWasm() must be awaited first!");
8503                 }
8504                 const nativeResponseValue = wasm.Persist_free(this_ptr);
8505                 // debug statements here
8506         }
8507         // void LockedChannelMonitor_free(struct LDKLockedChannelMonitor this_obj);
8508         export function LockedChannelMonitor_free(this_obj: number): void {
8509                 if(!isWasmInitialized) {
8510                         throw new Error("initializeWasm() must be awaited first!");
8511                 }
8512                 const nativeResponseValue = wasm.LockedChannelMonitor_free(this_obj);
8513                 // debug statements here
8514         }
8515         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
8516         export function ChainMonitor_free(this_obj: number): void {
8517                 if(!isWasmInitialized) {
8518                         throw new Error("initializeWasm() must be awaited first!");
8519                 }
8520                 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
8521                 // debug statements here
8522         }
8523         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
8524         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
8525                 if(!isWasmInitialized) {
8526                         throw new Error("initializeWasm() must be awaited first!");
8527                 }
8528                 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
8529                 return nativeResponseValue;
8530         }
8531         // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
8532         export function ChainMonitor_get_claimable_balances(this_arg: number, ignored_channels: number[]): number[] {
8533                 if(!isWasmInitialized) {
8534                         throw new Error("initializeWasm() must be awaited first!");
8535                 }
8536                 const nativeResponseValue = wasm.ChainMonitor_get_claimable_balances(this_arg, ignored_channels);
8537                 return nativeResponseValue;
8538         }
8539         // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
8540         export function ChainMonitor_get_monitor(this_arg: number, funding_txo: number): number {
8541                 if(!isWasmInitialized) {
8542                         throw new Error("initializeWasm() must be awaited first!");
8543                 }
8544                 const nativeResponseValue = wasm.ChainMonitor_get_monitor(this_arg, funding_txo);
8545                 return nativeResponseValue;
8546         }
8547         // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8548         export function ChainMonitor_list_monitors(this_arg: number): number[] {
8549                 if(!isWasmInitialized) {
8550                         throw new Error("initializeWasm() must be awaited first!");
8551                 }
8552                 const nativeResponseValue = wasm.ChainMonitor_list_monitors(this_arg);
8553                 return nativeResponseValue;
8554         }
8555         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChainMonitor_channel_monitor_updated(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKMonitorUpdateId completed_update_id);
8556         export function ChainMonitor_channel_monitor_updated(this_arg: number, funding_txo: number, completed_update_id: number): number {
8557                 if(!isWasmInitialized) {
8558                         throw new Error("initializeWasm() must be awaited first!");
8559                 }
8560                 const nativeResponseValue = wasm.ChainMonitor_channel_monitor_updated(this_arg, funding_txo, completed_update_id);
8561                 return nativeResponseValue;
8562         }
8563         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8564         export function ChainMonitor_as_Listen(this_arg: number): number {
8565                 if(!isWasmInitialized) {
8566                         throw new Error("initializeWasm() must be awaited first!");
8567                 }
8568                 const nativeResponseValue = wasm.ChainMonitor_as_Listen(this_arg);
8569                 return nativeResponseValue;
8570         }
8571         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8572         export function ChainMonitor_as_Confirm(this_arg: number): number {
8573                 if(!isWasmInitialized) {
8574                         throw new Error("initializeWasm() must be awaited first!");
8575                 }
8576                 const nativeResponseValue = wasm.ChainMonitor_as_Confirm(this_arg);
8577                 return nativeResponseValue;
8578         }
8579         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8580         export function ChainMonitor_as_Watch(this_arg: number): number {
8581                 if(!isWasmInitialized) {
8582                         throw new Error("initializeWasm() must be awaited first!");
8583                 }
8584                 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
8585                 return nativeResponseValue;
8586         }
8587         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8588         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
8589                 if(!isWasmInitialized) {
8590                         throw new Error("initializeWasm() must be awaited first!");
8591                 }
8592                 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
8593                 return nativeResponseValue;
8594         }
8595         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
8596         export function ChannelMonitorUpdate_free(this_obj: number): void {
8597                 if(!isWasmInitialized) {
8598                         throw new Error("initializeWasm() must be awaited first!");
8599                 }
8600                 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
8601                 // debug statements here
8602         }
8603         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
8604         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
8605                 if(!isWasmInitialized) {
8606                         throw new Error("initializeWasm() must be awaited first!");
8607                 }
8608                 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
8609                 return nativeResponseValue;
8610         }
8611         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
8612         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
8613                 if(!isWasmInitialized) {
8614                         throw new Error("initializeWasm() must be awaited first!");
8615                 }
8616                 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
8617                 // debug statements here
8618         }
8619         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
8620         export function ChannelMonitorUpdate_clone(orig: number): number {
8621                 if(!isWasmInitialized) {
8622                         throw new Error("initializeWasm() must be awaited first!");
8623                 }
8624                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
8625                 return nativeResponseValue;
8626         }
8627         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
8628         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
8629                 if(!isWasmInitialized) {
8630                         throw new Error("initializeWasm() must be awaited first!");
8631                 }
8632                 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
8633                 return decodeArray(nativeResponseValue);
8634         }
8635         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
8636         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
8637                 if(!isWasmInitialized) {
8638                         throw new Error("initializeWasm() must be awaited first!");
8639                 }
8640                 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
8641                 return nativeResponseValue;
8642         }
8643         // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
8644         export function MonitorUpdateError_free(this_obj: number): void {
8645                 if(!isWasmInitialized) {
8646                         throw new Error("initializeWasm() must be awaited first!");
8647                 }
8648                 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
8649                 // debug statements here
8650         }
8651         // struct LDKStr MonitorUpdateError_get_a(const struct LDKMonitorUpdateError *NONNULL_PTR this_ptr);
8652         export function MonitorUpdateError_get_a(this_ptr: number): String {
8653                 if(!isWasmInitialized) {
8654                         throw new Error("initializeWasm() must be awaited first!");
8655                 }
8656                 const nativeResponseValue = wasm.MonitorUpdateError_get_a(this_ptr);
8657                 return nativeResponseValue;
8658         }
8659         // void MonitorUpdateError_set_a(struct LDKMonitorUpdateError *NONNULL_PTR this_ptr, struct LDKStr val);
8660         export function MonitorUpdateError_set_a(this_ptr: number, val: String): void {
8661                 if(!isWasmInitialized) {
8662                         throw new Error("initializeWasm() must be awaited first!");
8663                 }
8664                 const nativeResponseValue = wasm.MonitorUpdateError_set_a(this_ptr, val);
8665                 // debug statements here
8666         }
8667         // MUST_USE_RES struct LDKMonitorUpdateError MonitorUpdateError_new(struct LDKStr a_arg);
8668         export function MonitorUpdateError_new(a_arg: String): number {
8669                 if(!isWasmInitialized) {
8670                         throw new Error("initializeWasm() must be awaited first!");
8671                 }
8672                 const nativeResponseValue = wasm.MonitorUpdateError_new(a_arg);
8673                 return nativeResponseValue;
8674         }
8675         // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
8676         export function MonitorUpdateError_clone(orig: number): number {
8677                 if(!isWasmInitialized) {
8678                         throw new Error("initializeWasm() must be awaited first!");
8679                 }
8680                 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
8681                 return nativeResponseValue;
8682         }
8683         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
8684         export function MonitorEvent_free(this_ptr: number): void {
8685                 if(!isWasmInitialized) {
8686                         throw new Error("initializeWasm() must be awaited first!");
8687                 }
8688                 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
8689                 // debug statements here
8690         }
8691         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
8692         export function MonitorEvent_clone(orig: number): number {
8693                 if(!isWasmInitialized) {
8694                         throw new Error("initializeWasm() must be awaited first!");
8695                 }
8696                 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
8697                 return nativeResponseValue;
8698         }
8699         // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
8700         export function MonitorEvent_htlcevent(a: number): number {
8701                 if(!isWasmInitialized) {
8702                         throw new Error("initializeWasm() must be awaited first!");
8703                 }
8704                 const nativeResponseValue = wasm.MonitorEvent_htlcevent(a);
8705                 return nativeResponseValue;
8706         }
8707         // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
8708         export function MonitorEvent_commitment_tx_confirmed(a: number): number {
8709                 if(!isWasmInitialized) {
8710                         throw new Error("initializeWasm() must be awaited first!");
8711                 }
8712                 const nativeResponseValue = wasm.MonitorEvent_commitment_tx_confirmed(a);
8713                 return nativeResponseValue;
8714         }
8715         // struct LDKMonitorEvent MonitorEvent_update_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
8716         export function MonitorEvent_update_completed(funding_txo: number, monitor_update_id: number): number {
8717                 if(!isWasmInitialized) {
8718                         throw new Error("initializeWasm() must be awaited first!");
8719                 }
8720                 const nativeResponseValue = wasm.MonitorEvent_update_completed(funding_txo, monitor_update_id);
8721                 return nativeResponseValue;
8722         }
8723         // struct LDKMonitorEvent MonitorEvent_update_failed(struct LDKOutPoint a);
8724         export function MonitorEvent_update_failed(a: number): number {
8725                 if(!isWasmInitialized) {
8726                         throw new Error("initializeWasm() must be awaited first!");
8727                 }
8728                 const nativeResponseValue = wasm.MonitorEvent_update_failed(a);
8729                 return nativeResponseValue;
8730         }
8731         // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
8732         export function MonitorEvent_write(obj: number): Uint8Array {
8733                 if(!isWasmInitialized) {
8734                         throw new Error("initializeWasm() must be awaited first!");
8735                 }
8736                 const nativeResponseValue = wasm.MonitorEvent_write(obj);
8737                 return decodeArray(nativeResponseValue);
8738         }
8739         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
8740         export function HTLCUpdate_free(this_obj: number): void {
8741                 if(!isWasmInitialized) {
8742                         throw new Error("initializeWasm() must be awaited first!");
8743                 }
8744                 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
8745                 // debug statements here
8746         }
8747         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
8748         export function HTLCUpdate_clone(orig: number): number {
8749                 if(!isWasmInitialized) {
8750                         throw new Error("initializeWasm() must be awaited first!");
8751                 }
8752                 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
8753                 return nativeResponseValue;
8754         }
8755         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
8756         export function HTLCUpdate_write(obj: number): Uint8Array {
8757                 if(!isWasmInitialized) {
8758                         throw new Error("initializeWasm() must be awaited first!");
8759                 }
8760                 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
8761                 return decodeArray(nativeResponseValue);
8762         }
8763         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
8764         export function HTLCUpdate_read(ser: Uint8Array): number {
8765                 if(!isWasmInitialized) {
8766                         throw new Error("initializeWasm() must be awaited first!");
8767                 }
8768                 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
8769                 return nativeResponseValue;
8770         }
8771         // void Balance_free(struct LDKBalance this_ptr);
8772         export function Balance_free(this_ptr: number): void {
8773                 if(!isWasmInitialized) {
8774                         throw new Error("initializeWasm() must be awaited first!");
8775                 }
8776                 const nativeResponseValue = wasm.Balance_free(this_ptr);
8777                 // debug statements here
8778         }
8779         // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
8780         export function Balance_clone(orig: number): number {
8781                 if(!isWasmInitialized) {
8782                         throw new Error("initializeWasm() must be awaited first!");
8783                 }
8784                 const nativeResponseValue = wasm.Balance_clone(orig);
8785                 return nativeResponseValue;
8786         }
8787         // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
8788         export function Balance_claimable_on_channel_close(claimable_amount_satoshis: number): number {
8789                 if(!isWasmInitialized) {
8790                         throw new Error("initializeWasm() must be awaited first!");
8791                 }
8792                 const nativeResponseValue = wasm.Balance_claimable_on_channel_close(claimable_amount_satoshis);
8793                 return nativeResponseValue;
8794         }
8795         // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
8796         export function Balance_claimable_awaiting_confirmations(claimable_amount_satoshis: number, confirmation_height: number): number {
8797                 if(!isWasmInitialized) {
8798                         throw new Error("initializeWasm() must be awaited first!");
8799                 }
8800                 const nativeResponseValue = wasm.Balance_claimable_awaiting_confirmations(claimable_amount_satoshis, confirmation_height);
8801                 return nativeResponseValue;
8802         }
8803         // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
8804         export function Balance_contentious_claimable(claimable_amount_satoshis: number, timeout_height: number): number {
8805                 if(!isWasmInitialized) {
8806                         throw new Error("initializeWasm() must be awaited first!");
8807                 }
8808                 const nativeResponseValue = wasm.Balance_contentious_claimable(claimable_amount_satoshis, timeout_height);
8809                 return nativeResponseValue;
8810         }
8811         // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
8812         export function Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis: number, claimable_height: number): number {
8813                 if(!isWasmInitialized) {
8814                         throw new Error("initializeWasm() must be awaited first!");
8815                 }
8816                 const nativeResponseValue = wasm.Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis, claimable_height);
8817                 return nativeResponseValue;
8818         }
8819         // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
8820         export function Balance_eq(a: number, b: number): boolean {
8821                 if(!isWasmInitialized) {
8822                         throw new Error("initializeWasm() must be awaited first!");
8823                 }
8824                 const nativeResponseValue = wasm.Balance_eq(a, b);
8825                 return nativeResponseValue;
8826         }
8827         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
8828         export function ChannelMonitor_free(this_obj: number): void {
8829                 if(!isWasmInitialized) {
8830                         throw new Error("initializeWasm() must be awaited first!");
8831                 }
8832                 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
8833                 // debug statements here
8834         }
8835         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
8836         export function ChannelMonitor_clone(orig: number): number {
8837                 if(!isWasmInitialized) {
8838                         throw new Error("initializeWasm() must be awaited first!");
8839                 }
8840                 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
8841                 return nativeResponseValue;
8842         }
8843         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
8844         export function ChannelMonitor_write(obj: number): Uint8Array {
8845                 if(!isWasmInitialized) {
8846                         throw new Error("initializeWasm() must be awaited first!");
8847                 }
8848                 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
8849                 return decodeArray(nativeResponseValue);
8850         }
8851         // 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);
8852         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
8853                 if(!isWasmInitialized) {
8854                         throw new Error("initializeWasm() must be awaited first!");
8855                 }
8856                 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
8857                 return nativeResponseValue;
8858         }
8859         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8860         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
8861                 if(!isWasmInitialized) {
8862                         throw new Error("initializeWasm() must be awaited first!");
8863                 }
8864                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
8865                 return nativeResponseValue;
8866         }
8867         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8868         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
8869                 if(!isWasmInitialized) {
8870                         throw new Error("initializeWasm() must be awaited first!");
8871                 }
8872                 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
8873                 return nativeResponseValue;
8874         }
8875         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8876         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
8877                 if(!isWasmInitialized) {
8878                         throw new Error("initializeWasm() must be awaited first!");
8879                 }
8880                 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
8881                 return nativeResponseValue;
8882         }
8883         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
8884         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
8885                 if(!isWasmInitialized) {
8886                         throw new Error("initializeWasm() must be awaited first!");
8887                 }
8888                 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
8889                 // debug statements here
8890         }
8891         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8892         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
8893                 if(!isWasmInitialized) {
8894                         throw new Error("initializeWasm() must be awaited first!");
8895                 }
8896                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
8897                 return nativeResponseValue;
8898         }
8899         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8900         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
8901                 if(!isWasmInitialized) {
8902                         throw new Error("initializeWasm() must be awaited first!");
8903                 }
8904                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
8905                 return nativeResponseValue;
8906         }
8907         // 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);
8908         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
8909                 if(!isWasmInitialized) {
8910                         throw new Error("initializeWasm() must be awaited first!");
8911                 }
8912                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
8913                 return nativeResponseValue;
8914         }
8915         // 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);
8916         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8917                 if(!isWasmInitialized) {
8918                         throw new Error("initializeWasm() must be awaited first!");
8919                 }
8920                 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
8921                 return nativeResponseValue;
8922         }
8923         // 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);
8924         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
8925                 if(!isWasmInitialized) {
8926                         throw new Error("initializeWasm() must be awaited first!");
8927                 }
8928                 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
8929                 // debug statements here
8930         }
8931         // 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);
8932         export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8933                 if(!isWasmInitialized) {
8934                         throw new Error("initializeWasm() must be awaited first!");
8935                 }
8936                 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
8937                 return nativeResponseValue;
8938         }
8939         // 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);
8940         export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
8941                 if(!isWasmInitialized) {
8942                         throw new Error("initializeWasm() must be awaited first!");
8943                 }
8944                 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
8945                 // debug statements here
8946         }
8947         // 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);
8948         export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8949                 if(!isWasmInitialized) {
8950                         throw new Error("initializeWasm() must be awaited first!");
8951                 }
8952                 const nativeResponseValue = wasm.ChannelMonitor_best_block_updated(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
8953                 return nativeResponseValue;
8954         }
8955         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8956         export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
8957                 if(!isWasmInitialized) {
8958                         throw new Error("initializeWasm() must be awaited first!");
8959                 }
8960                 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
8961                 return nativeResponseValue;
8962         }
8963         // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8964         export function ChannelMonitor_current_best_block(this_arg: number): number {
8965                 if(!isWasmInitialized) {
8966                         throw new Error("initializeWasm() must be awaited first!");
8967                 }
8968                 const nativeResponseValue = wasm.ChannelMonitor_current_best_block(this_arg);
8969                 return nativeResponseValue;
8970         }
8971         // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8972         export function ChannelMonitor_get_claimable_balances(this_arg: number): number[] {
8973                 if(!isWasmInitialized) {
8974                         throw new Error("initializeWasm() must be awaited first!");
8975                 }
8976                 const nativeResponseValue = wasm.ChannelMonitor_get_claimable_balances(this_arg);
8977                 return nativeResponseValue;
8978         }
8979         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
8980         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
8981                 if(!isWasmInitialized) {
8982                         throw new Error("initializeWasm() must be awaited first!");
8983                 }
8984                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
8985                 return nativeResponseValue;
8986         }
8987         // void OutPoint_free(struct LDKOutPoint this_obj);
8988         export function OutPoint_free(this_obj: number): void {
8989                 if(!isWasmInitialized) {
8990                         throw new Error("initializeWasm() must be awaited first!");
8991                 }
8992                 const nativeResponseValue = wasm.OutPoint_free(this_obj);
8993                 // debug statements here
8994         }
8995         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
8996         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
8997                 if(!isWasmInitialized) {
8998                         throw new Error("initializeWasm() must be awaited first!");
8999                 }
9000                 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
9001                 return decodeArray(nativeResponseValue);
9002         }
9003         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9004         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
9005                 if(!isWasmInitialized) {
9006                         throw new Error("initializeWasm() must be awaited first!");
9007                 }
9008                 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
9009                 // debug statements here
9010         }
9011         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
9012         export function OutPoint_get_index(this_ptr: number): number {
9013                 if(!isWasmInitialized) {
9014                         throw new Error("initializeWasm() must be awaited first!");
9015                 }
9016                 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
9017                 return nativeResponseValue;
9018         }
9019         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
9020         export function OutPoint_set_index(this_ptr: number, val: number): void {
9021                 if(!isWasmInitialized) {
9022                         throw new Error("initializeWasm() must be awaited first!");
9023                 }
9024                 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
9025                 // debug statements here
9026         }
9027         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
9028         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
9029                 if(!isWasmInitialized) {
9030                         throw new Error("initializeWasm() must be awaited first!");
9031                 }
9032                 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
9033                 return nativeResponseValue;
9034         }
9035         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
9036         export function OutPoint_clone(orig: number): number {
9037                 if(!isWasmInitialized) {
9038                         throw new Error("initializeWasm() must be awaited first!");
9039                 }
9040                 const nativeResponseValue = wasm.OutPoint_clone(orig);
9041                 return nativeResponseValue;
9042         }
9043         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
9044         export function OutPoint_eq(a: number, b: number): boolean {
9045                 if(!isWasmInitialized) {
9046                         throw new Error("initializeWasm() must be awaited first!");
9047                 }
9048                 const nativeResponseValue = wasm.OutPoint_eq(a, b);
9049                 return nativeResponseValue;
9050         }
9051         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
9052         export function OutPoint_hash(o: number): number {
9053                 if(!isWasmInitialized) {
9054                         throw new Error("initializeWasm() must be awaited first!");
9055                 }
9056                 const nativeResponseValue = wasm.OutPoint_hash(o);
9057                 return nativeResponseValue;
9058         }
9059         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
9060         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
9061                 if(!isWasmInitialized) {
9062                         throw new Error("initializeWasm() must be awaited first!");
9063                 }
9064                 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
9065                 return decodeArray(nativeResponseValue);
9066         }
9067         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
9068         export function OutPoint_write(obj: number): Uint8Array {
9069                 if(!isWasmInitialized) {
9070                         throw new Error("initializeWasm() must be awaited first!");
9071                 }
9072                 const nativeResponseValue = wasm.OutPoint_write(obj);
9073                 return decodeArray(nativeResponseValue);
9074         }
9075         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
9076         export function OutPoint_read(ser: Uint8Array): number {
9077                 if(!isWasmInitialized) {
9078                         throw new Error("initializeWasm() must be awaited first!");
9079                 }
9080                 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
9081                 return nativeResponseValue;
9082         }
9083         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
9084         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
9085                 if(!isWasmInitialized) {
9086                         throw new Error("initializeWasm() must be awaited first!");
9087                 }
9088                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
9089                 // debug statements here
9090         }
9091         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
9092         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
9093                 if(!isWasmInitialized) {
9094                         throw new Error("initializeWasm() must be awaited first!");
9095                 }
9096                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
9097                 return nativeResponseValue;
9098         }
9099         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
9100         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
9101                 if(!isWasmInitialized) {
9102                         throw new Error("initializeWasm() must be awaited first!");
9103                 }
9104                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
9105                 // debug statements here
9106         }
9107         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
9108         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
9109                 if(!isWasmInitialized) {
9110                         throw new Error("initializeWasm() must be awaited first!");
9111                 }
9112                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
9113                 return decodeArray(nativeResponseValue);
9114         }
9115         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9116         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9117                 if(!isWasmInitialized) {
9118                         throw new Error("initializeWasm() must be awaited first!");
9119                 }
9120                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
9121                 // debug statements here
9122         }
9123         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
9124         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
9125                 if(!isWasmInitialized) {
9126                         throw new Error("initializeWasm() must be awaited first!");
9127                 }
9128                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
9129                 return nativeResponseValue;
9130         }
9131         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
9132         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
9133                 if(!isWasmInitialized) {
9134                         throw new Error("initializeWasm() must be awaited first!");
9135                 }
9136                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
9137                 // debug statements here
9138         }
9139         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
9140         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
9141                 if(!isWasmInitialized) {
9142                         throw new Error("initializeWasm() must be awaited first!");
9143                 }
9144                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
9145                 // debug statements here
9146         }
9147         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
9148         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
9149                 if(!isWasmInitialized) {
9150                         throw new Error("initializeWasm() must be awaited first!");
9151                 }
9152                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
9153                 return decodeArray(nativeResponseValue);
9154         }
9155         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9156         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
9157                 if(!isWasmInitialized) {
9158                         throw new Error("initializeWasm() must be awaited first!");
9159                 }
9160                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
9161                 // debug statements here
9162         }
9163         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
9164         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
9165                 if(!isWasmInitialized) {
9166                         throw new Error("initializeWasm() must be awaited first!");
9167                 }
9168                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
9169                 return decodeArray(nativeResponseValue);
9170         }
9171         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9172         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
9173                 if(!isWasmInitialized) {
9174                         throw new Error("initializeWasm() must be awaited first!");
9175                 }
9176                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
9177                 // debug statements here
9178         }
9179         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
9180         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
9181                 if(!isWasmInitialized) {
9182                         throw new Error("initializeWasm() must be awaited first!");
9183                 }
9184                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
9185                 return nativeResponseValue;
9186         }
9187         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
9188         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
9189                 if(!isWasmInitialized) {
9190                         throw new Error("initializeWasm() must be awaited first!");
9191                 }
9192                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
9193                 // debug statements here
9194         }
9195         // 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);
9196         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 {
9197                 if(!isWasmInitialized) {
9198                         throw new Error("initializeWasm() must be awaited first!");
9199                 }
9200                 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);
9201                 return nativeResponseValue;
9202         }
9203         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
9204         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
9205                 if(!isWasmInitialized) {
9206                         throw new Error("initializeWasm() must be awaited first!");
9207                 }
9208                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
9209                 return nativeResponseValue;
9210         }
9211         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
9212         export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
9213                 if(!isWasmInitialized) {
9214                         throw new Error("initializeWasm() must be awaited first!");
9215                 }
9216                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_write(obj);
9217                 return decodeArray(nativeResponseValue);
9218         }
9219         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
9220         export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
9221                 if(!isWasmInitialized) {
9222                         throw new Error("initializeWasm() must be awaited first!");
9223                 }
9224                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_read(encodeArray(ser));
9225                 return nativeResponseValue;
9226         }
9227         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
9228         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
9229                 if(!isWasmInitialized) {
9230                         throw new Error("initializeWasm() must be awaited first!");
9231                 }
9232                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
9233                 // debug statements here
9234         }
9235         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
9236         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
9237                 if(!isWasmInitialized) {
9238                         throw new Error("initializeWasm() must be awaited first!");
9239                 }
9240                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
9241                 return nativeResponseValue;
9242         }
9243         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
9244         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
9245                 if(!isWasmInitialized) {
9246                         throw new Error("initializeWasm() must be awaited first!");
9247                 }
9248                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
9249                 // debug statements here
9250         }
9251         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
9252         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
9253                 if(!isWasmInitialized) {
9254                         throw new Error("initializeWasm() must be awaited first!");
9255                 }
9256                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
9257                 // debug statements here
9258         }
9259         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
9260         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
9261                 if(!isWasmInitialized) {
9262                         throw new Error("initializeWasm() must be awaited first!");
9263                 }
9264                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
9265                 return decodeArray(nativeResponseValue);
9266         }
9267         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9268         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
9269                 if(!isWasmInitialized) {
9270                         throw new Error("initializeWasm() must be awaited first!");
9271                 }
9272                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
9273                 // debug statements here
9274         }
9275         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
9276         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
9277                 if(!isWasmInitialized) {
9278                         throw new Error("initializeWasm() must be awaited first!");
9279                 }
9280                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
9281                 return nativeResponseValue;
9282         }
9283         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
9284         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
9285                 if(!isWasmInitialized) {
9286                         throw new Error("initializeWasm() must be awaited first!");
9287                 }
9288                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
9289                 // debug statements here
9290         }
9291         // 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);
9292         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
9293                 if(!isWasmInitialized) {
9294                         throw new Error("initializeWasm() must be awaited first!");
9295                 }
9296                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
9297                 return nativeResponseValue;
9298         }
9299         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
9300         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
9301                 if(!isWasmInitialized) {
9302                         throw new Error("initializeWasm() must be awaited first!");
9303                 }
9304                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
9305                 return nativeResponseValue;
9306         }
9307         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
9308         export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
9309                 if(!isWasmInitialized) {
9310                         throw new Error("initializeWasm() must be awaited first!");
9311                 }
9312                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_write(obj);
9313                 return decodeArray(nativeResponseValue);
9314         }
9315         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
9316         export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
9317                 if(!isWasmInitialized) {
9318                         throw new Error("initializeWasm() must be awaited first!");
9319                 }
9320                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_read(encodeArray(ser));
9321                 return nativeResponseValue;
9322         }
9323         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
9324         export function SpendableOutputDescriptor_free(this_ptr: number): void {
9325                 if(!isWasmInitialized) {
9326                         throw new Error("initializeWasm() must be awaited first!");
9327                 }
9328                 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
9329                 // debug statements here
9330         }
9331         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
9332         export function SpendableOutputDescriptor_clone(orig: number): number {
9333                 if(!isWasmInitialized) {
9334                         throw new Error("initializeWasm() must be awaited first!");
9335                 }
9336                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
9337                 return nativeResponseValue;
9338         }
9339         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
9340         export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
9341                 if(!isWasmInitialized) {
9342                         throw new Error("initializeWasm() must be awaited first!");
9343                 }
9344                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_output(outpoint, output);
9345                 return nativeResponseValue;
9346         }
9347         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
9348         export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
9349                 if(!isWasmInitialized) {
9350                         throw new Error("initializeWasm() must be awaited first!");
9351                 }
9352                 const nativeResponseValue = wasm.SpendableOutputDescriptor_delayed_payment_output(a);
9353                 return nativeResponseValue;
9354         }
9355         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
9356         export function SpendableOutputDescriptor_static_payment_output(a: number): number {
9357                 if(!isWasmInitialized) {
9358                         throw new Error("initializeWasm() must be awaited first!");
9359                 }
9360                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_payment_output(a);
9361                 return nativeResponseValue;
9362         }
9363         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
9364         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
9365                 if(!isWasmInitialized) {
9366                         throw new Error("initializeWasm() must be awaited first!");
9367                 }
9368                 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
9369                 return decodeArray(nativeResponseValue);
9370         }
9371         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
9372         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
9373                 if(!isWasmInitialized) {
9374                         throw new Error("initializeWasm() must be awaited first!");
9375                 }
9376                 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
9377                 return nativeResponseValue;
9378         }
9379         // void BaseSign_free(struct LDKBaseSign this_ptr);
9380         export function BaseSign_free(this_ptr: number): void {
9381                 if(!isWasmInitialized) {
9382                         throw new Error("initializeWasm() must be awaited first!");
9383                 }
9384                 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
9385                 // debug statements here
9386         }
9387         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
9388         export function Sign_clone(orig: number): number {
9389                 if(!isWasmInitialized) {
9390                         throw new Error("initializeWasm() must be awaited first!");
9391                 }
9392                 const nativeResponseValue = wasm.Sign_clone(orig);
9393                 return nativeResponseValue;
9394         }
9395         // void Sign_free(struct LDKSign this_ptr);
9396         export function Sign_free(this_ptr: number): void {
9397                 if(!isWasmInitialized) {
9398                         throw new Error("initializeWasm() must be awaited first!");
9399                 }
9400                 const nativeResponseValue = wasm.Sign_free(this_ptr);
9401                 // debug statements here
9402         }
9403         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
9404         export function KeysInterface_free(this_ptr: number): void {
9405                 if(!isWasmInitialized) {
9406                         throw new Error("initializeWasm() must be awaited first!");
9407                 }
9408                 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
9409                 // debug statements here
9410         }
9411         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
9412         export function InMemorySigner_free(this_obj: number): void {
9413                 if(!isWasmInitialized) {
9414                         throw new Error("initializeWasm() must be awaited first!");
9415                 }
9416                 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
9417                 // debug statements here
9418         }
9419         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9420         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
9421                 if(!isWasmInitialized) {
9422                         throw new Error("initializeWasm() must be awaited first!");
9423                 }
9424                 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
9425                 return decodeArray(nativeResponseValue);
9426         }
9427         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9428         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
9429                 if(!isWasmInitialized) {
9430                         throw new Error("initializeWasm() must be awaited first!");
9431                 }
9432                 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
9433                 // debug statements here
9434         }
9435         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9436         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
9437                 if(!isWasmInitialized) {
9438                         throw new Error("initializeWasm() must be awaited first!");
9439                 }
9440                 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
9441                 return decodeArray(nativeResponseValue);
9442         }
9443         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9444         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
9445                 if(!isWasmInitialized) {
9446                         throw new Error("initializeWasm() must be awaited first!");
9447                 }
9448                 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
9449                 // debug statements here
9450         }
9451         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9452         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
9453                 if(!isWasmInitialized) {
9454                         throw new Error("initializeWasm() must be awaited first!");
9455                 }
9456                 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
9457                 return decodeArray(nativeResponseValue);
9458         }
9459         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9460         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
9461                 if(!isWasmInitialized) {
9462                         throw new Error("initializeWasm() must be awaited first!");
9463                 }
9464                 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
9465                 // debug statements here
9466         }
9467         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9468         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
9469                 if(!isWasmInitialized) {
9470                         throw new Error("initializeWasm() must be awaited first!");
9471                 }
9472                 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
9473                 return decodeArray(nativeResponseValue);
9474         }
9475         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9476         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
9477                 if(!isWasmInitialized) {
9478                         throw new Error("initializeWasm() must be awaited first!");
9479                 }
9480                 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
9481                 // debug statements here
9482         }
9483         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9484         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
9485                 if(!isWasmInitialized) {
9486                         throw new Error("initializeWasm() must be awaited first!");
9487                 }
9488                 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
9489                 return decodeArray(nativeResponseValue);
9490         }
9491         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9492         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
9493                 if(!isWasmInitialized) {
9494                         throw new Error("initializeWasm() must be awaited first!");
9495                 }
9496                 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
9497                 // debug statements here
9498         }
9499         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9500         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
9501                 if(!isWasmInitialized) {
9502                         throw new Error("initializeWasm() must be awaited first!");
9503                 }
9504                 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
9505                 return decodeArray(nativeResponseValue);
9506         }
9507         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9508         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
9509                 if(!isWasmInitialized) {
9510                         throw new Error("initializeWasm() must be awaited first!");
9511                 }
9512                 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
9513                 // debug statements here
9514         }
9515         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
9516         export function InMemorySigner_clone(orig: number): number {
9517                 if(!isWasmInitialized) {
9518                         throw new Error("initializeWasm() must be awaited first!");
9519                 }
9520                 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
9521                 return nativeResponseValue;
9522         }
9523         // 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);
9524         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 {
9525                 if(!isWasmInitialized) {
9526                         throw new Error("initializeWasm() must be awaited first!");
9527                 }
9528                 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));
9529                 return nativeResponseValue;
9530         }
9531         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9532         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
9533                 if(!isWasmInitialized) {
9534                         throw new Error("initializeWasm() must be awaited first!");
9535                 }
9536                 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
9537                 return nativeResponseValue;
9538         }
9539         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9540         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
9541                 if(!isWasmInitialized) {
9542                         throw new Error("initializeWasm() must be awaited first!");
9543                 }
9544                 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
9545                 return nativeResponseValue;
9546         }
9547         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9548         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
9549                 if(!isWasmInitialized) {
9550                         throw new Error("initializeWasm() must be awaited first!");
9551                 }
9552                 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
9553                 return nativeResponseValue;
9554         }
9555         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9556         export function InMemorySigner_is_outbound(this_arg: number): boolean {
9557                 if(!isWasmInitialized) {
9558                         throw new Error("initializeWasm() must be awaited first!");
9559                 }
9560                 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
9561                 return nativeResponseValue;
9562         }
9563         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9564         export function InMemorySigner_funding_outpoint(this_arg: number): number {
9565                 if(!isWasmInitialized) {
9566                         throw new Error("initializeWasm() must be awaited first!");
9567                 }
9568                 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
9569                 return nativeResponseValue;
9570         }
9571         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9572         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
9573                 if(!isWasmInitialized) {
9574                         throw new Error("initializeWasm() must be awaited first!");
9575                 }
9576                 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
9577                 return nativeResponseValue;
9578         }
9579         // 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);
9580         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
9581                 if(!isWasmInitialized) {
9582                         throw new Error("initializeWasm() must be awaited first!");
9583                 }
9584                 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
9585                 return nativeResponseValue;
9586         }
9587         // 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);
9588         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
9589                 if(!isWasmInitialized) {
9590                         throw new Error("initializeWasm() must be awaited first!");
9591                 }
9592                 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
9593                 return nativeResponseValue;
9594         }
9595         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9596         export function InMemorySigner_as_BaseSign(this_arg: number): number {
9597                 if(!isWasmInitialized) {
9598                         throw new Error("initializeWasm() must be awaited first!");
9599                 }
9600                 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
9601                 return nativeResponseValue;
9602         }
9603         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9604         export function InMemorySigner_as_Sign(this_arg: number): number {
9605                 if(!isWasmInitialized) {
9606                         throw new Error("initializeWasm() must be awaited first!");
9607                 }
9608                 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
9609                 return nativeResponseValue;
9610         }
9611         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
9612         export function InMemorySigner_write(obj: number): Uint8Array {
9613                 if(!isWasmInitialized) {
9614                         throw new Error("initializeWasm() must be awaited first!");
9615                 }
9616                 const nativeResponseValue = wasm.InMemorySigner_write(obj);
9617                 return decodeArray(nativeResponseValue);
9618         }
9619         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
9620         export function InMemorySigner_read(ser: Uint8Array): number {
9621                 if(!isWasmInitialized) {
9622                         throw new Error("initializeWasm() must be awaited first!");
9623                 }
9624                 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
9625                 return nativeResponseValue;
9626         }
9627         // void KeysManager_free(struct LDKKeysManager this_obj);
9628         export function KeysManager_free(this_obj: number): void {
9629                 if(!isWasmInitialized) {
9630                         throw new Error("initializeWasm() must be awaited first!");
9631                 }
9632                 const nativeResponseValue = wasm.KeysManager_free(this_obj);
9633                 // debug statements here
9634         }
9635         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
9636         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
9637                 if(!isWasmInitialized) {
9638                         throw new Error("initializeWasm() must be awaited first!");
9639                 }
9640                 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
9641                 return nativeResponseValue;
9642         }
9643         // 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]);
9644         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
9645                 if(!isWasmInitialized) {
9646                         throw new Error("initializeWasm() must be awaited first!");
9647                 }
9648                 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
9649                 return nativeResponseValue;
9650         }
9651         // 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);
9652         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
9653                 if(!isWasmInitialized) {
9654                         throw new Error("initializeWasm() must be awaited first!");
9655                 }
9656                 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
9657                 return nativeResponseValue;
9658         }
9659         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
9660         export function KeysManager_as_KeysInterface(this_arg: number): number {
9661                 if(!isWasmInitialized) {
9662                         throw new Error("initializeWasm() must be awaited first!");
9663                 }
9664                 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
9665                 return nativeResponseValue;
9666         }
9667         // void ChannelManager_free(struct LDKChannelManager this_obj);
9668         export function ChannelManager_free(this_obj: number): void {
9669                 if(!isWasmInitialized) {
9670                         throw new Error("initializeWasm() must be awaited first!");
9671                 }
9672                 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
9673                 // debug statements here
9674         }
9675         // void ChainParameters_free(struct LDKChainParameters this_obj);
9676         export function ChainParameters_free(this_obj: number): void {
9677                 if(!isWasmInitialized) {
9678                         throw new Error("initializeWasm() must be awaited first!");
9679                 }
9680                 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
9681                 // debug statements here
9682         }
9683         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
9684         export function ChainParameters_get_network(this_ptr: number): Network {
9685                 if(!isWasmInitialized) {
9686                         throw new Error("initializeWasm() must be awaited first!");
9687                 }
9688                 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
9689                 return nativeResponseValue;
9690         }
9691         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
9692         export function ChainParameters_set_network(this_ptr: number, val: Network): void {
9693                 if(!isWasmInitialized) {
9694                         throw new Error("initializeWasm() must be awaited first!");
9695                 }
9696                 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
9697                 // debug statements here
9698         }
9699         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
9700         export function ChainParameters_get_best_block(this_ptr: number): number {
9701                 if(!isWasmInitialized) {
9702                         throw new Error("initializeWasm() must be awaited first!");
9703                 }
9704                 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
9705                 return nativeResponseValue;
9706         }
9707         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
9708         export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
9709                 if(!isWasmInitialized) {
9710                         throw new Error("initializeWasm() must be awaited first!");
9711                 }
9712                 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
9713                 // debug statements here
9714         }
9715         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
9716         export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
9717                 if(!isWasmInitialized) {
9718                         throw new Error("initializeWasm() must be awaited first!");
9719                 }
9720                 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
9721                 return nativeResponseValue;
9722         }
9723         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
9724         export function ChainParameters_clone(orig: number): number {
9725                 if(!isWasmInitialized) {
9726                         throw new Error("initializeWasm() must be awaited first!");
9727                 }
9728                 const nativeResponseValue = wasm.ChainParameters_clone(orig);
9729                 return nativeResponseValue;
9730         }
9731         // void CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
9732         export function CounterpartyForwardingInfo_free(this_obj: number): void {
9733                 if(!isWasmInitialized) {
9734                         throw new Error("initializeWasm() must be awaited first!");
9735                 }
9736                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_free(this_obj);
9737                 // debug statements here
9738         }
9739         // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
9740         export function CounterpartyForwardingInfo_get_fee_base_msat(this_ptr: number): number {
9741                 if(!isWasmInitialized) {
9742                         throw new Error("initializeWasm() must be awaited first!");
9743                 }
9744                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_base_msat(this_ptr);
9745                 return nativeResponseValue;
9746         }
9747         // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
9748         export function CounterpartyForwardingInfo_set_fee_base_msat(this_ptr: number, val: number): void {
9749                 if(!isWasmInitialized) {
9750                         throw new Error("initializeWasm() must be awaited first!");
9751                 }
9752                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_base_msat(this_ptr, val);
9753                 // debug statements here
9754         }
9755         // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
9756         export function CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr: number): number {
9757                 if(!isWasmInitialized) {
9758                         throw new Error("initializeWasm() must be awaited first!");
9759                 }
9760                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr);
9761                 return nativeResponseValue;
9762         }
9763         // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
9764         export function CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr: number, val: number): void {
9765                 if(!isWasmInitialized) {
9766                         throw new Error("initializeWasm() must be awaited first!");
9767                 }
9768                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr, val);
9769                 // debug statements here
9770         }
9771         // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
9772         export function CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr: number): number {
9773                 if(!isWasmInitialized) {
9774                         throw new Error("initializeWasm() must be awaited first!");
9775                 }
9776                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr);
9777                 return nativeResponseValue;
9778         }
9779         // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
9780         export function CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
9781                 if(!isWasmInitialized) {
9782                         throw new Error("initializeWasm() must be awaited first!");
9783                 }
9784                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr, val);
9785                 // debug statements here
9786         }
9787         // 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);
9788         export function CounterpartyForwardingInfo_new(fee_base_msat_arg: number, fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number): number {
9789                 if(!isWasmInitialized) {
9790                         throw new Error("initializeWasm() must be awaited first!");
9791                 }
9792                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
9793                 return nativeResponseValue;
9794         }
9795         // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
9796         export function CounterpartyForwardingInfo_clone(orig: number): number {
9797                 if(!isWasmInitialized) {
9798                         throw new Error("initializeWasm() must be awaited first!");
9799                 }
9800                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_clone(orig);
9801                 return nativeResponseValue;
9802         }
9803         // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
9804         export function ChannelCounterparty_free(this_obj: number): void {
9805                 if(!isWasmInitialized) {
9806                         throw new Error("initializeWasm() must be awaited first!");
9807                 }
9808                 const nativeResponseValue = wasm.ChannelCounterparty_free(this_obj);
9809                 // debug statements here
9810         }
9811         // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9812         export function ChannelCounterparty_get_node_id(this_ptr: number): Uint8Array {
9813                 if(!isWasmInitialized) {
9814                         throw new Error("initializeWasm() must be awaited first!");
9815                 }
9816                 const nativeResponseValue = wasm.ChannelCounterparty_get_node_id(this_ptr);
9817                 return decodeArray(nativeResponseValue);
9818         }
9819         // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9820         export function ChannelCounterparty_set_node_id(this_ptr: number, val: Uint8Array): void {
9821                 if(!isWasmInitialized) {
9822                         throw new Error("initializeWasm() must be awaited first!");
9823                 }
9824                 const nativeResponseValue = wasm.ChannelCounterparty_set_node_id(this_ptr, encodeArray(val));
9825                 // debug statements here
9826         }
9827         // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9828         export function ChannelCounterparty_get_features(this_ptr: number): number {
9829                 if(!isWasmInitialized) {
9830                         throw new Error("initializeWasm() must be awaited first!");
9831                 }
9832                 const nativeResponseValue = wasm.ChannelCounterparty_get_features(this_ptr);
9833                 return nativeResponseValue;
9834         }
9835         // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
9836         export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
9837                 if(!isWasmInitialized) {
9838                         throw new Error("initializeWasm() must be awaited first!");
9839                 }
9840                 const nativeResponseValue = wasm.ChannelCounterparty_set_features(this_ptr, val);
9841                 // debug statements here
9842         }
9843         // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9844         export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): number {
9845                 if(!isWasmInitialized) {
9846                         throw new Error("initializeWasm() must be awaited first!");
9847                 }
9848                 const nativeResponseValue = wasm.ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
9849                 return nativeResponseValue;
9850         }
9851         // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
9852         export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
9853                 if(!isWasmInitialized) {
9854                         throw new Error("initializeWasm() must be awaited first!");
9855                 }
9856                 const nativeResponseValue = wasm.ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
9857                 // debug statements here
9858         }
9859         // struct LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9860         export function ChannelCounterparty_get_forwarding_info(this_ptr: number): number {
9861                 if(!isWasmInitialized) {
9862                         throw new Error("initializeWasm() must be awaited first!");
9863                 }
9864                 const nativeResponseValue = wasm.ChannelCounterparty_get_forwarding_info(this_ptr);
9865                 return nativeResponseValue;
9866         }
9867         // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
9868         export function ChannelCounterparty_set_forwarding_info(this_ptr: number, val: number): void {
9869                 if(!isWasmInitialized) {
9870                         throw new Error("initializeWasm() must be awaited first!");
9871                 }
9872                 const nativeResponseValue = wasm.ChannelCounterparty_set_forwarding_info(this_ptr, val);
9873                 // debug statements here
9874         }
9875         // 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);
9876         export function ChannelCounterparty_new(node_id_arg: Uint8Array, features_arg: number, unspendable_punishment_reserve_arg: number, forwarding_info_arg: number): number {
9877                 if(!isWasmInitialized) {
9878                         throw new Error("initializeWasm() must be awaited first!");
9879                 }
9880                 const nativeResponseValue = wasm.ChannelCounterparty_new(encodeArray(node_id_arg), features_arg, unspendable_punishment_reserve_arg, forwarding_info_arg);
9881                 return nativeResponseValue;
9882         }
9883         // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
9884         export function ChannelCounterparty_clone(orig: number): number {
9885                 if(!isWasmInitialized) {
9886                         throw new Error("initializeWasm() must be awaited first!");
9887                 }
9888                 const nativeResponseValue = wasm.ChannelCounterparty_clone(orig);
9889                 return nativeResponseValue;
9890         }
9891         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
9892         export function ChannelDetails_free(this_obj: number): void {
9893                 if(!isWasmInitialized) {
9894                         throw new Error("initializeWasm() must be awaited first!");
9895                 }
9896                 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
9897                 // debug statements here
9898         }
9899         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
9900         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
9901                 if(!isWasmInitialized) {
9902                         throw new Error("initializeWasm() must be awaited first!");
9903                 }
9904                 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
9905                 return decodeArray(nativeResponseValue);
9906         }
9907         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9908         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
9909                 if(!isWasmInitialized) {
9910                         throw new Error("initializeWasm() must be awaited first!");
9911                 }
9912                 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
9913                 // debug statements here
9914         }
9915         // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9916         export function ChannelDetails_get_counterparty(this_ptr: number): number {
9917                 if(!isWasmInitialized) {
9918                         throw new Error("initializeWasm() must be awaited first!");
9919                 }
9920                 const nativeResponseValue = wasm.ChannelDetails_get_counterparty(this_ptr);
9921                 return nativeResponseValue;
9922         }
9923         // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
9924         export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
9925                 if(!isWasmInitialized) {
9926                         throw new Error("initializeWasm() must be awaited first!");
9927                 }
9928                 const nativeResponseValue = wasm.ChannelDetails_set_counterparty(this_ptr, val);
9929                 // debug statements here
9930         }
9931         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9932         export function ChannelDetails_get_funding_txo(this_ptr: number): number {
9933                 if(!isWasmInitialized) {
9934                         throw new Error("initializeWasm() must be awaited first!");
9935                 }
9936                 const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
9937                 return nativeResponseValue;
9938         }
9939         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
9940         export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
9941                 if(!isWasmInitialized) {
9942                         throw new Error("initializeWasm() must be awaited first!");
9943                 }
9944                 const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
9945                 // debug statements here
9946         }
9947         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9948         export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
9949                 if(!isWasmInitialized) {
9950                         throw new Error("initializeWasm() must be awaited first!");
9951                 }
9952                 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
9953                 return nativeResponseValue;
9954         }
9955         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
9956         export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
9957                 if(!isWasmInitialized) {
9958                         throw new Error("initializeWasm() must be awaited first!");
9959                 }
9960                 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
9961                 // debug statements here
9962         }
9963         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9964         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
9965                 if(!isWasmInitialized) {
9966                         throw new Error("initializeWasm() must be awaited first!");
9967                 }
9968                 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
9969                 return nativeResponseValue;
9970         }
9971         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9972         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
9973                 if(!isWasmInitialized) {
9974                         throw new Error("initializeWasm() must be awaited first!");
9975                 }
9976                 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
9977                 // debug statements here
9978         }
9979         // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9980         export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
9981                 if(!isWasmInitialized) {
9982                         throw new Error("initializeWasm() must be awaited first!");
9983                 }
9984                 const nativeResponseValue = wasm.ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
9985                 return nativeResponseValue;
9986         }
9987         // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
9988         export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
9989                 if(!isWasmInitialized) {
9990                         throw new Error("initializeWasm() must be awaited first!");
9991                 }
9992                 const nativeResponseValue = wasm.ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
9993                 // debug statements here
9994         }
9995         // uint64_t ChannelDetails_get_user_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9996         export function ChannelDetails_get_user_channel_id(this_ptr: number): number {
9997                 if(!isWasmInitialized) {
9998                         throw new Error("initializeWasm() must be awaited first!");
9999                 }
10000                 const nativeResponseValue = wasm.ChannelDetails_get_user_channel_id(this_ptr);
10001                 return nativeResponseValue;
10002         }
10003         // void ChannelDetails_set_user_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
10004         export function ChannelDetails_set_user_channel_id(this_ptr: number, val: number): void {
10005                 if(!isWasmInitialized) {
10006                         throw new Error("initializeWasm() must be awaited first!");
10007                 }
10008                 const nativeResponseValue = wasm.ChannelDetails_set_user_channel_id(this_ptr, val);
10009                 // debug statements here
10010         }
10011         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
10012         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
10013                 if(!isWasmInitialized) {
10014                         throw new Error("initializeWasm() must be awaited first!");
10015                 }
10016                 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
10017                 return nativeResponseValue;
10018         }
10019         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
10020         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
10021                 if(!isWasmInitialized) {
10022                         throw new Error("initializeWasm() must be awaited first!");
10023                 }
10024                 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
10025                 // debug statements here
10026         }
10027         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
10028         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
10029                 if(!isWasmInitialized) {
10030                         throw new Error("initializeWasm() must be awaited first!");
10031                 }
10032                 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
10033                 return nativeResponseValue;
10034         }
10035         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
10036         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
10037                 if(!isWasmInitialized) {
10038                         throw new Error("initializeWasm() must be awaited first!");
10039                 }
10040                 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
10041                 // debug statements here
10042         }
10043         // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
10044         export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
10045                 if(!isWasmInitialized) {
10046                         throw new Error("initializeWasm() must be awaited first!");
10047                 }
10048                 const nativeResponseValue = wasm.ChannelDetails_get_confirmations_required(this_ptr);
10049                 return nativeResponseValue;
10050         }
10051         // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
10052         export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
10053                 if(!isWasmInitialized) {
10054                         throw new Error("initializeWasm() must be awaited first!");
10055                 }
10056                 const nativeResponseValue = wasm.ChannelDetails_set_confirmations_required(this_ptr, val);
10057                 // debug statements here
10058         }
10059         // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
10060         export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
10061                 if(!isWasmInitialized) {
10062                         throw new Error("initializeWasm() must be awaited first!");
10063                 }
10064                 const nativeResponseValue = wasm.ChannelDetails_get_force_close_spend_delay(this_ptr);
10065                 return nativeResponseValue;
10066         }
10067         // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
10068         export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
10069                 if(!isWasmInitialized) {
10070                         throw new Error("initializeWasm() must be awaited first!");
10071                 }
10072                 const nativeResponseValue = wasm.ChannelDetails_set_force_close_spend_delay(this_ptr, val);
10073                 // debug statements here
10074         }
10075         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
10076         export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
10077                 if(!isWasmInitialized) {
10078                         throw new Error("initializeWasm() must be awaited first!");
10079                 }
10080                 const nativeResponseValue = wasm.ChannelDetails_get_is_outbound(this_ptr);
10081                 return nativeResponseValue;
10082         }
10083         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
10084         export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
10085                 if(!isWasmInitialized) {
10086                         throw new Error("initializeWasm() must be awaited first!");
10087                 }
10088                 const nativeResponseValue = wasm.ChannelDetails_set_is_outbound(this_ptr, val);
10089                 // debug statements here
10090         }
10091         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
10092         export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
10093                 if(!isWasmInitialized) {
10094                         throw new Error("initializeWasm() must be awaited first!");
10095                 }
10096                 const nativeResponseValue = wasm.ChannelDetails_get_is_funding_locked(this_ptr);
10097                 return nativeResponseValue;
10098         }
10099         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
10100         export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
10101                 if(!isWasmInitialized) {
10102                         throw new Error("initializeWasm() must be awaited first!");
10103                 }
10104                 const nativeResponseValue = wasm.ChannelDetails_set_is_funding_locked(this_ptr, val);
10105                 // debug statements here
10106         }
10107         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
10108         export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
10109                 if(!isWasmInitialized) {
10110                         throw new Error("initializeWasm() must be awaited first!");
10111                 }
10112                 const nativeResponseValue = wasm.ChannelDetails_get_is_usable(this_ptr);
10113                 return nativeResponseValue;
10114         }
10115         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
10116         export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
10117                 if(!isWasmInitialized) {
10118                         throw new Error("initializeWasm() must be awaited first!");
10119                 }
10120                 const nativeResponseValue = wasm.ChannelDetails_set_is_usable(this_ptr, val);
10121                 // debug statements here
10122         }
10123         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
10124         export function ChannelDetails_get_is_public(this_ptr: number): boolean {
10125                 if(!isWasmInitialized) {
10126                         throw new Error("initializeWasm() must be awaited first!");
10127                 }
10128                 const nativeResponseValue = wasm.ChannelDetails_get_is_public(this_ptr);
10129                 return nativeResponseValue;
10130         }
10131         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
10132         export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
10133                 if(!isWasmInitialized) {
10134                         throw new Error("initializeWasm() must be awaited first!");
10135                 }
10136                 const nativeResponseValue = wasm.ChannelDetails_set_is_public(this_ptr, val);
10137                 // debug statements here
10138         }
10139         // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKCOption_u64Z short_channel_id_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, uint64_t user_channel_id_arg, uint64_t outbound_capacity_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_funding_locked_arg, bool is_usable_arg, bool is_public_arg);
10140         export function ChannelDetails_new(channel_id_arg: Uint8Array, counterparty_arg: number, funding_txo_arg: number, short_channel_id_arg: number, channel_value_satoshis_arg: number, unspendable_punishment_reserve_arg: number, user_channel_id_arg: number, outbound_capacity_msat_arg: number, inbound_capacity_msat_arg: number, confirmations_required_arg: number, force_close_spend_delay_arg: number, is_outbound_arg: boolean, is_funding_locked_arg: boolean, is_usable_arg: boolean, is_public_arg: boolean): number {
10141                 if(!isWasmInitialized) {
10142                         throw new Error("initializeWasm() must be awaited first!");
10143                 }
10144                 const nativeResponseValue = wasm.ChannelDetails_new(encodeArray(channel_id_arg), counterparty_arg, funding_txo_arg, short_channel_id_arg, channel_value_satoshis_arg, unspendable_punishment_reserve_arg, user_channel_id_arg, outbound_capacity_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg, force_close_spend_delay_arg, is_outbound_arg, is_funding_locked_arg, is_usable_arg, is_public_arg);
10145                 return nativeResponseValue;
10146         }
10147         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
10148         export function ChannelDetails_clone(orig: number): number {
10149                 if(!isWasmInitialized) {
10150                         throw new Error("initializeWasm() must be awaited first!");
10151                 }
10152                 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
10153                 return nativeResponseValue;
10154         }
10155         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
10156         export function PaymentSendFailure_free(this_ptr: number): void {
10157                 if(!isWasmInitialized) {
10158                         throw new Error("initializeWasm() must be awaited first!");
10159                 }
10160                 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
10161                 // debug statements here
10162         }
10163         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
10164         export function PaymentSendFailure_clone(orig: number): number {
10165                 if(!isWasmInitialized) {
10166                         throw new Error("initializeWasm() must be awaited first!");
10167                 }
10168                 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
10169                 return nativeResponseValue;
10170         }
10171         // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
10172         export function PaymentSendFailure_parameter_error(a: number): number {
10173                 if(!isWasmInitialized) {
10174                         throw new Error("initializeWasm() must be awaited first!");
10175                 }
10176                 const nativeResponseValue = wasm.PaymentSendFailure_parameter_error(a);
10177                 return nativeResponseValue;
10178         }
10179         // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
10180         export function PaymentSendFailure_path_parameter_error(a: number[]): number {
10181                 if(!isWasmInitialized) {
10182                         throw new Error("initializeWasm() must be awaited first!");
10183                 }
10184                 const nativeResponseValue = wasm.PaymentSendFailure_path_parameter_error(a);
10185                 return nativeResponseValue;
10186         }
10187         // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
10188         export function PaymentSendFailure_all_failed_retry_safe(a: number[]): number {
10189                 if(!isWasmInitialized) {
10190                         throw new Error("initializeWasm() must be awaited first!");
10191                 }
10192                 const nativeResponseValue = wasm.PaymentSendFailure_all_failed_retry_safe(a);
10193                 return nativeResponseValue;
10194         }
10195         // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ results, struct LDKRouteParameters failed_paths_retry, struct LDKThirtyTwoBytes payment_id);
10196         export function PaymentSendFailure_partial_failure(results: number[], failed_paths_retry: number, payment_id: Uint8Array): number {
10197                 if(!isWasmInitialized) {
10198                         throw new Error("initializeWasm() must be awaited first!");
10199                 }
10200                 const nativeResponseValue = wasm.PaymentSendFailure_partial_failure(results, failed_paths_retry, encodeArray(payment_id));
10201                 return nativeResponseValue;
10202         }
10203         // 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);
10204         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
10205                 if(!isWasmInitialized) {
10206                         throw new Error("initializeWasm() must be awaited first!");
10207                 }
10208                 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
10209                 return nativeResponseValue;
10210         }
10211         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
10212         export function ChannelManager_get_current_default_configuration(this_arg: number): number {
10213                 if(!isWasmInitialized) {
10214                         throw new Error("initializeWasm() must be awaited first!");
10215                 }
10216                 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
10217                 return nativeResponseValue;
10218         }
10219         // MUST_USE_RES struct LDKCResult__u832APIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, uint64_t user_channel_id, struct LDKUserConfig override_config);
10220         export function ChannelManager_create_channel(this_arg: number, their_network_key: Uint8Array, channel_value_satoshis: number, push_msat: number, user_channel_id: number, override_config: number): number {
10221                 if(!isWasmInitialized) {
10222                         throw new Error("initializeWasm() must be awaited first!");
10223                 }
10224                 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_channel_id, override_config);
10225                 return nativeResponseValue;
10226         }
10227         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
10228         export function ChannelManager_list_channels(this_arg: number): number[] {
10229                 if(!isWasmInitialized) {
10230                         throw new Error("initializeWasm() must be awaited first!");
10231                 }
10232                 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
10233                 return nativeResponseValue;
10234         }
10235         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
10236         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
10237                 if(!isWasmInitialized) {
10238                         throw new Error("initializeWasm() must be awaited first!");
10239                 }
10240                 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
10241                 return nativeResponseValue;
10242         }
10243         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
10244         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
10245                 if(!isWasmInitialized) {
10246                         throw new Error("initializeWasm() must be awaited first!");
10247                 }
10248                 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
10249                 return nativeResponseValue;
10250         }
10251         // 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);
10252         export function ChannelManager_close_channel_with_target_feerate(this_arg: number, channel_id: Uint8Array, target_feerate_sats_per_1000_weight: number): number {
10253                 if(!isWasmInitialized) {
10254                         throw new Error("initializeWasm() must be awaited first!");
10255                 }
10256                 const nativeResponseValue = wasm.ChannelManager_close_channel_with_target_feerate(this_arg, encodeArray(channel_id), target_feerate_sats_per_1000_weight);
10257                 return nativeResponseValue;
10258         }
10259         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
10260         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
10261                 if(!isWasmInitialized) {
10262                         throw new Error("initializeWasm() must be awaited first!");
10263                 }
10264                 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
10265                 return nativeResponseValue;
10266         }
10267         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
10268         export function ChannelManager_force_close_all_channels(this_arg: number): void {
10269                 if(!isWasmInitialized) {
10270                         throw new Error("initializeWasm() must be awaited first!");
10271                 }
10272                 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
10273                 // debug statements here
10274         }
10275         // MUST_USE_RES struct LDKCResult_PaymentIdPaymentSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
10276         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
10277                 if(!isWasmInitialized) {
10278                         throw new Error("initializeWasm() must be awaited first!");
10279                 }
10280                 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
10281                 return nativeResponseValue;
10282         }
10283         // MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_retry_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_id);
10284         export function ChannelManager_retry_payment(this_arg: number, route: number, payment_id: Uint8Array): number {
10285                 if(!isWasmInitialized) {
10286                         throw new Error("initializeWasm() must be awaited first!");
10287                 }
10288                 const nativeResponseValue = wasm.ChannelManager_retry_payment(this_arg, route, encodeArray(payment_id));
10289                 return nativeResponseValue;
10290         }
10291         // MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ ChannelManager_send_spontaneous_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_preimage);
10292         export function ChannelManager_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: Uint8Array): number {
10293                 if(!isWasmInitialized) {
10294                         throw new Error("initializeWasm() must be awaited first!");
10295                 }
10296                 const nativeResponseValue = wasm.ChannelManager_send_spontaneous_payment(this_arg, route, encodeArray(payment_preimage));
10297                 return nativeResponseValue;
10298         }
10299         // 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);
10300         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
10301                 if(!isWasmInitialized) {
10302                         throw new Error("initializeWasm() must be awaited first!");
10303                 }
10304                 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
10305                 return nativeResponseValue;
10306         }
10307         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
10308         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
10309                 if(!isWasmInitialized) {
10310                         throw new Error("initializeWasm() must be awaited first!");
10311                 }
10312                 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
10313                 // debug statements here
10314         }
10315         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
10316         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
10317                 if(!isWasmInitialized) {
10318                         throw new Error("initializeWasm() must be awaited first!");
10319                 }
10320                 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
10321                 // debug statements here
10322         }
10323         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
10324         export function ChannelManager_timer_tick_occurred(this_arg: number): void {
10325                 if(!isWasmInitialized) {
10326                         throw new Error("initializeWasm() must be awaited first!");
10327                 }
10328                 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
10329                 // debug statements here
10330         }
10331         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
10332         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
10333                 if(!isWasmInitialized) {
10334                         throw new Error("initializeWasm() must be awaited first!");
10335                 }
10336                 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash));
10337                 return nativeResponseValue;
10338         }
10339         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
10340         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
10341                 if(!isWasmInitialized) {
10342                         throw new Error("initializeWasm() must be awaited first!");
10343                 }
10344                 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage));
10345                 return nativeResponseValue;
10346         }
10347         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
10348         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
10349                 if(!isWasmInitialized) {
10350                         throw new Error("initializeWasm() must be awaited first!");
10351                 }
10352                 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
10353                 return decodeArray(nativeResponseValue);
10354         }
10355         // 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);
10356         export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
10357                 if(!isWasmInitialized) {
10358                         throw new Error("initializeWasm() must be awaited first!");
10359                 }
10360                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs, user_payment_id);
10361                 return nativeResponseValue;
10362         }
10363         // 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);
10364         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 {
10365                 if(!isWasmInitialized) {
10366                         throw new Error("initializeWasm() must be awaited first!");
10367                 }
10368                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_for_hash(this_arg, encodeArray(payment_hash), min_value_msat, invoice_expiry_delta_secs, user_payment_id);
10369                 return nativeResponseValue;
10370         }
10371         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
10372         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
10373                 if(!isWasmInitialized) {
10374                         throw new Error("initializeWasm() must be awaited first!");
10375                 }
10376                 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
10377                 return nativeResponseValue;
10378         }
10379         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
10380         export function ChannelManager_as_EventsProvider(this_arg: number): number {
10381                 if(!isWasmInitialized) {
10382                         throw new Error("initializeWasm() must be awaited first!");
10383                 }
10384                 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
10385                 return nativeResponseValue;
10386         }
10387         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
10388         export function ChannelManager_as_Listen(this_arg: number): number {
10389                 if(!isWasmInitialized) {
10390                         throw new Error("initializeWasm() must be awaited first!");
10391                 }
10392                 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
10393                 return nativeResponseValue;
10394         }
10395         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
10396         export function ChannelManager_as_Confirm(this_arg: number): number {
10397                 if(!isWasmInitialized) {
10398                         throw new Error("initializeWasm() must be awaited first!");
10399                 }
10400                 const nativeResponseValue = wasm.ChannelManager_as_Confirm(this_arg);
10401                 return nativeResponseValue;
10402         }
10403         // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
10404         export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
10405                 if(!isWasmInitialized) {
10406                         throw new Error("initializeWasm() must be awaited first!");
10407                 }
10408                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
10409                 return nativeResponseValue;
10410         }
10411         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
10412         export function ChannelManager_await_persistable_update(this_arg: number): void {
10413                 if(!isWasmInitialized) {
10414                         throw new Error("initializeWasm() must be awaited first!");
10415                 }
10416                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
10417                 // debug statements here
10418         }
10419         // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
10420         export function ChannelManager_current_best_block(this_arg: number): number {
10421                 if(!isWasmInitialized) {
10422                         throw new Error("initializeWasm() must be awaited first!");
10423                 }
10424                 const nativeResponseValue = wasm.ChannelManager_current_best_block(this_arg);
10425                 return nativeResponseValue;
10426         }
10427         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
10428         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
10429                 if(!isWasmInitialized) {
10430                         throw new Error("initializeWasm() must be awaited first!");
10431                 }
10432                 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
10433                 return nativeResponseValue;
10434         }
10435         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
10436         export function ChannelManager_write(obj: number): Uint8Array {
10437                 if(!isWasmInitialized) {
10438                         throw new Error("initializeWasm() must be awaited first!");
10439                 }
10440                 const nativeResponseValue = wasm.ChannelManager_write(obj);
10441                 return decodeArray(nativeResponseValue);
10442         }
10443         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
10444         export function ChannelManagerReadArgs_free(this_obj: number): void {
10445                 if(!isWasmInitialized) {
10446                         throw new Error("initializeWasm() must be awaited first!");
10447                 }
10448                 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
10449                 // debug statements here
10450         }
10451         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10452         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
10453                 if(!isWasmInitialized) {
10454                         throw new Error("initializeWasm() must be awaited first!");
10455                 }
10456                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
10457                 return nativeResponseValue;
10458         }
10459         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
10460         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
10461                 if(!isWasmInitialized) {
10462                         throw new Error("initializeWasm() must be awaited first!");
10463                 }
10464                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
10465                 // debug statements here
10466         }
10467         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10468         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
10469                 if(!isWasmInitialized) {
10470                         throw new Error("initializeWasm() must be awaited first!");
10471                 }
10472                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
10473                 return nativeResponseValue;
10474         }
10475         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
10476         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
10477                 if(!isWasmInitialized) {
10478                         throw new Error("initializeWasm() must be awaited first!");
10479                 }
10480                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
10481                 // debug statements here
10482         }
10483         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10484         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
10485                 if(!isWasmInitialized) {
10486                         throw new Error("initializeWasm() must be awaited first!");
10487                 }
10488                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
10489                 return nativeResponseValue;
10490         }
10491         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
10492         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
10493                 if(!isWasmInitialized) {
10494                         throw new Error("initializeWasm() must be awaited first!");
10495                 }
10496                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
10497                 // debug statements here
10498         }
10499         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10500         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
10501                 if(!isWasmInitialized) {
10502                         throw new Error("initializeWasm() must be awaited first!");
10503                 }
10504                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
10505                 return nativeResponseValue;
10506         }
10507         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
10508         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
10509                 if(!isWasmInitialized) {
10510                         throw new Error("initializeWasm() must be awaited first!");
10511                 }
10512                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
10513                 // debug statements here
10514         }
10515         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10516         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
10517                 if(!isWasmInitialized) {
10518                         throw new Error("initializeWasm() must be awaited first!");
10519                 }
10520                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
10521                 return nativeResponseValue;
10522         }
10523         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
10524         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
10525                 if(!isWasmInitialized) {
10526                         throw new Error("initializeWasm() must be awaited first!");
10527                 }
10528                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
10529                 // debug statements here
10530         }
10531         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10532         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
10533                 if(!isWasmInitialized) {
10534                         throw new Error("initializeWasm() must be awaited first!");
10535                 }
10536                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
10537                 return nativeResponseValue;
10538         }
10539         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
10540         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
10541                 if(!isWasmInitialized) {
10542                         throw new Error("initializeWasm() must be awaited first!");
10543                 }
10544                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
10545                 // debug statements here
10546         }
10547         // 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);
10548         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 {
10549                 if(!isWasmInitialized) {
10550                         throw new Error("initializeWasm() must be awaited first!");
10551                 }
10552                 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
10553                 return nativeResponseValue;
10554         }
10555         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
10556         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
10557                 if(!isWasmInitialized) {
10558                         throw new Error("initializeWasm() must be awaited first!");
10559                 }
10560                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
10561                 return nativeResponseValue;
10562         }
10563         // void DecodeError_free(struct LDKDecodeError this_obj);
10564         export function DecodeError_free(this_obj: number): void {
10565                 if(!isWasmInitialized) {
10566                         throw new Error("initializeWasm() must be awaited first!");
10567                 }
10568                 const nativeResponseValue = wasm.DecodeError_free(this_obj);
10569                 // debug statements here
10570         }
10571         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
10572         export function DecodeError_clone(orig: number): number {
10573                 if(!isWasmInitialized) {
10574                         throw new Error("initializeWasm() must be awaited first!");
10575                 }
10576                 const nativeResponseValue = wasm.DecodeError_clone(orig);
10577                 return nativeResponseValue;
10578         }
10579         // void Init_free(struct LDKInit this_obj);
10580         export function Init_free(this_obj: number): void {
10581                 if(!isWasmInitialized) {
10582                         throw new Error("initializeWasm() must be awaited first!");
10583                 }
10584                 const nativeResponseValue = wasm.Init_free(this_obj);
10585                 // debug statements here
10586         }
10587         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
10588         export function Init_get_features(this_ptr: number): number {
10589                 if(!isWasmInitialized) {
10590                         throw new Error("initializeWasm() must be awaited first!");
10591                 }
10592                 const nativeResponseValue = wasm.Init_get_features(this_ptr);
10593                 return nativeResponseValue;
10594         }
10595         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
10596         export function Init_set_features(this_ptr: number, val: number): void {
10597                 if(!isWasmInitialized) {
10598                         throw new Error("initializeWasm() must be awaited first!");
10599                 }
10600                 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
10601                 // debug statements here
10602         }
10603         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
10604         export function Init_new(features_arg: number): number {
10605                 if(!isWasmInitialized) {
10606                         throw new Error("initializeWasm() must be awaited first!");
10607                 }
10608                 const nativeResponseValue = wasm.Init_new(features_arg);
10609                 return nativeResponseValue;
10610         }
10611         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
10612         export function Init_clone(orig: number): number {
10613                 if(!isWasmInitialized) {
10614                         throw new Error("initializeWasm() must be awaited first!");
10615                 }
10616                 const nativeResponseValue = wasm.Init_clone(orig);
10617                 return nativeResponseValue;
10618         }
10619         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
10620         export function ErrorMessage_free(this_obj: number): void {
10621                 if(!isWasmInitialized) {
10622                         throw new Error("initializeWasm() must be awaited first!");
10623                 }
10624                 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
10625                 // debug statements here
10626         }
10627         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
10628         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
10629                 if(!isWasmInitialized) {
10630                         throw new Error("initializeWasm() must be awaited first!");
10631                 }
10632                 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
10633                 return decodeArray(nativeResponseValue);
10634         }
10635         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10636         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
10637                 if(!isWasmInitialized) {
10638                         throw new Error("initializeWasm() must be awaited first!");
10639                 }
10640                 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
10641                 // debug statements here
10642         }
10643         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
10644         export function ErrorMessage_get_data(this_ptr: number): String {
10645                 if(!isWasmInitialized) {
10646                         throw new Error("initializeWasm() must be awaited first!");
10647                 }
10648                 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
10649                 return nativeResponseValue;
10650         }
10651         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
10652         export function ErrorMessage_set_data(this_ptr: number, val: String): void {
10653                 if(!isWasmInitialized) {
10654                         throw new Error("initializeWasm() must be awaited first!");
10655                 }
10656                 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, val);
10657                 // debug statements here
10658         }
10659         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
10660         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
10661                 if(!isWasmInitialized) {
10662                         throw new Error("initializeWasm() must be awaited first!");
10663                 }
10664                 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), data_arg);
10665                 return nativeResponseValue;
10666         }
10667         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
10668         export function ErrorMessage_clone(orig: number): number {
10669                 if(!isWasmInitialized) {
10670                         throw new Error("initializeWasm() must be awaited first!");
10671                 }
10672                 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
10673                 return nativeResponseValue;
10674         }
10675         // void Ping_free(struct LDKPing this_obj);
10676         export function Ping_free(this_obj: number): void {
10677                 if(!isWasmInitialized) {
10678                         throw new Error("initializeWasm() must be awaited first!");
10679                 }
10680                 const nativeResponseValue = wasm.Ping_free(this_obj);
10681                 // debug statements here
10682         }
10683         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
10684         export function Ping_get_ponglen(this_ptr: number): number {
10685                 if(!isWasmInitialized) {
10686                         throw new Error("initializeWasm() must be awaited first!");
10687                 }
10688                 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
10689                 return nativeResponseValue;
10690         }
10691         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
10692         export function Ping_set_ponglen(this_ptr: number, val: number): void {
10693                 if(!isWasmInitialized) {
10694                         throw new Error("initializeWasm() must be awaited first!");
10695                 }
10696                 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
10697                 // debug statements here
10698         }
10699         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
10700         export function Ping_get_byteslen(this_ptr: number): number {
10701                 if(!isWasmInitialized) {
10702                         throw new Error("initializeWasm() must be awaited first!");
10703                 }
10704                 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
10705                 return nativeResponseValue;
10706         }
10707         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
10708         export function Ping_set_byteslen(this_ptr: number, val: number): void {
10709                 if(!isWasmInitialized) {
10710                         throw new Error("initializeWasm() must be awaited first!");
10711                 }
10712                 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
10713                 // debug statements here
10714         }
10715         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
10716         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
10717                 if(!isWasmInitialized) {
10718                         throw new Error("initializeWasm() must be awaited first!");
10719                 }
10720                 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
10721                 return nativeResponseValue;
10722         }
10723         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
10724         export function Ping_clone(orig: number): number {
10725                 if(!isWasmInitialized) {
10726                         throw new Error("initializeWasm() must be awaited first!");
10727                 }
10728                 const nativeResponseValue = wasm.Ping_clone(orig);
10729                 return nativeResponseValue;
10730         }
10731         // void Pong_free(struct LDKPong this_obj);
10732         export function Pong_free(this_obj: number): void {
10733                 if(!isWasmInitialized) {
10734                         throw new Error("initializeWasm() must be awaited first!");
10735                 }
10736                 const nativeResponseValue = wasm.Pong_free(this_obj);
10737                 // debug statements here
10738         }
10739         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
10740         export function Pong_get_byteslen(this_ptr: number): number {
10741                 if(!isWasmInitialized) {
10742                         throw new Error("initializeWasm() must be awaited first!");
10743                 }
10744                 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
10745                 return nativeResponseValue;
10746         }
10747         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
10748         export function Pong_set_byteslen(this_ptr: number, val: number): void {
10749                 if(!isWasmInitialized) {
10750                         throw new Error("initializeWasm() must be awaited first!");
10751                 }
10752                 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
10753                 // debug statements here
10754         }
10755         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
10756         export function Pong_new(byteslen_arg: number): number {
10757                 if(!isWasmInitialized) {
10758                         throw new Error("initializeWasm() must be awaited first!");
10759                 }
10760                 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
10761                 return nativeResponseValue;
10762         }
10763         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
10764         export function Pong_clone(orig: number): number {
10765                 if(!isWasmInitialized) {
10766                         throw new Error("initializeWasm() must be awaited first!");
10767                 }
10768                 const nativeResponseValue = wasm.Pong_clone(orig);
10769                 return nativeResponseValue;
10770         }
10771         // void OpenChannel_free(struct LDKOpenChannel this_obj);
10772         export function OpenChannel_free(this_obj: number): void {
10773                 if(!isWasmInitialized) {
10774                         throw new Error("initializeWasm() must be awaited first!");
10775                 }
10776                 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
10777                 // debug statements here
10778         }
10779         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
10780         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
10781                 if(!isWasmInitialized) {
10782                         throw new Error("initializeWasm() must be awaited first!");
10783                 }
10784                 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
10785                 return decodeArray(nativeResponseValue);
10786         }
10787         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10788         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10789                 if(!isWasmInitialized) {
10790                         throw new Error("initializeWasm() must be awaited first!");
10791                 }
10792                 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
10793                 // debug statements here
10794         }
10795         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
10796         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
10797                 if(!isWasmInitialized) {
10798                         throw new Error("initializeWasm() must be awaited first!");
10799                 }
10800                 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
10801                 return decodeArray(nativeResponseValue);
10802         }
10803         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10804         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
10805                 if(!isWasmInitialized) {
10806                         throw new Error("initializeWasm() must be awaited first!");
10807                 }
10808                 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
10809                 // debug statements here
10810         }
10811         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10812         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
10813                 if(!isWasmInitialized) {
10814                         throw new Error("initializeWasm() must be awaited first!");
10815                 }
10816                 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
10817                 return nativeResponseValue;
10818         }
10819         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10820         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
10821                 if(!isWasmInitialized) {
10822                         throw new Error("initializeWasm() must be awaited first!");
10823                 }
10824                 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
10825                 // debug statements here
10826         }
10827         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10828         export function OpenChannel_get_push_msat(this_ptr: number): number {
10829                 if(!isWasmInitialized) {
10830                         throw new Error("initializeWasm() must be awaited first!");
10831                 }
10832                 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
10833                 return nativeResponseValue;
10834         }
10835         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10836         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
10837                 if(!isWasmInitialized) {
10838                         throw new Error("initializeWasm() must be awaited first!");
10839                 }
10840                 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
10841                 // debug statements here
10842         }
10843         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10844         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
10845                 if(!isWasmInitialized) {
10846                         throw new Error("initializeWasm() must be awaited first!");
10847                 }
10848                 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
10849                 return nativeResponseValue;
10850         }
10851         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10852         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
10853                 if(!isWasmInitialized) {
10854                         throw new Error("initializeWasm() must be awaited first!");
10855                 }
10856                 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
10857                 // debug statements here
10858         }
10859         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10860         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
10861                 if(!isWasmInitialized) {
10862                         throw new Error("initializeWasm() must be awaited first!");
10863                 }
10864                 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
10865                 return nativeResponseValue;
10866         }
10867         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10868         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
10869                 if(!isWasmInitialized) {
10870                         throw new Error("initializeWasm() must be awaited first!");
10871                 }
10872                 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
10873                 // debug statements here
10874         }
10875         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10876         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
10877                 if(!isWasmInitialized) {
10878                         throw new Error("initializeWasm() must be awaited first!");
10879                 }
10880                 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
10881                 return nativeResponseValue;
10882         }
10883         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10884         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
10885                 if(!isWasmInitialized) {
10886                         throw new Error("initializeWasm() must be awaited first!");
10887                 }
10888                 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
10889                 // debug statements here
10890         }
10891         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10892         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
10893                 if(!isWasmInitialized) {
10894                         throw new Error("initializeWasm() must be awaited first!");
10895                 }
10896                 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
10897                 return nativeResponseValue;
10898         }
10899         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10900         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
10901                 if(!isWasmInitialized) {
10902                         throw new Error("initializeWasm() must be awaited first!");
10903                 }
10904                 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
10905                 // debug statements here
10906         }
10907         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10908         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
10909                 if(!isWasmInitialized) {
10910                         throw new Error("initializeWasm() must be awaited first!");
10911                 }
10912                 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
10913                 return nativeResponseValue;
10914         }
10915         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
10916         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
10917                 if(!isWasmInitialized) {
10918                         throw new Error("initializeWasm() must be awaited first!");
10919                 }
10920                 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
10921                 // debug statements here
10922         }
10923         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10924         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
10925                 if(!isWasmInitialized) {
10926                         throw new Error("initializeWasm() must be awaited first!");
10927                 }
10928                 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
10929                 return nativeResponseValue;
10930         }
10931         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
10932         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
10933                 if(!isWasmInitialized) {
10934                         throw new Error("initializeWasm() must be awaited first!");
10935                 }
10936                 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
10937                 // debug statements here
10938         }
10939         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10940         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
10941                 if(!isWasmInitialized) {
10942                         throw new Error("initializeWasm() must be awaited first!");
10943                 }
10944                 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
10945                 return nativeResponseValue;
10946         }
10947         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
10948         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
10949                 if(!isWasmInitialized) {
10950                         throw new Error("initializeWasm() must be awaited first!");
10951                 }
10952                 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
10953                 // debug statements here
10954         }
10955         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10956         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
10957                 if(!isWasmInitialized) {
10958                         throw new Error("initializeWasm() must be awaited first!");
10959                 }
10960                 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
10961                 return decodeArray(nativeResponseValue);
10962         }
10963         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10964         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10965                 if(!isWasmInitialized) {
10966                         throw new Error("initializeWasm() must be awaited first!");
10967                 }
10968                 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
10969                 // debug statements here
10970         }
10971         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10972         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
10973                 if(!isWasmInitialized) {
10974                         throw new Error("initializeWasm() must be awaited first!");
10975                 }
10976                 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
10977                 return decodeArray(nativeResponseValue);
10978         }
10979         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10980         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10981                 if(!isWasmInitialized) {
10982                         throw new Error("initializeWasm() must be awaited first!");
10983                 }
10984                 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
10985                 // debug statements here
10986         }
10987         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10988         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
10989                 if(!isWasmInitialized) {
10990                         throw new Error("initializeWasm() must be awaited first!");
10991                 }
10992                 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
10993                 return decodeArray(nativeResponseValue);
10994         }
10995         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10996         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
10997                 if(!isWasmInitialized) {
10998                         throw new Error("initializeWasm() must be awaited first!");
10999                 }
11000                 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
11001                 // debug statements here
11002         }
11003         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
11004         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
11005                 if(!isWasmInitialized) {
11006                         throw new Error("initializeWasm() must be awaited first!");
11007                 }
11008                 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
11009                 return decodeArray(nativeResponseValue);
11010         }
11011         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11012         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
11013                 if(!isWasmInitialized) {
11014                         throw new Error("initializeWasm() must be awaited first!");
11015                 }
11016                 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
11017                 // debug statements here
11018         }
11019         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
11020         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
11021                 if(!isWasmInitialized) {
11022                         throw new Error("initializeWasm() must be awaited first!");
11023                 }
11024                 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
11025                 return decodeArray(nativeResponseValue);
11026         }
11027         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11028         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
11029                 if(!isWasmInitialized) {
11030                         throw new Error("initializeWasm() must be awaited first!");
11031                 }
11032                 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
11033                 // debug statements here
11034         }
11035         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
11036         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
11037                 if(!isWasmInitialized) {
11038                         throw new Error("initializeWasm() must be awaited first!");
11039                 }
11040                 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
11041                 return decodeArray(nativeResponseValue);
11042         }
11043         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11044         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11045                 if(!isWasmInitialized) {
11046                         throw new Error("initializeWasm() must be awaited first!");
11047                 }
11048                 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
11049                 // debug statements here
11050         }
11051         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
11052         export function OpenChannel_get_channel_flags(this_ptr: number): number {
11053                 if(!isWasmInitialized) {
11054                         throw new Error("initializeWasm() must be awaited first!");
11055                 }
11056                 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
11057                 return nativeResponseValue;
11058         }
11059         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
11060         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
11061                 if(!isWasmInitialized) {
11062                         throw new Error("initializeWasm() must be awaited first!");
11063                 }
11064                 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
11065                 // debug statements here
11066         }
11067         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
11068         export function OpenChannel_clone(orig: number): number {
11069                 if(!isWasmInitialized) {
11070                         throw new Error("initializeWasm() must be awaited first!");
11071                 }
11072                 const nativeResponseValue = wasm.OpenChannel_clone(orig);
11073                 return nativeResponseValue;
11074         }
11075         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
11076         export function AcceptChannel_free(this_obj: number): void {
11077                 if(!isWasmInitialized) {
11078                         throw new Error("initializeWasm() must be awaited first!");
11079                 }
11080                 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
11081                 // debug statements here
11082         }
11083         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
11084         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
11085                 if(!isWasmInitialized) {
11086                         throw new Error("initializeWasm() must be awaited first!");
11087                 }
11088                 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
11089                 return decodeArray(nativeResponseValue);
11090         }
11091         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11092         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
11093                 if(!isWasmInitialized) {
11094                         throw new Error("initializeWasm() must be awaited first!");
11095                 }
11096                 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
11097                 // debug statements here
11098         }
11099         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11100         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
11101                 if(!isWasmInitialized) {
11102                         throw new Error("initializeWasm() must be awaited first!");
11103                 }
11104                 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
11105                 return nativeResponseValue;
11106         }
11107         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
11108         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
11109                 if(!isWasmInitialized) {
11110                         throw new Error("initializeWasm() must be awaited first!");
11111                 }
11112                 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
11113                 // debug statements here
11114         }
11115         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11116         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
11117                 if(!isWasmInitialized) {
11118                         throw new Error("initializeWasm() must be awaited first!");
11119                 }
11120                 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
11121                 return nativeResponseValue;
11122         }
11123         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
11124         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
11125                 if(!isWasmInitialized) {
11126                         throw new Error("initializeWasm() must be awaited first!");
11127                 }
11128                 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
11129                 // debug statements here
11130         }
11131         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11132         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
11133                 if(!isWasmInitialized) {
11134                         throw new Error("initializeWasm() must be awaited first!");
11135                 }
11136                 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
11137                 return nativeResponseValue;
11138         }
11139         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
11140         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
11141                 if(!isWasmInitialized) {
11142                         throw new Error("initializeWasm() must be awaited first!");
11143                 }
11144                 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
11145                 // debug statements here
11146         }
11147         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11148         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
11149                 if(!isWasmInitialized) {
11150                         throw new Error("initializeWasm() must be awaited first!");
11151                 }
11152                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
11153                 return nativeResponseValue;
11154         }
11155         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
11156         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
11157                 if(!isWasmInitialized) {
11158                         throw new Error("initializeWasm() must be awaited first!");
11159                 }
11160                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
11161                 // debug statements here
11162         }
11163         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11164         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
11165                 if(!isWasmInitialized) {
11166                         throw new Error("initializeWasm() must be awaited first!");
11167                 }
11168                 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
11169                 return nativeResponseValue;
11170         }
11171         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
11172         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
11173                 if(!isWasmInitialized) {
11174                         throw new Error("initializeWasm() must be awaited first!");
11175                 }
11176                 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
11177                 // debug statements here
11178         }
11179         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11180         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
11181                 if(!isWasmInitialized) {
11182                         throw new Error("initializeWasm() must be awaited first!");
11183                 }
11184                 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
11185                 return nativeResponseValue;
11186         }
11187         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
11188         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
11189                 if(!isWasmInitialized) {
11190                         throw new Error("initializeWasm() must be awaited first!");
11191                 }
11192                 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
11193                 // debug statements here
11194         }
11195         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11196         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
11197                 if(!isWasmInitialized) {
11198                         throw new Error("initializeWasm() must be awaited first!");
11199                 }
11200                 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
11201                 return nativeResponseValue;
11202         }
11203         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
11204         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
11205                 if(!isWasmInitialized) {
11206                         throw new Error("initializeWasm() must be awaited first!");
11207                 }
11208                 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
11209                 // debug statements here
11210         }
11211         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11212         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
11213                 if(!isWasmInitialized) {
11214                         throw new Error("initializeWasm() must be awaited first!");
11215                 }
11216                 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
11217                 return decodeArray(nativeResponseValue);
11218         }
11219         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11220         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
11221                 if(!isWasmInitialized) {
11222                         throw new Error("initializeWasm() must be awaited first!");
11223                 }
11224                 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
11225                 // debug statements here
11226         }
11227         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11228         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
11229                 if(!isWasmInitialized) {
11230                         throw new Error("initializeWasm() must be awaited first!");
11231                 }
11232                 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
11233                 return decodeArray(nativeResponseValue);
11234         }
11235         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11236         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
11237                 if(!isWasmInitialized) {
11238                         throw new Error("initializeWasm() must be awaited first!");
11239                 }
11240                 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
11241                 // debug statements here
11242         }
11243         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11244         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
11245                 if(!isWasmInitialized) {
11246                         throw new Error("initializeWasm() must be awaited first!");
11247                 }
11248                 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
11249                 return decodeArray(nativeResponseValue);
11250         }
11251         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11252         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
11253                 if(!isWasmInitialized) {
11254                         throw new Error("initializeWasm() must be awaited first!");
11255                 }
11256                 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
11257                 // debug statements here
11258         }
11259         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11260         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
11261                 if(!isWasmInitialized) {
11262                         throw new Error("initializeWasm() must be awaited first!");
11263                 }
11264                 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
11265                 return decodeArray(nativeResponseValue);
11266         }
11267         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11268         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
11269                 if(!isWasmInitialized) {
11270                         throw new Error("initializeWasm() must be awaited first!");
11271                 }
11272                 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
11273                 // debug statements here
11274         }
11275         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11276         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
11277                 if(!isWasmInitialized) {
11278                         throw new Error("initializeWasm() must be awaited first!");
11279                 }
11280                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
11281                 return decodeArray(nativeResponseValue);
11282         }
11283         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11284         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
11285                 if(!isWasmInitialized) {
11286                         throw new Error("initializeWasm() must be awaited first!");
11287                 }
11288                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
11289                 // debug statements here
11290         }
11291         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11292         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
11293                 if(!isWasmInitialized) {
11294                         throw new Error("initializeWasm() must be awaited first!");
11295                 }
11296                 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
11297                 return decodeArray(nativeResponseValue);
11298         }
11299         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11300         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11301                 if(!isWasmInitialized) {
11302                         throw new Error("initializeWasm() must be awaited first!");
11303                 }
11304                 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
11305                 // debug statements here
11306         }
11307         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
11308         export function AcceptChannel_clone(orig: number): number {
11309                 if(!isWasmInitialized) {
11310                         throw new Error("initializeWasm() must be awaited first!");
11311                 }
11312                 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
11313                 return nativeResponseValue;
11314         }
11315         // void FundingCreated_free(struct LDKFundingCreated this_obj);
11316         export function FundingCreated_free(this_obj: number): void {
11317                 if(!isWasmInitialized) {
11318                         throw new Error("initializeWasm() must be awaited first!");
11319                 }
11320                 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
11321                 // debug statements here
11322         }
11323         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
11324         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
11325                 if(!isWasmInitialized) {
11326                         throw new Error("initializeWasm() must be awaited first!");
11327                 }
11328                 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
11329                 return decodeArray(nativeResponseValue);
11330         }
11331         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11332         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
11333                 if(!isWasmInitialized) {
11334                         throw new Error("initializeWasm() must be awaited first!");
11335                 }
11336                 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
11337                 // debug statements here
11338         }
11339         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
11340         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
11341                 if(!isWasmInitialized) {
11342                         throw new Error("initializeWasm() must be awaited first!");
11343                 }
11344                 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
11345                 return decodeArray(nativeResponseValue);
11346         }
11347         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11348         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
11349                 if(!isWasmInitialized) {
11350                         throw new Error("initializeWasm() must be awaited first!");
11351                 }
11352                 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
11353                 // debug statements here
11354         }
11355         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
11356         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
11357                 if(!isWasmInitialized) {
11358                         throw new Error("initializeWasm() must be awaited first!");
11359                 }
11360                 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
11361                 return nativeResponseValue;
11362         }
11363         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
11364         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
11365                 if(!isWasmInitialized) {
11366                         throw new Error("initializeWasm() must be awaited first!");
11367                 }
11368                 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
11369                 // debug statements here
11370         }
11371         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
11372         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
11373                 if(!isWasmInitialized) {
11374                         throw new Error("initializeWasm() must be awaited first!");
11375                 }
11376                 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
11377                 return decodeArray(nativeResponseValue);
11378         }
11379         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
11380         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
11381                 if(!isWasmInitialized) {
11382                         throw new Error("initializeWasm() must be awaited first!");
11383                 }
11384                 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
11385                 // debug statements here
11386         }
11387         // 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);
11388         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
11389                 if(!isWasmInitialized) {
11390                         throw new Error("initializeWasm() must be awaited first!");
11391                 }
11392                 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
11393                 return nativeResponseValue;
11394         }
11395         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
11396         export function FundingCreated_clone(orig: number): number {
11397                 if(!isWasmInitialized) {
11398                         throw new Error("initializeWasm() must be awaited first!");
11399                 }
11400                 const nativeResponseValue = wasm.FundingCreated_clone(orig);
11401                 return nativeResponseValue;
11402         }
11403         // void FundingSigned_free(struct LDKFundingSigned this_obj);
11404         export function FundingSigned_free(this_obj: number): void {
11405                 if(!isWasmInitialized) {
11406                         throw new Error("initializeWasm() must be awaited first!");
11407                 }
11408                 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
11409                 // debug statements here
11410         }
11411         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
11412         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
11413                 if(!isWasmInitialized) {
11414                         throw new Error("initializeWasm() must be awaited first!");
11415                 }
11416                 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
11417                 return decodeArray(nativeResponseValue);
11418         }
11419         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11420         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
11421                 if(!isWasmInitialized) {
11422                         throw new Error("initializeWasm() must be awaited first!");
11423                 }
11424                 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
11425                 // debug statements here
11426         }
11427         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
11428         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
11429                 if(!isWasmInitialized) {
11430                         throw new Error("initializeWasm() must be awaited first!");
11431                 }
11432                 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
11433                 return decodeArray(nativeResponseValue);
11434         }
11435         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
11436         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
11437                 if(!isWasmInitialized) {
11438                         throw new Error("initializeWasm() must be awaited first!");
11439                 }
11440                 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
11441                 // debug statements here
11442         }
11443         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
11444         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
11445                 if(!isWasmInitialized) {
11446                         throw new Error("initializeWasm() must be awaited first!");
11447                 }
11448                 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
11449                 return nativeResponseValue;
11450         }
11451         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
11452         export function FundingSigned_clone(orig: number): number {
11453                 if(!isWasmInitialized) {
11454                         throw new Error("initializeWasm() must be awaited first!");
11455                 }
11456                 const nativeResponseValue = wasm.FundingSigned_clone(orig);
11457                 return nativeResponseValue;
11458         }
11459         // void FundingLocked_free(struct LDKFundingLocked this_obj);
11460         export function FundingLocked_free(this_obj: number): void {
11461                 if(!isWasmInitialized) {
11462                         throw new Error("initializeWasm() must be awaited first!");
11463                 }
11464                 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
11465                 // debug statements here
11466         }
11467         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
11468         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
11469                 if(!isWasmInitialized) {
11470                         throw new Error("initializeWasm() must be awaited first!");
11471                 }
11472                 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
11473                 return decodeArray(nativeResponseValue);
11474         }
11475         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11476         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
11477                 if(!isWasmInitialized) {
11478                         throw new Error("initializeWasm() must be awaited first!");
11479                 }
11480                 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
11481                 // debug statements here
11482         }
11483         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
11484         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
11485                 if(!isWasmInitialized) {
11486                         throw new Error("initializeWasm() must be awaited first!");
11487                 }
11488                 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
11489                 return decodeArray(nativeResponseValue);
11490         }
11491         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11492         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11493                 if(!isWasmInitialized) {
11494                         throw new Error("initializeWasm() must be awaited first!");
11495                 }
11496                 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
11497                 // debug statements here
11498         }
11499         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
11500         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
11501                 if(!isWasmInitialized) {
11502                         throw new Error("initializeWasm() must be awaited first!");
11503                 }
11504                 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
11505                 return nativeResponseValue;
11506         }
11507         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
11508         export function FundingLocked_clone(orig: number): number {
11509                 if(!isWasmInitialized) {
11510                         throw new Error("initializeWasm() must be awaited first!");
11511                 }
11512                 const nativeResponseValue = wasm.FundingLocked_clone(orig);
11513                 return nativeResponseValue;
11514         }
11515         // void Shutdown_free(struct LDKShutdown this_obj);
11516         export function Shutdown_free(this_obj: number): void {
11517                 if(!isWasmInitialized) {
11518                         throw new Error("initializeWasm() must be awaited first!");
11519                 }
11520                 const nativeResponseValue = wasm.Shutdown_free(this_obj);
11521                 // debug statements here
11522         }
11523         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
11524         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
11525                 if(!isWasmInitialized) {
11526                         throw new Error("initializeWasm() must be awaited first!");
11527                 }
11528                 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
11529                 return decodeArray(nativeResponseValue);
11530         }
11531         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11532         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
11533                 if(!isWasmInitialized) {
11534                         throw new Error("initializeWasm() must be awaited first!");
11535                 }
11536                 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
11537                 // debug statements here
11538         }
11539         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
11540         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
11541                 if(!isWasmInitialized) {
11542                         throw new Error("initializeWasm() must be awaited first!");
11543                 }
11544                 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
11545                 return decodeArray(nativeResponseValue);
11546         }
11547         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
11548         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
11549                 if(!isWasmInitialized) {
11550                         throw new Error("initializeWasm() must be awaited first!");
11551                 }
11552                 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
11553                 // debug statements here
11554         }
11555         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
11556         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
11557                 if(!isWasmInitialized) {
11558                         throw new Error("initializeWasm() must be awaited first!");
11559                 }
11560                 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
11561                 return nativeResponseValue;
11562         }
11563         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
11564         export function Shutdown_clone(orig: number): number {
11565                 if(!isWasmInitialized) {
11566                         throw new Error("initializeWasm() must be awaited first!");
11567                 }
11568                 const nativeResponseValue = wasm.Shutdown_clone(orig);
11569                 return nativeResponseValue;
11570         }
11571         // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
11572         export function ClosingSignedFeeRange_free(this_obj: number): void {
11573                 if(!isWasmInitialized) {
11574                         throw new Error("initializeWasm() must be awaited first!");
11575                 }
11576                 const nativeResponseValue = wasm.ClosingSignedFeeRange_free(this_obj);
11577                 // debug statements here
11578         }
11579         // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
11580         export function ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr: number): number {
11581                 if(!isWasmInitialized) {
11582                         throw new Error("initializeWasm() must be awaited first!");
11583                 }
11584                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr);
11585                 return nativeResponseValue;
11586         }
11587         // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
11588         export function ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr: number, val: number): void {
11589                 if(!isWasmInitialized) {
11590                         throw new Error("initializeWasm() must be awaited first!");
11591                 }
11592                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr, val);
11593                 // debug statements here
11594         }
11595         // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
11596         export function ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr: number): number {
11597                 if(!isWasmInitialized) {
11598                         throw new Error("initializeWasm() must be awaited first!");
11599                 }
11600                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr);
11601                 return nativeResponseValue;
11602         }
11603         // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
11604         export function ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr: number, val: number): void {
11605                 if(!isWasmInitialized) {
11606                         throw new Error("initializeWasm() must be awaited first!");
11607                 }
11608                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr, val);
11609                 // debug statements here
11610         }
11611         // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
11612         export function ClosingSignedFeeRange_new(min_fee_satoshis_arg: number, max_fee_satoshis_arg: number): number {
11613                 if(!isWasmInitialized) {
11614                         throw new Error("initializeWasm() must be awaited first!");
11615                 }
11616                 const nativeResponseValue = wasm.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
11617                 return nativeResponseValue;
11618         }
11619         // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
11620         export function ClosingSignedFeeRange_clone(orig: number): number {
11621                 if(!isWasmInitialized) {
11622                         throw new Error("initializeWasm() must be awaited first!");
11623                 }
11624                 const nativeResponseValue = wasm.ClosingSignedFeeRange_clone(orig);
11625                 return nativeResponseValue;
11626         }
11627         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
11628         export function ClosingSigned_free(this_obj: number): void {
11629                 if(!isWasmInitialized) {
11630                         throw new Error("initializeWasm() must be awaited first!");
11631                 }
11632                 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
11633                 // debug statements here
11634         }
11635         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
11636         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
11637                 if(!isWasmInitialized) {
11638                         throw new Error("initializeWasm() must be awaited first!");
11639                 }
11640                 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
11641                 return decodeArray(nativeResponseValue);
11642         }
11643         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11644         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
11645                 if(!isWasmInitialized) {
11646                         throw new Error("initializeWasm() must be awaited first!");
11647                 }
11648                 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
11649                 // debug statements here
11650         }
11651         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
11652         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
11653                 if(!isWasmInitialized) {
11654                         throw new Error("initializeWasm() must be awaited first!");
11655                 }
11656                 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
11657                 return nativeResponseValue;
11658         }
11659         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
11660         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
11661                 if(!isWasmInitialized) {
11662                         throw new Error("initializeWasm() must be awaited first!");
11663                 }
11664                 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
11665                 // debug statements here
11666         }
11667         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
11668         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
11669                 if(!isWasmInitialized) {
11670                         throw new Error("initializeWasm() must be awaited first!");
11671                 }
11672                 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
11673                 return decodeArray(nativeResponseValue);
11674         }
11675         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
11676         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
11677                 if(!isWasmInitialized) {
11678                         throw new Error("initializeWasm() must be awaited first!");
11679                 }
11680                 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
11681                 // debug statements here
11682         }
11683         // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
11684         export function ClosingSigned_get_fee_range(this_ptr: number): number {
11685                 if(!isWasmInitialized) {
11686                         throw new Error("initializeWasm() must be awaited first!");
11687                 }
11688                 const nativeResponseValue = wasm.ClosingSigned_get_fee_range(this_ptr);
11689                 return nativeResponseValue;
11690         }
11691         // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
11692         export function ClosingSigned_set_fee_range(this_ptr: number, val: number): void {
11693                 if(!isWasmInitialized) {
11694                         throw new Error("initializeWasm() must be awaited first!");
11695                 }
11696                 const nativeResponseValue = wasm.ClosingSigned_set_fee_range(this_ptr, val);
11697                 // debug statements here
11698         }
11699         // 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);
11700         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array, fee_range_arg: number): number {
11701                 if(!isWasmInitialized) {
11702                         throw new Error("initializeWasm() must be awaited first!");
11703                 }
11704                 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg), fee_range_arg);
11705                 return nativeResponseValue;
11706         }
11707         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
11708         export function ClosingSigned_clone(orig: number): number {
11709                 if(!isWasmInitialized) {
11710                         throw new Error("initializeWasm() must be awaited first!");
11711                 }
11712                 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
11713                 return nativeResponseValue;
11714         }
11715         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
11716         export function UpdateAddHTLC_free(this_obj: number): void {
11717                 if(!isWasmInitialized) {
11718                         throw new Error("initializeWasm() must be awaited first!");
11719                 }
11720                 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
11721                 // debug statements here
11722         }
11723         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
11724         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
11725                 if(!isWasmInitialized) {
11726                         throw new Error("initializeWasm() must be awaited first!");
11727                 }
11728                 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
11729                 return decodeArray(nativeResponseValue);
11730         }
11731         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11732         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11733                 if(!isWasmInitialized) {
11734                         throw new Error("initializeWasm() must be awaited first!");
11735                 }
11736                 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
11737                 // debug statements here
11738         }
11739         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
11740         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
11741                 if(!isWasmInitialized) {
11742                         throw new Error("initializeWasm() must be awaited first!");
11743                 }
11744                 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
11745                 return nativeResponseValue;
11746         }
11747         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
11748         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
11749                 if(!isWasmInitialized) {
11750                         throw new Error("initializeWasm() must be awaited first!");
11751                 }
11752                 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
11753                 // debug statements here
11754         }
11755         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
11756         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
11757                 if(!isWasmInitialized) {
11758                         throw new Error("initializeWasm() must be awaited first!");
11759                 }
11760                 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
11761                 return nativeResponseValue;
11762         }
11763         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
11764         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
11765                 if(!isWasmInitialized) {
11766                         throw new Error("initializeWasm() must be awaited first!");
11767                 }
11768                 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
11769                 // debug statements here
11770         }
11771         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
11772         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
11773                 if(!isWasmInitialized) {
11774                         throw new Error("initializeWasm() must be awaited first!");
11775                 }
11776                 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
11777                 return decodeArray(nativeResponseValue);
11778         }
11779         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11780         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
11781                 if(!isWasmInitialized) {
11782                         throw new Error("initializeWasm() must be awaited first!");
11783                 }
11784                 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
11785                 // debug statements here
11786         }
11787         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
11788         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
11789                 if(!isWasmInitialized) {
11790                         throw new Error("initializeWasm() must be awaited first!");
11791                 }
11792                 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
11793                 return nativeResponseValue;
11794         }
11795         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
11796         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
11797                 if(!isWasmInitialized) {
11798                         throw new Error("initializeWasm() must be awaited first!");
11799                 }
11800                 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
11801                 // debug statements here
11802         }
11803         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
11804         export function UpdateAddHTLC_clone(orig: number): number {
11805                 if(!isWasmInitialized) {
11806                         throw new Error("initializeWasm() must be awaited first!");
11807                 }
11808                 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
11809                 return nativeResponseValue;
11810         }
11811         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
11812         export function UpdateFulfillHTLC_free(this_obj: number): void {
11813                 if(!isWasmInitialized) {
11814                         throw new Error("initializeWasm() must be awaited first!");
11815                 }
11816                 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
11817                 // debug statements here
11818         }
11819         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
11820         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
11821                 if(!isWasmInitialized) {
11822                         throw new Error("initializeWasm() must be awaited first!");
11823                 }
11824                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
11825                 return decodeArray(nativeResponseValue);
11826         }
11827         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11828         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11829                 if(!isWasmInitialized) {
11830                         throw new Error("initializeWasm() must be awaited first!");
11831                 }
11832                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
11833                 // debug statements here
11834         }
11835         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
11836         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
11837                 if(!isWasmInitialized) {
11838                         throw new Error("initializeWasm() must be awaited first!");
11839                 }
11840                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
11841                 return nativeResponseValue;
11842         }
11843         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
11844         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
11845                 if(!isWasmInitialized) {
11846                         throw new Error("initializeWasm() must be awaited first!");
11847                 }
11848                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
11849                 // debug statements here
11850         }
11851         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
11852         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
11853                 if(!isWasmInitialized) {
11854                         throw new Error("initializeWasm() must be awaited first!");
11855                 }
11856                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
11857                 return decodeArray(nativeResponseValue);
11858         }
11859         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11860         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
11861                 if(!isWasmInitialized) {
11862                         throw new Error("initializeWasm() must be awaited first!");
11863                 }
11864                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
11865                 // debug statements here
11866         }
11867         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
11868         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
11869                 if(!isWasmInitialized) {
11870                         throw new Error("initializeWasm() must be awaited first!");
11871                 }
11872                 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
11873                 return nativeResponseValue;
11874         }
11875         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
11876         export function UpdateFulfillHTLC_clone(orig: number): number {
11877                 if(!isWasmInitialized) {
11878                         throw new Error("initializeWasm() must be awaited first!");
11879                 }
11880                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
11881                 return nativeResponseValue;
11882         }
11883         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
11884         export function UpdateFailHTLC_free(this_obj: number): void {
11885                 if(!isWasmInitialized) {
11886                         throw new Error("initializeWasm() must be awaited first!");
11887                 }
11888                 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
11889                 // debug statements here
11890         }
11891         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
11892         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
11893                 if(!isWasmInitialized) {
11894                         throw new Error("initializeWasm() must be awaited first!");
11895                 }
11896                 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
11897                 return decodeArray(nativeResponseValue);
11898         }
11899         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11900         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11901                 if(!isWasmInitialized) {
11902                         throw new Error("initializeWasm() must be awaited first!");
11903                 }
11904                 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
11905                 // debug statements here
11906         }
11907         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
11908         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
11909                 if(!isWasmInitialized) {
11910                         throw new Error("initializeWasm() must be awaited first!");
11911                 }
11912                 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
11913                 return nativeResponseValue;
11914         }
11915         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
11916         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
11917                 if(!isWasmInitialized) {
11918                         throw new Error("initializeWasm() must be awaited first!");
11919                 }
11920                 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
11921                 // debug statements here
11922         }
11923         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
11924         export function UpdateFailHTLC_clone(orig: number): number {
11925                 if(!isWasmInitialized) {
11926                         throw new Error("initializeWasm() must be awaited first!");
11927                 }
11928                 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
11929                 return nativeResponseValue;
11930         }
11931         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
11932         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
11933                 if(!isWasmInitialized) {
11934                         throw new Error("initializeWasm() must be awaited first!");
11935                 }
11936                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
11937                 // debug statements here
11938         }
11939         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
11940         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
11941                 if(!isWasmInitialized) {
11942                         throw new Error("initializeWasm() must be awaited first!");
11943                 }
11944                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
11945                 return decodeArray(nativeResponseValue);
11946         }
11947         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11948         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11949                 if(!isWasmInitialized) {
11950                         throw new Error("initializeWasm() must be awaited first!");
11951                 }
11952                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
11953                 // debug statements here
11954         }
11955         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
11956         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
11957                 if(!isWasmInitialized) {
11958                         throw new Error("initializeWasm() must be awaited first!");
11959                 }
11960                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
11961                 return nativeResponseValue;
11962         }
11963         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
11964         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
11965                 if(!isWasmInitialized) {
11966                         throw new Error("initializeWasm() must be awaited first!");
11967                 }
11968                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
11969                 // debug statements here
11970         }
11971         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
11972         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
11973                 if(!isWasmInitialized) {
11974                         throw new Error("initializeWasm() must be awaited first!");
11975                 }
11976                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
11977                 return nativeResponseValue;
11978         }
11979         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
11980         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
11981                 if(!isWasmInitialized) {
11982                         throw new Error("initializeWasm() must be awaited first!");
11983                 }
11984                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
11985                 // debug statements here
11986         }
11987         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
11988         export function UpdateFailMalformedHTLC_clone(orig: number): number {
11989                 if(!isWasmInitialized) {
11990                         throw new Error("initializeWasm() must be awaited first!");
11991                 }
11992                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
11993                 return nativeResponseValue;
11994         }
11995         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
11996         export function CommitmentSigned_free(this_obj: number): void {
11997                 if(!isWasmInitialized) {
11998                         throw new Error("initializeWasm() must be awaited first!");
11999                 }
12000                 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
12001                 // debug statements here
12002         }
12003         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
12004         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
12005                 if(!isWasmInitialized) {
12006                         throw new Error("initializeWasm() must be awaited first!");
12007                 }
12008                 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
12009                 return decodeArray(nativeResponseValue);
12010         }
12011         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12012         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
12013                 if(!isWasmInitialized) {
12014                         throw new Error("initializeWasm() must be awaited first!");
12015                 }
12016                 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
12017                 // debug statements here
12018         }
12019         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
12020         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
12021                 if(!isWasmInitialized) {
12022                         throw new Error("initializeWasm() must be awaited first!");
12023                 }
12024                 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
12025                 return decodeArray(nativeResponseValue);
12026         }
12027         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
12028         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
12029                 if(!isWasmInitialized) {
12030                         throw new Error("initializeWasm() must be awaited first!");
12031                 }
12032                 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
12033                 // debug statements here
12034         }
12035         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
12036         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
12037                 if(!isWasmInitialized) {
12038                         throw new Error("initializeWasm() must be awaited first!");
12039                 }
12040                 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
12041                 // debug statements here
12042         }
12043         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
12044         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
12045                 if(!isWasmInitialized) {
12046                         throw new Error("initializeWasm() must be awaited first!");
12047                 }
12048                 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
12049                 return nativeResponseValue;
12050         }
12051         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
12052         export function CommitmentSigned_clone(orig: number): number {
12053                 if(!isWasmInitialized) {
12054                         throw new Error("initializeWasm() must be awaited first!");
12055                 }
12056                 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
12057                 return nativeResponseValue;
12058         }
12059         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
12060         export function RevokeAndACK_free(this_obj: number): void {
12061                 if(!isWasmInitialized) {
12062                         throw new Error("initializeWasm() must be awaited first!");
12063                 }
12064                 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
12065                 // debug statements here
12066         }
12067         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
12068         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
12069                 if(!isWasmInitialized) {
12070                         throw new Error("initializeWasm() must be awaited first!");
12071                 }
12072                 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
12073                 return decodeArray(nativeResponseValue);
12074         }
12075         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12076         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
12077                 if(!isWasmInitialized) {
12078                         throw new Error("initializeWasm() must be awaited first!");
12079                 }
12080                 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
12081                 // debug statements here
12082         }
12083         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
12084         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
12085                 if(!isWasmInitialized) {
12086                         throw new Error("initializeWasm() must be awaited first!");
12087                 }
12088                 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
12089                 return decodeArray(nativeResponseValue);
12090         }
12091         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12092         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
12093                 if(!isWasmInitialized) {
12094                         throw new Error("initializeWasm() must be awaited first!");
12095                 }
12096                 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
12097                 // debug statements here
12098         }
12099         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
12100         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
12101                 if(!isWasmInitialized) {
12102                         throw new Error("initializeWasm() must be awaited first!");
12103                 }
12104                 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
12105                 return decodeArray(nativeResponseValue);
12106         }
12107         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12108         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
12109                 if(!isWasmInitialized) {
12110                         throw new Error("initializeWasm() must be awaited first!");
12111                 }
12112                 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
12113                 // debug statements here
12114         }
12115         // 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);
12116         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
12117                 if(!isWasmInitialized) {
12118                         throw new Error("initializeWasm() must be awaited first!");
12119                 }
12120                 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
12121                 return nativeResponseValue;
12122         }
12123         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
12124         export function RevokeAndACK_clone(orig: number): number {
12125                 if(!isWasmInitialized) {
12126                         throw new Error("initializeWasm() must be awaited first!");
12127                 }
12128                 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
12129                 return nativeResponseValue;
12130         }
12131         // void UpdateFee_free(struct LDKUpdateFee this_obj);
12132         export function UpdateFee_free(this_obj: number): void {
12133                 if(!isWasmInitialized) {
12134                         throw new Error("initializeWasm() must be awaited first!");
12135                 }
12136                 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
12137                 // debug statements here
12138         }
12139         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
12140         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
12141                 if(!isWasmInitialized) {
12142                         throw new Error("initializeWasm() must be awaited first!");
12143                 }
12144                 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
12145                 return decodeArray(nativeResponseValue);
12146         }
12147         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12148         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
12149                 if(!isWasmInitialized) {
12150                         throw new Error("initializeWasm() must be awaited first!");
12151                 }
12152                 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
12153                 // debug statements here
12154         }
12155         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
12156         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
12157                 if(!isWasmInitialized) {
12158                         throw new Error("initializeWasm() must be awaited first!");
12159                 }
12160                 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
12161                 return nativeResponseValue;
12162         }
12163         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
12164         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
12165                 if(!isWasmInitialized) {
12166                         throw new Error("initializeWasm() must be awaited first!");
12167                 }
12168                 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
12169                 // debug statements here
12170         }
12171         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
12172         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
12173                 if(!isWasmInitialized) {
12174                         throw new Error("initializeWasm() must be awaited first!");
12175                 }
12176                 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
12177                 return nativeResponseValue;
12178         }
12179         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
12180         export function UpdateFee_clone(orig: number): number {
12181                 if(!isWasmInitialized) {
12182                         throw new Error("initializeWasm() must be awaited first!");
12183                 }
12184                 const nativeResponseValue = wasm.UpdateFee_clone(orig);
12185                 return nativeResponseValue;
12186         }
12187         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
12188         export function DataLossProtect_free(this_obj: number): void {
12189                 if(!isWasmInitialized) {
12190                         throw new Error("initializeWasm() must be awaited first!");
12191                 }
12192                 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
12193                 // debug statements here
12194         }
12195         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
12196         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
12197                 if(!isWasmInitialized) {
12198                         throw new Error("initializeWasm() must be awaited first!");
12199                 }
12200                 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
12201                 return decodeArray(nativeResponseValue);
12202         }
12203         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12204         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
12205                 if(!isWasmInitialized) {
12206                         throw new Error("initializeWasm() must be awaited first!");
12207                 }
12208                 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
12209                 // debug statements here
12210         }
12211         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
12212         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
12213                 if(!isWasmInitialized) {
12214                         throw new Error("initializeWasm() must be awaited first!");
12215                 }
12216                 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
12217                 return decodeArray(nativeResponseValue);
12218         }
12219         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12220         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
12221                 if(!isWasmInitialized) {
12222                         throw new Error("initializeWasm() must be awaited first!");
12223                 }
12224                 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
12225                 // debug statements here
12226         }
12227         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
12228         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
12229                 if(!isWasmInitialized) {
12230                         throw new Error("initializeWasm() must be awaited first!");
12231                 }
12232                 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
12233                 return nativeResponseValue;
12234         }
12235         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
12236         export function DataLossProtect_clone(orig: number): number {
12237                 if(!isWasmInitialized) {
12238                         throw new Error("initializeWasm() must be awaited first!");
12239                 }
12240                 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
12241                 return nativeResponseValue;
12242         }
12243         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
12244         export function ChannelReestablish_free(this_obj: number): void {
12245                 if(!isWasmInitialized) {
12246                         throw new Error("initializeWasm() must be awaited first!");
12247                 }
12248                 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
12249                 // debug statements here
12250         }
12251         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
12252         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
12253                 if(!isWasmInitialized) {
12254                         throw new Error("initializeWasm() must be awaited first!");
12255                 }
12256                 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
12257                 return decodeArray(nativeResponseValue);
12258         }
12259         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12260         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
12261                 if(!isWasmInitialized) {
12262                         throw new Error("initializeWasm() must be awaited first!");
12263                 }
12264                 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
12265                 // debug statements here
12266         }
12267         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
12268         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
12269                 if(!isWasmInitialized) {
12270                         throw new Error("initializeWasm() must be awaited first!");
12271                 }
12272                 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
12273                 return nativeResponseValue;
12274         }
12275         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
12276         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
12277                 if(!isWasmInitialized) {
12278                         throw new Error("initializeWasm() must be awaited first!");
12279                 }
12280                 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
12281                 // debug statements here
12282         }
12283         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
12284         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
12285                 if(!isWasmInitialized) {
12286                         throw new Error("initializeWasm() must be awaited first!");
12287                 }
12288                 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
12289                 return nativeResponseValue;
12290         }
12291         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
12292         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
12293                 if(!isWasmInitialized) {
12294                         throw new Error("initializeWasm() must be awaited first!");
12295                 }
12296                 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
12297                 // debug statements here
12298         }
12299         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
12300         export function ChannelReestablish_clone(orig: number): number {
12301                 if(!isWasmInitialized) {
12302                         throw new Error("initializeWasm() must be awaited first!");
12303                 }
12304                 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
12305                 return nativeResponseValue;
12306         }
12307         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
12308         export function AnnouncementSignatures_free(this_obj: number): void {
12309                 if(!isWasmInitialized) {
12310                         throw new Error("initializeWasm() must be awaited first!");
12311                 }
12312                 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
12313                 // debug statements here
12314         }
12315         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
12316         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
12317                 if(!isWasmInitialized) {
12318                         throw new Error("initializeWasm() must be awaited first!");
12319                 }
12320                 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
12321                 return decodeArray(nativeResponseValue);
12322         }
12323         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12324         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
12325                 if(!isWasmInitialized) {
12326                         throw new Error("initializeWasm() must be awaited first!");
12327                 }
12328                 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
12329                 // debug statements here
12330         }
12331         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
12332         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
12333                 if(!isWasmInitialized) {
12334                         throw new Error("initializeWasm() must be awaited first!");
12335                 }
12336                 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
12337                 return nativeResponseValue;
12338         }
12339         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
12340         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
12341                 if(!isWasmInitialized) {
12342                         throw new Error("initializeWasm() must be awaited first!");
12343                 }
12344                 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
12345                 // debug statements here
12346         }
12347         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
12348         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
12349                 if(!isWasmInitialized) {
12350                         throw new Error("initializeWasm() must be awaited first!");
12351                 }
12352                 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
12353                 return decodeArray(nativeResponseValue);
12354         }
12355         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
12356         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
12357                 if(!isWasmInitialized) {
12358                         throw new Error("initializeWasm() must be awaited first!");
12359                 }
12360                 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
12361                 // debug statements here
12362         }
12363         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
12364         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
12365                 if(!isWasmInitialized) {
12366                         throw new Error("initializeWasm() must be awaited first!");
12367                 }
12368                 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
12369                 return decodeArray(nativeResponseValue);
12370         }
12371         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
12372         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
12373                 if(!isWasmInitialized) {
12374                         throw new Error("initializeWasm() must be awaited first!");
12375                 }
12376                 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
12377                 // debug statements here
12378         }
12379         // 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);
12380         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
12381                 if(!isWasmInitialized) {
12382                         throw new Error("initializeWasm() must be awaited first!");
12383                 }
12384                 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
12385                 return nativeResponseValue;
12386         }
12387         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
12388         export function AnnouncementSignatures_clone(orig: number): number {
12389                 if(!isWasmInitialized) {
12390                         throw new Error("initializeWasm() must be awaited first!");
12391                 }
12392                 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
12393                 return nativeResponseValue;
12394         }
12395         // void NetAddress_free(struct LDKNetAddress this_ptr);
12396         export function NetAddress_free(this_ptr: number): void {
12397                 if(!isWasmInitialized) {
12398                         throw new Error("initializeWasm() must be awaited first!");
12399                 }
12400                 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
12401                 // debug statements here
12402         }
12403         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
12404         export function NetAddress_clone(orig: number): number {
12405                 if(!isWasmInitialized) {
12406                         throw new Error("initializeWasm() must be awaited first!");
12407                 }
12408                 const nativeResponseValue = wasm.NetAddress_clone(orig);
12409                 return nativeResponseValue;
12410         }
12411         // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
12412         export function NetAddress_ipv4(addr: Uint8Array, port: number): number {
12413                 if(!isWasmInitialized) {
12414                         throw new Error("initializeWasm() must be awaited first!");
12415                 }
12416                 const nativeResponseValue = wasm.NetAddress_ipv4(encodeArray(addr), port);
12417                 return nativeResponseValue;
12418         }
12419         // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
12420         export function NetAddress_ipv6(addr: Uint8Array, port: number): number {
12421                 if(!isWasmInitialized) {
12422                         throw new Error("initializeWasm() must be awaited first!");
12423                 }
12424                 const nativeResponseValue = wasm.NetAddress_ipv6(encodeArray(addr), port);
12425                 return nativeResponseValue;
12426         }
12427         // struct LDKNetAddress NetAddress_onion_v2(struct LDKTenBytes addr, uint16_t port);
12428         export function NetAddress_onion_v2(addr: Uint8Array, port: number): number {
12429                 if(!isWasmInitialized) {
12430                         throw new Error("initializeWasm() must be awaited first!");
12431                 }
12432                 const nativeResponseValue = wasm.NetAddress_onion_v2(encodeArray(addr), port);
12433                 return nativeResponseValue;
12434         }
12435         // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
12436         export function NetAddress_onion_v3(ed25519_pubkey: Uint8Array, checksum: number, version: number, port: number): number {
12437                 if(!isWasmInitialized) {
12438                         throw new Error("initializeWasm() must be awaited first!");
12439                 }
12440                 const nativeResponseValue = wasm.NetAddress_onion_v3(encodeArray(ed25519_pubkey), checksum, version, port);
12441                 return nativeResponseValue;
12442         }
12443         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
12444         export function NetAddress_write(obj: number): Uint8Array {
12445                 if(!isWasmInitialized) {
12446                         throw new Error("initializeWasm() must be awaited first!");
12447                 }
12448                 const nativeResponseValue = wasm.NetAddress_write(obj);
12449                 return decodeArray(nativeResponseValue);
12450         }
12451         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
12452         export function NetAddress_read(ser: Uint8Array): number {
12453                 if(!isWasmInitialized) {
12454                         throw new Error("initializeWasm() must be awaited first!");
12455                 }
12456                 const nativeResponseValue = wasm.NetAddress_read(encodeArray(ser));
12457                 return nativeResponseValue;
12458         }
12459         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
12460         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
12461                 if(!isWasmInitialized) {
12462                         throw new Error("initializeWasm() must be awaited first!");
12463                 }
12464                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
12465                 // debug statements here
12466         }
12467         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
12468         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
12469                 if(!isWasmInitialized) {
12470                         throw new Error("initializeWasm() must be awaited first!");
12471                 }
12472                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
12473                 return nativeResponseValue;
12474         }
12475         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
12476         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
12477                 if(!isWasmInitialized) {
12478                         throw new Error("initializeWasm() must be awaited first!");
12479                 }
12480                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
12481                 // debug statements here
12482         }
12483         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
12484         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
12485                 if(!isWasmInitialized) {
12486                         throw new Error("initializeWasm() must be awaited first!");
12487                 }
12488                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
12489                 return nativeResponseValue;
12490         }
12491         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
12492         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
12493                 if(!isWasmInitialized) {
12494                         throw new Error("initializeWasm() must be awaited first!");
12495                 }
12496                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
12497                 // debug statements here
12498         }
12499         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
12500         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
12501                 if(!isWasmInitialized) {
12502                         throw new Error("initializeWasm() must be awaited first!");
12503                 }
12504                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
12505                 return decodeArray(nativeResponseValue);
12506         }
12507         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12508         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
12509                 if(!isWasmInitialized) {
12510                         throw new Error("initializeWasm() must be awaited first!");
12511                 }
12512                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
12513                 // debug statements here
12514         }
12515         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
12516         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
12517                 if(!isWasmInitialized) {
12518                         throw new Error("initializeWasm() must be awaited first!");
12519                 }
12520                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
12521                 return decodeArray(nativeResponseValue);
12522         }
12523         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
12524         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
12525                 if(!isWasmInitialized) {
12526                         throw new Error("initializeWasm() must be awaited first!");
12527                 }
12528                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
12529                 // debug statements here
12530         }
12531         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
12532         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
12533                 if(!isWasmInitialized) {
12534                         throw new Error("initializeWasm() must be awaited first!");
12535                 }
12536                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
12537                 return decodeArray(nativeResponseValue);
12538         }
12539         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12540         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
12541                 if(!isWasmInitialized) {
12542                         throw new Error("initializeWasm() must be awaited first!");
12543                 }
12544                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
12545                 // debug statements here
12546         }
12547         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
12548         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
12549                 if(!isWasmInitialized) {
12550                         throw new Error("initializeWasm() must be awaited first!");
12551                 }
12552                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
12553                 // debug statements here
12554         }
12555         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
12556         export function UnsignedNodeAnnouncement_clone(orig: number): number {
12557                 if(!isWasmInitialized) {
12558                         throw new Error("initializeWasm() must be awaited first!");
12559                 }
12560                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
12561                 return nativeResponseValue;
12562         }
12563         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
12564         export function NodeAnnouncement_free(this_obj: number): void {
12565                 if(!isWasmInitialized) {
12566                         throw new Error("initializeWasm() must be awaited first!");
12567                 }
12568                 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
12569                 // debug statements here
12570         }
12571         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
12572         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
12573                 if(!isWasmInitialized) {
12574                         throw new Error("initializeWasm() must be awaited first!");
12575                 }
12576                 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
12577                 return decodeArray(nativeResponseValue);
12578         }
12579         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12580         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
12581                 if(!isWasmInitialized) {
12582                         throw new Error("initializeWasm() must be awaited first!");
12583                 }
12584                 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
12585                 // debug statements here
12586         }
12587         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
12588         export function NodeAnnouncement_get_contents(this_ptr: number): number {
12589                 if(!isWasmInitialized) {
12590                         throw new Error("initializeWasm() must be awaited first!");
12591                 }
12592                 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
12593                 return nativeResponseValue;
12594         }
12595         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
12596         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
12597                 if(!isWasmInitialized) {
12598                         throw new Error("initializeWasm() must be awaited first!");
12599                 }
12600                 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
12601                 // debug statements here
12602         }
12603         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
12604         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
12605                 if(!isWasmInitialized) {
12606                         throw new Error("initializeWasm() must be awaited first!");
12607                 }
12608                 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
12609                 return nativeResponseValue;
12610         }
12611         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
12612         export function NodeAnnouncement_clone(orig: number): number {
12613                 if(!isWasmInitialized) {
12614                         throw new Error("initializeWasm() must be awaited first!");
12615                 }
12616                 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
12617                 return nativeResponseValue;
12618         }
12619         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
12620         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
12621                 if(!isWasmInitialized) {
12622                         throw new Error("initializeWasm() must be awaited first!");
12623                 }
12624                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
12625                 // debug statements here
12626         }
12627         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12628         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
12629                 if(!isWasmInitialized) {
12630                         throw new Error("initializeWasm() must be awaited first!");
12631                 }
12632                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
12633                 return nativeResponseValue;
12634         }
12635         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
12636         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
12637                 if(!isWasmInitialized) {
12638                         throw new Error("initializeWasm() must be awaited first!");
12639                 }
12640                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
12641                 // debug statements here
12642         }
12643         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
12644         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
12645                 if(!isWasmInitialized) {
12646                         throw new Error("initializeWasm() must be awaited first!");
12647                 }
12648                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
12649                 return decodeArray(nativeResponseValue);
12650         }
12651         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12652         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12653                 if(!isWasmInitialized) {
12654                         throw new Error("initializeWasm() must be awaited first!");
12655                 }
12656                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
12657                 // debug statements here
12658         }
12659         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12660         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
12661                 if(!isWasmInitialized) {
12662                         throw new Error("initializeWasm() must be awaited first!");
12663                 }
12664                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
12665                 return nativeResponseValue;
12666         }
12667         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
12668         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
12669                 if(!isWasmInitialized) {
12670                         throw new Error("initializeWasm() must be awaited first!");
12671                 }
12672                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
12673                 // debug statements here
12674         }
12675         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12676         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
12677                 if(!isWasmInitialized) {
12678                         throw new Error("initializeWasm() must be awaited first!");
12679                 }
12680                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
12681                 return decodeArray(nativeResponseValue);
12682         }
12683         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12684         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
12685                 if(!isWasmInitialized) {
12686                         throw new Error("initializeWasm() must be awaited first!");
12687                 }
12688                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
12689                 // debug statements here
12690         }
12691         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12692         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
12693                 if(!isWasmInitialized) {
12694                         throw new Error("initializeWasm() must be awaited first!");
12695                 }
12696                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
12697                 return decodeArray(nativeResponseValue);
12698         }
12699         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12700         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
12701                 if(!isWasmInitialized) {
12702                         throw new Error("initializeWasm() must be awaited first!");
12703                 }
12704                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
12705                 // debug statements here
12706         }
12707         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12708         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
12709                 if(!isWasmInitialized) {
12710                         throw new Error("initializeWasm() must be awaited first!");
12711                 }
12712                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
12713                 return decodeArray(nativeResponseValue);
12714         }
12715         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12716         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
12717                 if(!isWasmInitialized) {
12718                         throw new Error("initializeWasm() must be awaited first!");
12719                 }
12720                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
12721                 // debug statements here
12722         }
12723         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12724         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
12725                 if(!isWasmInitialized) {
12726                         throw new Error("initializeWasm() must be awaited first!");
12727                 }
12728                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
12729                 return decodeArray(nativeResponseValue);
12730         }
12731         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12732         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
12733                 if(!isWasmInitialized) {
12734                         throw new Error("initializeWasm() must be awaited first!");
12735                 }
12736                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
12737                 // debug statements here
12738         }
12739         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
12740         export function UnsignedChannelAnnouncement_clone(orig: number): number {
12741                 if(!isWasmInitialized) {
12742                         throw new Error("initializeWasm() must be awaited first!");
12743                 }
12744                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
12745                 return nativeResponseValue;
12746         }
12747         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
12748         export function ChannelAnnouncement_free(this_obj: number): void {
12749                 if(!isWasmInitialized) {
12750                         throw new Error("initializeWasm() must be awaited first!");
12751                 }
12752                 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
12753                 // debug statements here
12754         }
12755         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12756         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
12757                 if(!isWasmInitialized) {
12758                         throw new Error("initializeWasm() must be awaited first!");
12759                 }
12760                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
12761                 return decodeArray(nativeResponseValue);
12762         }
12763         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12764         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
12765                 if(!isWasmInitialized) {
12766                         throw new Error("initializeWasm() must be awaited first!");
12767                 }
12768                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
12769                 // debug statements here
12770         }
12771         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12772         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
12773                 if(!isWasmInitialized) {
12774                         throw new Error("initializeWasm() must be awaited first!");
12775                 }
12776                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
12777                 return decodeArray(nativeResponseValue);
12778         }
12779         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12780         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
12781                 if(!isWasmInitialized) {
12782                         throw new Error("initializeWasm() must be awaited first!");
12783                 }
12784                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
12785                 // debug statements here
12786         }
12787         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12788         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
12789                 if(!isWasmInitialized) {
12790                         throw new Error("initializeWasm() must be awaited first!");
12791                 }
12792                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
12793                 return decodeArray(nativeResponseValue);
12794         }
12795         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12796         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
12797                 if(!isWasmInitialized) {
12798                         throw new Error("initializeWasm() must be awaited first!");
12799                 }
12800                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
12801                 // debug statements here
12802         }
12803         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12804         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
12805                 if(!isWasmInitialized) {
12806                         throw new Error("initializeWasm() must be awaited first!");
12807                 }
12808                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
12809                 return decodeArray(nativeResponseValue);
12810         }
12811         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12812         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
12813                 if(!isWasmInitialized) {
12814                         throw new Error("initializeWasm() must be awaited first!");
12815                 }
12816                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
12817                 // debug statements here
12818         }
12819         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12820         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
12821                 if(!isWasmInitialized) {
12822                         throw new Error("initializeWasm() must be awaited first!");
12823                 }
12824                 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
12825                 return nativeResponseValue;
12826         }
12827         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
12828         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
12829                 if(!isWasmInitialized) {
12830                         throw new Error("initializeWasm() must be awaited first!");
12831                 }
12832                 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
12833                 // debug statements here
12834         }
12835         // 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);
12836         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 {
12837                 if(!isWasmInitialized) {
12838                         throw new Error("initializeWasm() must be awaited first!");
12839                 }
12840                 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);
12841                 return nativeResponseValue;
12842         }
12843         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
12844         export function ChannelAnnouncement_clone(orig: number): number {
12845                 if(!isWasmInitialized) {
12846                         throw new Error("initializeWasm() must be awaited first!");
12847                 }
12848                 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
12849                 return nativeResponseValue;
12850         }
12851         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
12852         export function UnsignedChannelUpdate_free(this_obj: number): void {
12853                 if(!isWasmInitialized) {
12854                         throw new Error("initializeWasm() must be awaited first!");
12855                 }
12856                 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
12857                 // debug statements here
12858         }
12859         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
12860         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
12861                 if(!isWasmInitialized) {
12862                         throw new Error("initializeWasm() must be awaited first!");
12863                 }
12864                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
12865                 return decodeArray(nativeResponseValue);
12866         }
12867         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12868         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12869                 if(!isWasmInitialized) {
12870                         throw new Error("initializeWasm() must be awaited first!");
12871                 }
12872                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
12873                 // debug statements here
12874         }
12875         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12876         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
12877                 if(!isWasmInitialized) {
12878                         throw new Error("initializeWasm() must be awaited first!");
12879                 }
12880                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
12881                 return nativeResponseValue;
12882         }
12883         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
12884         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
12885                 if(!isWasmInitialized) {
12886                         throw new Error("initializeWasm() must be awaited first!");
12887                 }
12888                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
12889                 // debug statements here
12890         }
12891         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12892         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
12893                 if(!isWasmInitialized) {
12894                         throw new Error("initializeWasm() must be awaited first!");
12895                 }
12896                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
12897                 return nativeResponseValue;
12898         }
12899         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12900         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
12901                 if(!isWasmInitialized) {
12902                         throw new Error("initializeWasm() must be awaited first!");
12903                 }
12904                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
12905                 // debug statements here
12906         }
12907         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12908         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
12909                 if(!isWasmInitialized) {
12910                         throw new Error("initializeWasm() must be awaited first!");
12911                 }
12912                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
12913                 return nativeResponseValue;
12914         }
12915         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
12916         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
12917                 if(!isWasmInitialized) {
12918                         throw new Error("initializeWasm() must be awaited first!");
12919                 }
12920                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
12921                 // debug statements here
12922         }
12923         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12924         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
12925                 if(!isWasmInitialized) {
12926                         throw new Error("initializeWasm() must be awaited first!");
12927                 }
12928                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
12929                 return nativeResponseValue;
12930         }
12931         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
12932         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
12933                 if(!isWasmInitialized) {
12934                         throw new Error("initializeWasm() must be awaited first!");
12935                 }
12936                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
12937                 // debug statements here
12938         }
12939         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12940         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
12941                 if(!isWasmInitialized) {
12942                         throw new Error("initializeWasm() must be awaited first!");
12943                 }
12944                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
12945                 return nativeResponseValue;
12946         }
12947         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
12948         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
12949                 if(!isWasmInitialized) {
12950                         throw new Error("initializeWasm() must be awaited first!");
12951                 }
12952                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
12953                 // debug statements here
12954         }
12955         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12956         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
12957                 if(!isWasmInitialized) {
12958                         throw new Error("initializeWasm() must be awaited first!");
12959                 }
12960                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
12961                 return nativeResponseValue;
12962         }
12963         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12964         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
12965                 if(!isWasmInitialized) {
12966                         throw new Error("initializeWasm() must be awaited first!");
12967                 }
12968                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
12969                 // debug statements here
12970         }
12971         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12972         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
12973                 if(!isWasmInitialized) {
12974                         throw new Error("initializeWasm() must be awaited first!");
12975                 }
12976                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
12977                 return nativeResponseValue;
12978         }
12979         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12980         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
12981                 if(!isWasmInitialized) {
12982                         throw new Error("initializeWasm() must be awaited first!");
12983                 }
12984                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
12985                 // debug statements here
12986         }
12987         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
12988         export function UnsignedChannelUpdate_clone(orig: number): number {
12989                 if(!isWasmInitialized) {
12990                         throw new Error("initializeWasm() must be awaited first!");
12991                 }
12992                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
12993                 return nativeResponseValue;
12994         }
12995         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
12996         export function ChannelUpdate_free(this_obj: number): void {
12997                 if(!isWasmInitialized) {
12998                         throw new Error("initializeWasm() must be awaited first!");
12999                 }
13000                 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
13001                 // debug statements here
13002         }
13003         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
13004         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
13005                 if(!isWasmInitialized) {
13006                         throw new Error("initializeWasm() must be awaited first!");
13007                 }
13008                 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
13009                 return decodeArray(nativeResponseValue);
13010         }
13011         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
13012         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
13013                 if(!isWasmInitialized) {
13014                         throw new Error("initializeWasm() must be awaited first!");
13015                 }
13016                 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
13017                 // debug statements here
13018         }
13019         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
13020         export function ChannelUpdate_get_contents(this_ptr: number): number {
13021                 if(!isWasmInitialized) {
13022                         throw new Error("initializeWasm() must be awaited first!");
13023                 }
13024                 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
13025                 return nativeResponseValue;
13026         }
13027         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
13028         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
13029                 if(!isWasmInitialized) {
13030                         throw new Error("initializeWasm() must be awaited first!");
13031                 }
13032                 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
13033                 // debug statements here
13034         }
13035         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
13036         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
13037                 if(!isWasmInitialized) {
13038                         throw new Error("initializeWasm() must be awaited first!");
13039                 }
13040                 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
13041                 return nativeResponseValue;
13042         }
13043         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
13044         export function ChannelUpdate_clone(orig: number): number {
13045                 if(!isWasmInitialized) {
13046                         throw new Error("initializeWasm() must be awaited first!");
13047                 }
13048                 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
13049                 return nativeResponseValue;
13050         }
13051         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
13052         export function QueryChannelRange_free(this_obj: number): void {
13053                 if(!isWasmInitialized) {
13054                         throw new Error("initializeWasm() must be awaited first!");
13055                 }
13056                 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
13057                 // debug statements here
13058         }
13059         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
13060         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
13061                 if(!isWasmInitialized) {
13062                         throw new Error("initializeWasm() must be awaited first!");
13063                 }
13064                 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
13065                 return decodeArray(nativeResponseValue);
13066         }
13067         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13068         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
13069                 if(!isWasmInitialized) {
13070                         throw new Error("initializeWasm() must be awaited first!");
13071                 }
13072                 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
13073                 // debug statements here
13074         }
13075         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
13076         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
13077                 if(!isWasmInitialized) {
13078                         throw new Error("initializeWasm() must be awaited first!");
13079                 }
13080                 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
13081                 return nativeResponseValue;
13082         }
13083         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
13084         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
13085                 if(!isWasmInitialized) {
13086                         throw new Error("initializeWasm() must be awaited first!");
13087                 }
13088                 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
13089                 // debug statements here
13090         }
13091         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
13092         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
13093                 if(!isWasmInitialized) {
13094                         throw new Error("initializeWasm() must be awaited first!");
13095                 }
13096                 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
13097                 return nativeResponseValue;
13098         }
13099         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
13100         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
13101                 if(!isWasmInitialized) {
13102                         throw new Error("initializeWasm() must be awaited first!");
13103                 }
13104                 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
13105                 // debug statements here
13106         }
13107         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
13108         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
13109                 if(!isWasmInitialized) {
13110                         throw new Error("initializeWasm() must be awaited first!");
13111                 }
13112                 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
13113                 return nativeResponseValue;
13114         }
13115         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
13116         export function QueryChannelRange_clone(orig: number): number {
13117                 if(!isWasmInitialized) {
13118                         throw new Error("initializeWasm() must be awaited first!");
13119                 }
13120                 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
13121                 return nativeResponseValue;
13122         }
13123         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
13124         export function ReplyChannelRange_free(this_obj: number): void {
13125                 if(!isWasmInitialized) {
13126                         throw new Error("initializeWasm() must be awaited first!");
13127                 }
13128                 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
13129                 // debug statements here
13130         }
13131         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
13132         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
13133                 if(!isWasmInitialized) {
13134                         throw new Error("initializeWasm() must be awaited first!");
13135                 }
13136                 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
13137                 return decodeArray(nativeResponseValue);
13138         }
13139         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13140         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
13141                 if(!isWasmInitialized) {
13142                         throw new Error("initializeWasm() must be awaited first!");
13143                 }
13144                 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
13145                 // debug statements here
13146         }
13147         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
13148         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
13149                 if(!isWasmInitialized) {
13150                         throw new Error("initializeWasm() must be awaited first!");
13151                 }
13152                 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
13153                 return nativeResponseValue;
13154         }
13155         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
13156         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
13157                 if(!isWasmInitialized) {
13158                         throw new Error("initializeWasm() must be awaited first!");
13159                 }
13160                 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
13161                 // debug statements here
13162         }
13163         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
13164         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
13165                 if(!isWasmInitialized) {
13166                         throw new Error("initializeWasm() must be awaited first!");
13167                 }
13168                 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
13169                 return nativeResponseValue;
13170         }
13171         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
13172         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
13173                 if(!isWasmInitialized) {
13174                         throw new Error("initializeWasm() must be awaited first!");
13175                 }
13176                 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
13177                 // debug statements here
13178         }
13179         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
13180         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
13181                 if(!isWasmInitialized) {
13182                         throw new Error("initializeWasm() must be awaited first!");
13183                 }
13184                 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
13185                 return nativeResponseValue;
13186         }
13187         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
13188         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
13189                 if(!isWasmInitialized) {
13190                         throw new Error("initializeWasm() must be awaited first!");
13191                 }
13192                 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
13193                 // debug statements here
13194         }
13195         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
13196         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
13197                 if(!isWasmInitialized) {
13198                         throw new Error("initializeWasm() must be awaited first!");
13199                 }
13200                 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
13201                 // debug statements here
13202         }
13203         // 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);
13204         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 {
13205                 if(!isWasmInitialized) {
13206                         throw new Error("initializeWasm() must be awaited first!");
13207                 }
13208                 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
13209                 return nativeResponseValue;
13210         }
13211         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
13212         export function ReplyChannelRange_clone(orig: number): number {
13213                 if(!isWasmInitialized) {
13214                         throw new Error("initializeWasm() must be awaited first!");
13215                 }
13216                 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
13217                 return nativeResponseValue;
13218         }
13219         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
13220         export function QueryShortChannelIds_free(this_obj: number): void {
13221                 if(!isWasmInitialized) {
13222                         throw new Error("initializeWasm() must be awaited first!");
13223                 }
13224                 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
13225                 // debug statements here
13226         }
13227         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
13228         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
13229                 if(!isWasmInitialized) {
13230                         throw new Error("initializeWasm() must be awaited first!");
13231                 }
13232                 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
13233                 return decodeArray(nativeResponseValue);
13234         }
13235         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13236         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
13237                 if(!isWasmInitialized) {
13238                         throw new Error("initializeWasm() must be awaited first!");
13239                 }
13240                 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
13241                 // debug statements here
13242         }
13243         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
13244         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
13245                 if(!isWasmInitialized) {
13246                         throw new Error("initializeWasm() must be awaited first!");
13247                 }
13248                 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
13249                 // debug statements here
13250         }
13251         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
13252         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
13253                 if(!isWasmInitialized) {
13254                         throw new Error("initializeWasm() must be awaited first!");
13255                 }
13256                 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
13257                 return nativeResponseValue;
13258         }
13259         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
13260         export function QueryShortChannelIds_clone(orig: number): number {
13261                 if(!isWasmInitialized) {
13262                         throw new Error("initializeWasm() must be awaited first!");
13263                 }
13264                 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
13265                 return nativeResponseValue;
13266         }
13267         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
13268         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
13269                 if(!isWasmInitialized) {
13270                         throw new Error("initializeWasm() must be awaited first!");
13271                 }
13272                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
13273                 // debug statements here
13274         }
13275         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
13276         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
13277                 if(!isWasmInitialized) {
13278                         throw new Error("initializeWasm() must be awaited first!");
13279                 }
13280                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
13281                 return decodeArray(nativeResponseValue);
13282         }
13283         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13284         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
13285                 if(!isWasmInitialized) {
13286                         throw new Error("initializeWasm() must be awaited first!");
13287                 }
13288                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
13289                 // debug statements here
13290         }
13291         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
13292         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
13293                 if(!isWasmInitialized) {
13294                         throw new Error("initializeWasm() must be awaited first!");
13295                 }
13296                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
13297                 return nativeResponseValue;
13298         }
13299         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
13300         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
13301                 if(!isWasmInitialized) {
13302                         throw new Error("initializeWasm() must be awaited first!");
13303                 }
13304                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
13305                 // debug statements here
13306         }
13307         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
13308         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
13309                 if(!isWasmInitialized) {
13310                         throw new Error("initializeWasm() must be awaited first!");
13311                 }
13312                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
13313                 return nativeResponseValue;
13314         }
13315         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
13316         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
13317                 if(!isWasmInitialized) {
13318                         throw new Error("initializeWasm() must be awaited first!");
13319                 }
13320                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
13321                 return nativeResponseValue;
13322         }
13323         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
13324         export function GossipTimestampFilter_free(this_obj: number): void {
13325                 if(!isWasmInitialized) {
13326                         throw new Error("initializeWasm() must be awaited first!");
13327                 }
13328                 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
13329                 // debug statements here
13330         }
13331         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
13332         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
13333                 if(!isWasmInitialized) {
13334                         throw new Error("initializeWasm() must be awaited first!");
13335                 }
13336                 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
13337                 return decodeArray(nativeResponseValue);
13338         }
13339         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13340         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
13341                 if(!isWasmInitialized) {
13342                         throw new Error("initializeWasm() must be awaited first!");
13343                 }
13344                 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
13345                 // debug statements here
13346         }
13347         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
13348         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
13349                 if(!isWasmInitialized) {
13350                         throw new Error("initializeWasm() must be awaited first!");
13351                 }
13352                 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
13353                 return nativeResponseValue;
13354         }
13355         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
13356         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
13357                 if(!isWasmInitialized) {
13358                         throw new Error("initializeWasm() must be awaited first!");
13359                 }
13360                 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
13361                 // debug statements here
13362         }
13363         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
13364         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
13365                 if(!isWasmInitialized) {
13366                         throw new Error("initializeWasm() must be awaited first!");
13367                 }
13368                 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
13369                 return nativeResponseValue;
13370         }
13371         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
13372         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
13373                 if(!isWasmInitialized) {
13374                         throw new Error("initializeWasm() must be awaited first!");
13375                 }
13376                 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
13377                 // debug statements here
13378         }
13379         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
13380         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
13381                 if(!isWasmInitialized) {
13382                         throw new Error("initializeWasm() must be awaited first!");
13383                 }
13384                 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
13385                 return nativeResponseValue;
13386         }
13387         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
13388         export function GossipTimestampFilter_clone(orig: number): number {
13389                 if(!isWasmInitialized) {
13390                         throw new Error("initializeWasm() must be awaited first!");
13391                 }
13392                 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
13393                 return nativeResponseValue;
13394         }
13395         // void ErrorAction_free(struct LDKErrorAction this_ptr);
13396         export function ErrorAction_free(this_ptr: number): void {
13397                 if(!isWasmInitialized) {
13398                         throw new Error("initializeWasm() must be awaited first!");
13399                 }
13400                 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
13401                 // debug statements here
13402         }
13403         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
13404         export function ErrorAction_clone(orig: number): number {
13405                 if(!isWasmInitialized) {
13406                         throw new Error("initializeWasm() must be awaited first!");
13407                 }
13408                 const nativeResponseValue = wasm.ErrorAction_clone(orig);
13409                 return nativeResponseValue;
13410         }
13411         // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
13412         export function ErrorAction_disconnect_peer(msg: number): number {
13413                 if(!isWasmInitialized) {
13414                         throw new Error("initializeWasm() must be awaited first!");
13415                 }
13416                 const nativeResponseValue = wasm.ErrorAction_disconnect_peer(msg);
13417                 return nativeResponseValue;
13418         }
13419         // struct LDKErrorAction ErrorAction_ignore_error(void);
13420         export function ErrorAction_ignore_error(): number {
13421                 if(!isWasmInitialized) {
13422                         throw new Error("initializeWasm() must be awaited first!");
13423                 }
13424                 const nativeResponseValue = wasm.ErrorAction_ignore_error();
13425                 return nativeResponseValue;
13426         }
13427         // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
13428         export function ErrorAction_ignore_and_log(a: Level): number {
13429                 if(!isWasmInitialized) {
13430                         throw new Error("initializeWasm() must be awaited first!");
13431                 }
13432                 const nativeResponseValue = wasm.ErrorAction_ignore_and_log(a);
13433                 return nativeResponseValue;
13434         }
13435         // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
13436         export function ErrorAction_send_error_message(msg: number): number {
13437                 if(!isWasmInitialized) {
13438                         throw new Error("initializeWasm() must be awaited first!");
13439                 }
13440                 const nativeResponseValue = wasm.ErrorAction_send_error_message(msg);
13441                 return nativeResponseValue;
13442         }
13443         // void LightningError_free(struct LDKLightningError this_obj);
13444         export function LightningError_free(this_obj: number): void {
13445                 if(!isWasmInitialized) {
13446                         throw new Error("initializeWasm() must be awaited first!");
13447                 }
13448                 const nativeResponseValue = wasm.LightningError_free(this_obj);
13449                 // debug statements here
13450         }
13451         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
13452         export function LightningError_get_err(this_ptr: number): String {
13453                 if(!isWasmInitialized) {
13454                         throw new Error("initializeWasm() must be awaited first!");
13455                 }
13456                 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
13457                 return nativeResponseValue;
13458         }
13459         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
13460         export function LightningError_set_err(this_ptr: number, val: String): void {
13461                 if(!isWasmInitialized) {
13462                         throw new Error("initializeWasm() must be awaited first!");
13463                 }
13464                 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, val);
13465                 // debug statements here
13466         }
13467         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
13468         export function LightningError_get_action(this_ptr: number): number {
13469                 if(!isWasmInitialized) {
13470                         throw new Error("initializeWasm() must be awaited first!");
13471                 }
13472                 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
13473                 return nativeResponseValue;
13474         }
13475         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
13476         export function LightningError_set_action(this_ptr: number, val: number): void {
13477                 if(!isWasmInitialized) {
13478                         throw new Error("initializeWasm() must be awaited first!");
13479                 }
13480                 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
13481                 // debug statements here
13482         }
13483         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
13484         export function LightningError_new(err_arg: String, action_arg: number): number {
13485                 if(!isWasmInitialized) {
13486                         throw new Error("initializeWasm() must be awaited first!");
13487                 }
13488                 const nativeResponseValue = wasm.LightningError_new(err_arg, action_arg);
13489                 return nativeResponseValue;
13490         }
13491         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
13492         export function LightningError_clone(orig: number): number {
13493                 if(!isWasmInitialized) {
13494                         throw new Error("initializeWasm() must be awaited first!");
13495                 }
13496                 const nativeResponseValue = wasm.LightningError_clone(orig);
13497                 return nativeResponseValue;
13498         }
13499         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
13500         export function CommitmentUpdate_free(this_obj: number): void {
13501                 if(!isWasmInitialized) {
13502                         throw new Error("initializeWasm() must be awaited first!");
13503                 }
13504                 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
13505                 // debug statements here
13506         }
13507         // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13508         export function CommitmentUpdate_get_update_add_htlcs(this_ptr: number): number[] {
13509                 if(!isWasmInitialized) {
13510                         throw new Error("initializeWasm() must be awaited first!");
13511                 }
13512                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_add_htlcs(this_ptr);
13513                 return nativeResponseValue;
13514         }
13515         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
13516         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
13517                 if(!isWasmInitialized) {
13518                         throw new Error("initializeWasm() must be awaited first!");
13519                 }
13520                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
13521                 // debug statements here
13522         }
13523         // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13524         export function CommitmentUpdate_get_update_fulfill_htlcs(this_ptr: number): number[] {
13525                 if(!isWasmInitialized) {
13526                         throw new Error("initializeWasm() must be awaited first!");
13527                 }
13528                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fulfill_htlcs(this_ptr);
13529                 return nativeResponseValue;
13530         }
13531         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
13532         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
13533                 if(!isWasmInitialized) {
13534                         throw new Error("initializeWasm() must be awaited first!");
13535                 }
13536                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
13537                 // debug statements here
13538         }
13539         // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13540         export function CommitmentUpdate_get_update_fail_htlcs(this_ptr: number): number[] {
13541                 if(!isWasmInitialized) {
13542                         throw new Error("initializeWasm() must be awaited first!");
13543                 }
13544                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_htlcs(this_ptr);
13545                 return nativeResponseValue;
13546         }
13547         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
13548         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
13549                 if(!isWasmInitialized) {
13550                         throw new Error("initializeWasm() must be awaited first!");
13551                 }
13552                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
13553                 // debug statements here
13554         }
13555         // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13556         export function CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr: number): number[] {
13557                 if(!isWasmInitialized) {
13558                         throw new Error("initializeWasm() must be awaited first!");
13559                 }
13560                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr);
13561                 return nativeResponseValue;
13562         }
13563         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
13564         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
13565                 if(!isWasmInitialized) {
13566                         throw new Error("initializeWasm() must be awaited first!");
13567                 }
13568                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
13569                 // debug statements here
13570         }
13571         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13572         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
13573                 if(!isWasmInitialized) {
13574                         throw new Error("initializeWasm() must be awaited first!");
13575                 }
13576                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
13577                 return nativeResponseValue;
13578         }
13579         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
13580         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
13581                 if(!isWasmInitialized) {
13582                         throw new Error("initializeWasm() must be awaited first!");
13583                 }
13584                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
13585                 // debug statements here
13586         }
13587         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13588         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
13589                 if(!isWasmInitialized) {
13590                         throw new Error("initializeWasm() must be awaited first!");
13591                 }
13592                 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
13593                 return nativeResponseValue;
13594         }
13595         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
13596         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
13597                 if(!isWasmInitialized) {
13598                         throw new Error("initializeWasm() must be awaited first!");
13599                 }
13600                 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
13601                 // debug statements here
13602         }
13603         // 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);
13604         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 {
13605                 if(!isWasmInitialized) {
13606                         throw new Error("initializeWasm() must be awaited first!");
13607                 }
13608                 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);
13609                 return nativeResponseValue;
13610         }
13611         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
13612         export function CommitmentUpdate_clone(orig: number): number {
13613                 if(!isWasmInitialized) {
13614                         throw new Error("initializeWasm() must be awaited first!");
13615                 }
13616                 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
13617                 return nativeResponseValue;
13618         }
13619         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
13620         export function ChannelMessageHandler_free(this_ptr: number): void {
13621                 if(!isWasmInitialized) {
13622                         throw new Error("initializeWasm() must be awaited first!");
13623                 }
13624                 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
13625                 // debug statements here
13626         }
13627         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
13628         export function RoutingMessageHandler_free(this_ptr: number): void {
13629                 if(!isWasmInitialized) {
13630                         throw new Error("initializeWasm() must be awaited first!");
13631                 }
13632                 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
13633                 // debug statements here
13634         }
13635         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
13636         export function AcceptChannel_write(obj: number): Uint8Array {
13637                 if(!isWasmInitialized) {
13638                         throw new Error("initializeWasm() must be awaited first!");
13639                 }
13640                 const nativeResponseValue = wasm.AcceptChannel_write(obj);
13641                 return decodeArray(nativeResponseValue);
13642         }
13643         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
13644         export function AcceptChannel_read(ser: Uint8Array): number {
13645                 if(!isWasmInitialized) {
13646                         throw new Error("initializeWasm() must be awaited first!");
13647                 }
13648                 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
13649                 return nativeResponseValue;
13650         }
13651         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
13652         export function AnnouncementSignatures_write(obj: number): Uint8Array {
13653                 if(!isWasmInitialized) {
13654                         throw new Error("initializeWasm() must be awaited first!");
13655                 }
13656                 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
13657                 return decodeArray(nativeResponseValue);
13658         }
13659         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
13660         export function AnnouncementSignatures_read(ser: Uint8Array): number {
13661                 if(!isWasmInitialized) {
13662                         throw new Error("initializeWasm() must be awaited first!");
13663                 }
13664                 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
13665                 return nativeResponseValue;
13666         }
13667         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
13668         export function ChannelReestablish_write(obj: number): Uint8Array {
13669                 if(!isWasmInitialized) {
13670                         throw new Error("initializeWasm() must be awaited first!");
13671                 }
13672                 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
13673                 return decodeArray(nativeResponseValue);
13674         }
13675         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
13676         export function ChannelReestablish_read(ser: Uint8Array): number {
13677                 if(!isWasmInitialized) {
13678                         throw new Error("initializeWasm() must be awaited first!");
13679                 }
13680                 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
13681                 return nativeResponseValue;
13682         }
13683         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
13684         export function ClosingSigned_write(obj: number): Uint8Array {
13685                 if(!isWasmInitialized) {
13686                         throw new Error("initializeWasm() must be awaited first!");
13687                 }
13688                 const nativeResponseValue = wasm.ClosingSigned_write(obj);
13689                 return decodeArray(nativeResponseValue);
13690         }
13691         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
13692         export function ClosingSigned_read(ser: Uint8Array): number {
13693                 if(!isWasmInitialized) {
13694                         throw new Error("initializeWasm() must be awaited first!");
13695                 }
13696                 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
13697                 return nativeResponseValue;
13698         }
13699         // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
13700         export function ClosingSignedFeeRange_write(obj: number): Uint8Array {
13701                 if(!isWasmInitialized) {
13702                         throw new Error("initializeWasm() must be awaited first!");
13703                 }
13704                 const nativeResponseValue = wasm.ClosingSignedFeeRange_write(obj);
13705                 return decodeArray(nativeResponseValue);
13706         }
13707         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
13708         export function ClosingSignedFeeRange_read(ser: Uint8Array): number {
13709                 if(!isWasmInitialized) {
13710                         throw new Error("initializeWasm() must be awaited first!");
13711                 }
13712                 const nativeResponseValue = wasm.ClosingSignedFeeRange_read(encodeArray(ser));
13713                 return nativeResponseValue;
13714         }
13715         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
13716         export function CommitmentSigned_write(obj: number): Uint8Array {
13717                 if(!isWasmInitialized) {
13718                         throw new Error("initializeWasm() must be awaited first!");
13719                 }
13720                 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
13721                 return decodeArray(nativeResponseValue);
13722         }
13723         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
13724         export function CommitmentSigned_read(ser: Uint8Array): number {
13725                 if(!isWasmInitialized) {
13726                         throw new Error("initializeWasm() must be awaited first!");
13727                 }
13728                 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
13729                 return nativeResponseValue;
13730         }
13731         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
13732         export function FundingCreated_write(obj: number): Uint8Array {
13733                 if(!isWasmInitialized) {
13734                         throw new Error("initializeWasm() must be awaited first!");
13735                 }
13736                 const nativeResponseValue = wasm.FundingCreated_write(obj);
13737                 return decodeArray(nativeResponseValue);
13738         }
13739         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
13740         export function FundingCreated_read(ser: Uint8Array): number {
13741                 if(!isWasmInitialized) {
13742                         throw new Error("initializeWasm() must be awaited first!");
13743                 }
13744                 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
13745                 return nativeResponseValue;
13746         }
13747         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
13748         export function FundingSigned_write(obj: number): Uint8Array {
13749                 if(!isWasmInitialized) {
13750                         throw new Error("initializeWasm() must be awaited first!");
13751                 }
13752                 const nativeResponseValue = wasm.FundingSigned_write(obj);
13753                 return decodeArray(nativeResponseValue);
13754         }
13755         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
13756         export function FundingSigned_read(ser: Uint8Array): number {
13757                 if(!isWasmInitialized) {
13758                         throw new Error("initializeWasm() must be awaited first!");
13759                 }
13760                 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
13761                 return nativeResponseValue;
13762         }
13763         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
13764         export function FundingLocked_write(obj: number): Uint8Array {
13765                 if(!isWasmInitialized) {
13766                         throw new Error("initializeWasm() must be awaited first!");
13767                 }
13768                 const nativeResponseValue = wasm.FundingLocked_write(obj);
13769                 return decodeArray(nativeResponseValue);
13770         }
13771         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
13772         export function FundingLocked_read(ser: Uint8Array): number {
13773                 if(!isWasmInitialized) {
13774                         throw new Error("initializeWasm() must be awaited first!");
13775                 }
13776                 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
13777                 return nativeResponseValue;
13778         }
13779         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
13780         export function Init_write(obj: number): Uint8Array {
13781                 if(!isWasmInitialized) {
13782                         throw new Error("initializeWasm() must be awaited first!");
13783                 }
13784                 const nativeResponseValue = wasm.Init_write(obj);
13785                 return decodeArray(nativeResponseValue);
13786         }
13787         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
13788         export function Init_read(ser: Uint8Array): number {
13789                 if(!isWasmInitialized) {
13790                         throw new Error("initializeWasm() must be awaited first!");
13791                 }
13792                 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
13793                 return nativeResponseValue;
13794         }
13795         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
13796         export function OpenChannel_write(obj: number): Uint8Array {
13797                 if(!isWasmInitialized) {
13798                         throw new Error("initializeWasm() must be awaited first!");
13799                 }
13800                 const nativeResponseValue = wasm.OpenChannel_write(obj);
13801                 return decodeArray(nativeResponseValue);
13802         }
13803         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
13804         export function OpenChannel_read(ser: Uint8Array): number {
13805                 if(!isWasmInitialized) {
13806                         throw new Error("initializeWasm() must be awaited first!");
13807                 }
13808                 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
13809                 return nativeResponseValue;
13810         }
13811         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
13812         export function RevokeAndACK_write(obj: number): Uint8Array {
13813                 if(!isWasmInitialized) {
13814                         throw new Error("initializeWasm() must be awaited first!");
13815                 }
13816                 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
13817                 return decodeArray(nativeResponseValue);
13818         }
13819         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
13820         export function RevokeAndACK_read(ser: Uint8Array): number {
13821                 if(!isWasmInitialized) {
13822                         throw new Error("initializeWasm() must be awaited first!");
13823                 }
13824                 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
13825                 return nativeResponseValue;
13826         }
13827         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
13828         export function Shutdown_write(obj: number): Uint8Array {
13829                 if(!isWasmInitialized) {
13830                         throw new Error("initializeWasm() must be awaited first!");
13831                 }
13832                 const nativeResponseValue = wasm.Shutdown_write(obj);
13833                 return decodeArray(nativeResponseValue);
13834         }
13835         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
13836         export function Shutdown_read(ser: Uint8Array): number {
13837                 if(!isWasmInitialized) {
13838                         throw new Error("initializeWasm() must be awaited first!");
13839                 }
13840                 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
13841                 return nativeResponseValue;
13842         }
13843         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
13844         export function UpdateFailHTLC_write(obj: number): Uint8Array {
13845                 if(!isWasmInitialized) {
13846                         throw new Error("initializeWasm() must be awaited first!");
13847                 }
13848                 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
13849                 return decodeArray(nativeResponseValue);
13850         }
13851         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
13852         export function UpdateFailHTLC_read(ser: Uint8Array): number {
13853                 if(!isWasmInitialized) {
13854                         throw new Error("initializeWasm() must be awaited first!");
13855                 }
13856                 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
13857                 return nativeResponseValue;
13858         }
13859         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
13860         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
13861                 if(!isWasmInitialized) {
13862                         throw new Error("initializeWasm() must be awaited first!");
13863                 }
13864                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
13865                 return decodeArray(nativeResponseValue);
13866         }
13867         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
13868         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
13869                 if(!isWasmInitialized) {
13870                         throw new Error("initializeWasm() must be awaited first!");
13871                 }
13872                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
13873                 return nativeResponseValue;
13874         }
13875         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
13876         export function UpdateFee_write(obj: number): Uint8Array {
13877                 if(!isWasmInitialized) {
13878                         throw new Error("initializeWasm() must be awaited first!");
13879                 }
13880                 const nativeResponseValue = wasm.UpdateFee_write(obj);
13881                 return decodeArray(nativeResponseValue);
13882         }
13883         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
13884         export function UpdateFee_read(ser: Uint8Array): number {
13885                 if(!isWasmInitialized) {
13886                         throw new Error("initializeWasm() must be awaited first!");
13887                 }
13888                 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
13889                 return nativeResponseValue;
13890         }
13891         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
13892         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
13893                 if(!isWasmInitialized) {
13894                         throw new Error("initializeWasm() must be awaited first!");
13895                 }
13896                 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
13897                 return decodeArray(nativeResponseValue);
13898         }
13899         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
13900         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
13901                 if(!isWasmInitialized) {
13902                         throw new Error("initializeWasm() must be awaited first!");
13903                 }
13904                 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
13905                 return nativeResponseValue;
13906         }
13907         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
13908         export function UpdateAddHTLC_write(obj: number): Uint8Array {
13909                 if(!isWasmInitialized) {
13910                         throw new Error("initializeWasm() must be awaited first!");
13911                 }
13912                 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
13913                 return decodeArray(nativeResponseValue);
13914         }
13915         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
13916         export function UpdateAddHTLC_read(ser: Uint8Array): number {
13917                 if(!isWasmInitialized) {
13918                         throw new Error("initializeWasm() must be awaited first!");
13919                 }
13920                 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
13921                 return nativeResponseValue;
13922         }
13923         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
13924         export function Ping_write(obj: number): Uint8Array {
13925                 if(!isWasmInitialized) {
13926                         throw new Error("initializeWasm() must be awaited first!");
13927                 }
13928                 const nativeResponseValue = wasm.Ping_write(obj);
13929                 return decodeArray(nativeResponseValue);
13930         }
13931         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
13932         export function Ping_read(ser: Uint8Array): number {
13933                 if(!isWasmInitialized) {
13934                         throw new Error("initializeWasm() must be awaited first!");
13935                 }
13936                 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
13937                 return nativeResponseValue;
13938         }
13939         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
13940         export function Pong_write(obj: number): Uint8Array {
13941                 if(!isWasmInitialized) {
13942                         throw new Error("initializeWasm() must be awaited first!");
13943                 }
13944                 const nativeResponseValue = wasm.Pong_write(obj);
13945                 return decodeArray(nativeResponseValue);
13946         }
13947         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
13948         export function Pong_read(ser: Uint8Array): number {
13949                 if(!isWasmInitialized) {
13950                         throw new Error("initializeWasm() must be awaited first!");
13951                 }
13952                 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
13953                 return nativeResponseValue;
13954         }
13955         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
13956         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
13957                 if(!isWasmInitialized) {
13958                         throw new Error("initializeWasm() must be awaited first!");
13959                 }
13960                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
13961                 return decodeArray(nativeResponseValue);
13962         }
13963         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
13964         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
13965                 if(!isWasmInitialized) {
13966                         throw new Error("initializeWasm() must be awaited first!");
13967                 }
13968                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
13969                 return nativeResponseValue;
13970         }
13971         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
13972         export function ChannelAnnouncement_write(obj: number): Uint8Array {
13973                 if(!isWasmInitialized) {
13974                         throw new Error("initializeWasm() must be awaited first!");
13975                 }
13976                 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
13977                 return decodeArray(nativeResponseValue);
13978         }
13979         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
13980         export function ChannelAnnouncement_read(ser: Uint8Array): number {
13981                 if(!isWasmInitialized) {
13982                         throw new Error("initializeWasm() must be awaited first!");
13983                 }
13984                 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
13985                 return nativeResponseValue;
13986         }
13987         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
13988         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
13989                 if(!isWasmInitialized) {
13990                         throw new Error("initializeWasm() must be awaited first!");
13991                 }
13992                 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
13993                 return decodeArray(nativeResponseValue);
13994         }
13995         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
13996         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
13997                 if(!isWasmInitialized) {
13998                         throw new Error("initializeWasm() must be awaited first!");
13999                 }
14000                 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
14001                 return nativeResponseValue;
14002         }
14003         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
14004         export function ChannelUpdate_write(obj: number): Uint8Array {
14005                 if(!isWasmInitialized) {
14006                         throw new Error("initializeWasm() must be awaited first!");
14007                 }
14008                 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
14009                 return decodeArray(nativeResponseValue);
14010         }
14011         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
14012         export function ChannelUpdate_read(ser: Uint8Array): number {
14013                 if(!isWasmInitialized) {
14014                         throw new Error("initializeWasm() must be awaited first!");
14015                 }
14016                 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
14017                 return nativeResponseValue;
14018         }
14019         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
14020         export function ErrorMessage_write(obj: number): Uint8Array {
14021                 if(!isWasmInitialized) {
14022                         throw new Error("initializeWasm() must be awaited first!");
14023                 }
14024                 const nativeResponseValue = wasm.ErrorMessage_write(obj);
14025                 return decodeArray(nativeResponseValue);
14026         }
14027         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
14028         export function ErrorMessage_read(ser: Uint8Array): number {
14029                 if(!isWasmInitialized) {
14030                         throw new Error("initializeWasm() must be awaited first!");
14031                 }
14032                 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
14033                 return nativeResponseValue;
14034         }
14035         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
14036         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
14037                 if(!isWasmInitialized) {
14038                         throw new Error("initializeWasm() must be awaited first!");
14039                 }
14040                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
14041                 return decodeArray(nativeResponseValue);
14042         }
14043         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
14044         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
14045                 if(!isWasmInitialized) {
14046                         throw new Error("initializeWasm() must be awaited first!");
14047                 }
14048                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
14049                 return nativeResponseValue;
14050         }
14051         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
14052         export function NodeAnnouncement_write(obj: number): Uint8Array {
14053                 if(!isWasmInitialized) {
14054                         throw new Error("initializeWasm() must be awaited first!");
14055                 }
14056                 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
14057                 return decodeArray(nativeResponseValue);
14058         }
14059         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
14060         export function NodeAnnouncement_read(ser: Uint8Array): number {
14061                 if(!isWasmInitialized) {
14062                         throw new Error("initializeWasm() must be awaited first!");
14063                 }
14064                 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
14065                 return nativeResponseValue;
14066         }
14067         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
14068         export function QueryShortChannelIds_read(ser: Uint8Array): number {
14069                 if(!isWasmInitialized) {
14070                         throw new Error("initializeWasm() must be awaited first!");
14071                 }
14072                 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
14073                 return nativeResponseValue;
14074         }
14075         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
14076         export function QueryShortChannelIds_write(obj: number): Uint8Array {
14077                 if(!isWasmInitialized) {
14078                         throw new Error("initializeWasm() must be awaited first!");
14079                 }
14080                 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
14081                 return decodeArray(nativeResponseValue);
14082         }
14083         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
14084         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
14085                 if(!isWasmInitialized) {
14086                         throw new Error("initializeWasm() must be awaited first!");
14087                 }
14088                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
14089                 return decodeArray(nativeResponseValue);
14090         }
14091         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
14092         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
14093                 if(!isWasmInitialized) {
14094                         throw new Error("initializeWasm() must be awaited first!");
14095                 }
14096                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
14097                 return nativeResponseValue;
14098         }
14099         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
14100         export function QueryChannelRange_end_blocknum(this_arg: number): number {
14101                 if(!isWasmInitialized) {
14102                         throw new Error("initializeWasm() must be awaited first!");
14103                 }
14104                 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
14105                 return nativeResponseValue;
14106         }
14107         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
14108         export function QueryChannelRange_write(obj: number): Uint8Array {
14109                 if(!isWasmInitialized) {
14110                         throw new Error("initializeWasm() must be awaited first!");
14111                 }
14112                 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
14113                 return decodeArray(nativeResponseValue);
14114         }
14115         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
14116         export function QueryChannelRange_read(ser: Uint8Array): number {
14117                 if(!isWasmInitialized) {
14118                         throw new Error("initializeWasm() must be awaited first!");
14119                 }
14120                 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
14121                 return nativeResponseValue;
14122         }
14123         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
14124         export function ReplyChannelRange_read(ser: Uint8Array): number {
14125                 if(!isWasmInitialized) {
14126                         throw new Error("initializeWasm() must be awaited first!");
14127                 }
14128                 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
14129                 return nativeResponseValue;
14130         }
14131         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
14132         export function ReplyChannelRange_write(obj: number): Uint8Array {
14133                 if(!isWasmInitialized) {
14134                         throw new Error("initializeWasm() must be awaited first!");
14135                 }
14136                 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
14137                 return decodeArray(nativeResponseValue);
14138         }
14139         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
14140         export function GossipTimestampFilter_write(obj: number): Uint8Array {
14141                 if(!isWasmInitialized) {
14142                         throw new Error("initializeWasm() must be awaited first!");
14143                 }
14144                 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
14145                 return decodeArray(nativeResponseValue);
14146         }
14147         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
14148         export function GossipTimestampFilter_read(ser: Uint8Array): number {
14149                 if(!isWasmInitialized) {
14150                         throw new Error("initializeWasm() must be awaited first!");
14151                 }
14152                 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
14153                 return nativeResponseValue;
14154         }
14155         // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
14156         export function CustomMessageHandler_free(this_ptr: number): void {
14157                 if(!isWasmInitialized) {
14158                         throw new Error("initializeWasm() must be awaited first!");
14159                 }
14160                 const nativeResponseValue = wasm.CustomMessageHandler_free(this_ptr);
14161                 // debug statements here
14162         }
14163         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
14164         export function IgnoringMessageHandler_free(this_obj: number): void {
14165                 if(!isWasmInitialized) {
14166                         throw new Error("initializeWasm() must be awaited first!");
14167                 }
14168                 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
14169                 // debug statements here
14170         }
14171         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
14172         export function IgnoringMessageHandler_new(): number {
14173                 if(!isWasmInitialized) {
14174                         throw new Error("initializeWasm() must be awaited first!");
14175                 }
14176                 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
14177                 return nativeResponseValue;
14178         }
14179         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
14180         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
14181                 if(!isWasmInitialized) {
14182                         throw new Error("initializeWasm() must be awaited first!");
14183                 }
14184                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
14185                 return nativeResponseValue;
14186         }
14187         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
14188         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
14189                 if(!isWasmInitialized) {
14190                         throw new Error("initializeWasm() must be awaited first!");
14191                 }
14192                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
14193                 return nativeResponseValue;
14194         }
14195         // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
14196         export function IgnoringMessageHandler_as_CustomMessageReader(this_arg: number): number {
14197                 if(!isWasmInitialized) {
14198                         throw new Error("initializeWasm() must be awaited first!");
14199                 }
14200                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageReader(this_arg);
14201                 return nativeResponseValue;
14202         }
14203         // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
14204         export function IgnoringMessageHandler_as_CustomMessageHandler(this_arg: number): number {
14205                 if(!isWasmInitialized) {
14206                         throw new Error("initializeWasm() must be awaited first!");
14207                 }
14208                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageHandler(this_arg);
14209                 return nativeResponseValue;
14210         }
14211         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
14212         export function ErroringMessageHandler_free(this_obj: number): void {
14213                 if(!isWasmInitialized) {
14214                         throw new Error("initializeWasm() must be awaited first!");
14215                 }
14216                 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
14217                 // debug statements here
14218         }
14219         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
14220         export function ErroringMessageHandler_new(): number {
14221                 if(!isWasmInitialized) {
14222                         throw new Error("initializeWasm() must be awaited first!");
14223                 }
14224                 const nativeResponseValue = wasm.ErroringMessageHandler_new();
14225                 return nativeResponseValue;
14226         }
14227         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
14228         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
14229                 if(!isWasmInitialized) {
14230                         throw new Error("initializeWasm() must be awaited first!");
14231                 }
14232                 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
14233                 return nativeResponseValue;
14234         }
14235         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
14236         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
14237                 if(!isWasmInitialized) {
14238                         throw new Error("initializeWasm() must be awaited first!");
14239                 }
14240                 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
14241                 return nativeResponseValue;
14242         }
14243         // void MessageHandler_free(struct LDKMessageHandler this_obj);
14244         export function MessageHandler_free(this_obj: number): void {
14245                 if(!isWasmInitialized) {
14246                         throw new Error("initializeWasm() must be awaited first!");
14247                 }
14248                 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
14249                 // debug statements here
14250         }
14251         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
14252         export function MessageHandler_get_chan_handler(this_ptr: number): number {
14253                 if(!isWasmInitialized) {
14254                         throw new Error("initializeWasm() must be awaited first!");
14255                 }
14256                 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
14257                 return nativeResponseValue;
14258         }
14259         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
14260         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
14261                 if(!isWasmInitialized) {
14262                         throw new Error("initializeWasm() must be awaited first!");
14263                 }
14264                 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
14265                 // debug statements here
14266         }
14267         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
14268         export function MessageHandler_get_route_handler(this_ptr: number): number {
14269                 if(!isWasmInitialized) {
14270                         throw new Error("initializeWasm() must be awaited first!");
14271                 }
14272                 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
14273                 return nativeResponseValue;
14274         }
14275         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
14276         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
14277                 if(!isWasmInitialized) {
14278                         throw new Error("initializeWasm() must be awaited first!");
14279                 }
14280                 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
14281                 // debug statements here
14282         }
14283         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
14284         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
14285                 if(!isWasmInitialized) {
14286                         throw new Error("initializeWasm() must be awaited first!");
14287                 }
14288                 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
14289                 return nativeResponseValue;
14290         }
14291         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
14292         export function SocketDescriptor_clone(orig: number): number {
14293                 if(!isWasmInitialized) {
14294                         throw new Error("initializeWasm() must be awaited first!");
14295                 }
14296                 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
14297                 return nativeResponseValue;
14298         }
14299         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
14300         export function SocketDescriptor_free(this_ptr: number): void {
14301                 if(!isWasmInitialized) {
14302                         throw new Error("initializeWasm() must be awaited first!");
14303                 }
14304                 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
14305                 // debug statements here
14306         }
14307         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
14308         export function PeerHandleError_free(this_obj: number): void {
14309                 if(!isWasmInitialized) {
14310                         throw new Error("initializeWasm() must be awaited first!");
14311                 }
14312                 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
14313                 // debug statements here
14314         }
14315         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
14316         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
14317                 if(!isWasmInitialized) {
14318                         throw new Error("initializeWasm() must be awaited first!");
14319                 }
14320                 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
14321                 return nativeResponseValue;
14322         }
14323         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
14324         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
14325                 if(!isWasmInitialized) {
14326                         throw new Error("initializeWasm() must be awaited first!");
14327                 }
14328                 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
14329                 // debug statements here
14330         }
14331         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
14332         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
14333                 if(!isWasmInitialized) {
14334                         throw new Error("initializeWasm() must be awaited first!");
14335                 }
14336                 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
14337                 return nativeResponseValue;
14338         }
14339         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
14340         export function PeerHandleError_clone(orig: number): number {
14341                 if(!isWasmInitialized) {
14342                         throw new Error("initializeWasm() must be awaited first!");
14343                 }
14344                 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
14345                 return nativeResponseValue;
14346         }
14347         // void PeerManager_free(struct LDKPeerManager this_obj);
14348         export function PeerManager_free(this_obj: number): void {
14349                 if(!isWasmInitialized) {
14350                         throw new Error("initializeWasm() must be awaited first!");
14351                 }
14352                 const nativeResponseValue = wasm.PeerManager_free(this_obj);
14353                 // debug statements here
14354         }
14355         // 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);
14356         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number, custom_message_handler: number): number {
14357                 if(!isWasmInitialized) {
14358                         throw new Error("initializeWasm() must be awaited first!");
14359                 }
14360                 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger, custom_message_handler);
14361                 return nativeResponseValue;
14362         }
14363         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
14364         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
14365                 if(!isWasmInitialized) {
14366                         throw new Error("initializeWasm() must be awaited first!");
14367                 }
14368                 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
14369                 return nativeResponseValue;
14370         }
14371         // 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);
14372         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
14373                 if(!isWasmInitialized) {
14374                         throw new Error("initializeWasm() must be awaited first!");
14375                 }
14376                 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
14377                 return nativeResponseValue;
14378         }
14379         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
14380         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
14381                 if(!isWasmInitialized) {
14382                         throw new Error("initializeWasm() must be awaited first!");
14383                 }
14384                 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
14385                 return nativeResponseValue;
14386         }
14387         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
14388         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
14389                 if(!isWasmInitialized) {
14390                         throw new Error("initializeWasm() must be awaited first!");
14391                 }
14392                 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
14393                 return nativeResponseValue;
14394         }
14395         // 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);
14396         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
14397                 if(!isWasmInitialized) {
14398                         throw new Error("initializeWasm() must be awaited first!");
14399                 }
14400                 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
14401                 return nativeResponseValue;
14402         }
14403         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
14404         export function PeerManager_process_events(this_arg: number): void {
14405                 if(!isWasmInitialized) {
14406                         throw new Error("initializeWasm() must be awaited first!");
14407                 }
14408                 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
14409                 // debug statements here
14410         }
14411         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
14412         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
14413                 if(!isWasmInitialized) {
14414                         throw new Error("initializeWasm() must be awaited first!");
14415                 }
14416                 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
14417                 // debug statements here
14418         }
14419         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
14420         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
14421                 if(!isWasmInitialized) {
14422                         throw new Error("initializeWasm() must be awaited first!");
14423                 }
14424                 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
14425                 // debug statements here
14426         }
14427         // void PeerManager_disconnect_all_peers(const struct LDKPeerManager *NONNULL_PTR this_arg);
14428         export function PeerManager_disconnect_all_peers(this_arg: number): void {
14429                 if(!isWasmInitialized) {
14430                         throw new Error("initializeWasm() must be awaited first!");
14431                 }
14432                 const nativeResponseValue = wasm.PeerManager_disconnect_all_peers(this_arg);
14433                 // debug statements here
14434         }
14435         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
14436         export function PeerManager_timer_tick_occurred(this_arg: number): void {
14437                 if(!isWasmInitialized) {
14438                         throw new Error("initializeWasm() must be awaited first!");
14439                 }
14440                 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
14441                 // debug statements here
14442         }
14443         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
14444         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
14445                 if(!isWasmInitialized) {
14446                         throw new Error("initializeWasm() must be awaited first!");
14447                 }
14448                 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
14449                 return decodeArray(nativeResponseValue);
14450         }
14451         // 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);
14452         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 {
14453                 if(!isWasmInitialized) {
14454                         throw new Error("initializeWasm() must be awaited first!");
14455                 }
14456                 const nativeResponseValue = wasm.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
14457                 return decodeArray(nativeResponseValue);
14458         }
14459         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
14460         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
14461                 if(!isWasmInitialized) {
14462                         throw new Error("initializeWasm() must be awaited first!");
14463                 }
14464                 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
14465                 return nativeResponseValue;
14466         }
14467         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
14468         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
14469                 if(!isWasmInitialized) {
14470                         throw new Error("initializeWasm() must be awaited first!");
14471                 }
14472                 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
14473                 return nativeResponseValue;
14474         }
14475         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
14476         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
14477                 if(!isWasmInitialized) {
14478                         throw new Error("initializeWasm() must be awaited first!");
14479                 }
14480                 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
14481                 return nativeResponseValue;
14482         }
14483         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
14484         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
14485                 if(!isWasmInitialized) {
14486                         throw new Error("initializeWasm() must be awaited first!");
14487                 }
14488                 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
14489                 return nativeResponseValue;
14490         }
14491         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
14492         export function TxCreationKeys_free(this_obj: number): void {
14493                 if(!isWasmInitialized) {
14494                         throw new Error("initializeWasm() must be awaited first!");
14495                 }
14496                 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
14497                 // debug statements here
14498         }
14499         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14500         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
14501                 if(!isWasmInitialized) {
14502                         throw new Error("initializeWasm() must be awaited first!");
14503                 }
14504                 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
14505                 return decodeArray(nativeResponseValue);
14506         }
14507         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14508         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
14509                 if(!isWasmInitialized) {
14510                         throw new Error("initializeWasm() must be awaited first!");
14511                 }
14512                 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
14513                 // debug statements here
14514         }
14515         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14516         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
14517                 if(!isWasmInitialized) {
14518                         throw new Error("initializeWasm() must be awaited first!");
14519                 }
14520                 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
14521                 return decodeArray(nativeResponseValue);
14522         }
14523         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14524         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
14525                 if(!isWasmInitialized) {
14526                         throw new Error("initializeWasm() must be awaited first!");
14527                 }
14528                 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
14529                 // debug statements here
14530         }
14531         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14532         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
14533                 if(!isWasmInitialized) {
14534                         throw new Error("initializeWasm() must be awaited first!");
14535                 }
14536                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
14537                 return decodeArray(nativeResponseValue);
14538         }
14539         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14540         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
14541                 if(!isWasmInitialized) {
14542                         throw new Error("initializeWasm() must be awaited first!");
14543                 }
14544                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
14545                 // debug statements here
14546         }
14547         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14548         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
14549                 if(!isWasmInitialized) {
14550                         throw new Error("initializeWasm() must be awaited first!");
14551                 }
14552                 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
14553                 return decodeArray(nativeResponseValue);
14554         }
14555         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14556         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
14557                 if(!isWasmInitialized) {
14558                         throw new Error("initializeWasm() must be awaited first!");
14559                 }
14560                 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
14561                 // debug statements here
14562         }
14563         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14564         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
14565                 if(!isWasmInitialized) {
14566                         throw new Error("initializeWasm() must be awaited first!");
14567                 }
14568                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
14569                 return decodeArray(nativeResponseValue);
14570         }
14571         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14572         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
14573                 if(!isWasmInitialized) {
14574                         throw new Error("initializeWasm() must be awaited first!");
14575                 }
14576                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
14577                 // debug statements here
14578         }
14579         // 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);
14580         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 {
14581                 if(!isWasmInitialized) {
14582                         throw new Error("initializeWasm() must be awaited first!");
14583                 }
14584                 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));
14585                 return nativeResponseValue;
14586         }
14587         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
14588         export function TxCreationKeys_clone(orig: number): number {
14589                 if(!isWasmInitialized) {
14590                         throw new Error("initializeWasm() must be awaited first!");
14591                 }
14592                 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
14593                 return nativeResponseValue;
14594         }
14595         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
14596         export function TxCreationKeys_write(obj: number): Uint8Array {
14597                 if(!isWasmInitialized) {
14598                         throw new Error("initializeWasm() must be awaited first!");
14599                 }
14600                 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
14601                 return decodeArray(nativeResponseValue);
14602         }
14603         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
14604         export function TxCreationKeys_read(ser: Uint8Array): number {
14605                 if(!isWasmInitialized) {
14606                         throw new Error("initializeWasm() must be awaited first!");
14607                 }
14608                 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
14609                 return nativeResponseValue;
14610         }
14611         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
14612         export function ChannelPublicKeys_free(this_obj: number): void {
14613                 if(!isWasmInitialized) {
14614                         throw new Error("initializeWasm() must be awaited first!");
14615                 }
14616                 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
14617                 // debug statements here
14618         }
14619         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14620         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
14621                 if(!isWasmInitialized) {
14622                         throw new Error("initializeWasm() must be awaited first!");
14623                 }
14624                 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
14625                 return decodeArray(nativeResponseValue);
14626         }
14627         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14628         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
14629                 if(!isWasmInitialized) {
14630                         throw new Error("initializeWasm() must be awaited first!");
14631                 }
14632                 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
14633                 // debug statements here
14634         }
14635         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14636         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
14637                 if(!isWasmInitialized) {
14638                         throw new Error("initializeWasm() must be awaited first!");
14639                 }
14640                 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
14641                 return decodeArray(nativeResponseValue);
14642         }
14643         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14644         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
14645                 if(!isWasmInitialized) {
14646                         throw new Error("initializeWasm() must be awaited first!");
14647                 }
14648                 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
14649                 // debug statements here
14650         }
14651         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14652         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
14653                 if(!isWasmInitialized) {
14654                         throw new Error("initializeWasm() must be awaited first!");
14655                 }
14656                 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
14657                 return decodeArray(nativeResponseValue);
14658         }
14659         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14660         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
14661                 if(!isWasmInitialized) {
14662                         throw new Error("initializeWasm() must be awaited first!");
14663                 }
14664                 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
14665                 // debug statements here
14666         }
14667         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14668         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
14669                 if(!isWasmInitialized) {
14670                         throw new Error("initializeWasm() must be awaited first!");
14671                 }
14672                 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
14673                 return decodeArray(nativeResponseValue);
14674         }
14675         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14676         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
14677                 if(!isWasmInitialized) {
14678                         throw new Error("initializeWasm() must be awaited first!");
14679                 }
14680                 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
14681                 // debug statements here
14682         }
14683         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14684         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
14685                 if(!isWasmInitialized) {
14686                         throw new Error("initializeWasm() must be awaited first!");
14687                 }
14688                 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
14689                 return decodeArray(nativeResponseValue);
14690         }
14691         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14692         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
14693                 if(!isWasmInitialized) {
14694                         throw new Error("initializeWasm() must be awaited first!");
14695                 }
14696                 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
14697                 // debug statements here
14698         }
14699         // 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);
14700         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 {
14701                 if(!isWasmInitialized) {
14702                         throw new Error("initializeWasm() must be awaited first!");
14703                 }
14704                 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));
14705                 return nativeResponseValue;
14706         }
14707         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
14708         export function ChannelPublicKeys_clone(orig: number): number {
14709                 if(!isWasmInitialized) {
14710                         throw new Error("initializeWasm() must be awaited first!");
14711                 }
14712                 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
14713                 return nativeResponseValue;
14714         }
14715         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
14716         export function ChannelPublicKeys_write(obj: number): Uint8Array {
14717                 if(!isWasmInitialized) {
14718                         throw new Error("initializeWasm() must be awaited first!");
14719                 }
14720                 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
14721                 return decodeArray(nativeResponseValue);
14722         }
14723         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
14724         export function ChannelPublicKeys_read(ser: Uint8Array): number {
14725                 if(!isWasmInitialized) {
14726                         throw new Error("initializeWasm() must be awaited first!");
14727                 }
14728                 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
14729                 return nativeResponseValue;
14730         }
14731         // 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);
14732         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 {
14733                 if(!isWasmInitialized) {
14734                         throw new Error("initializeWasm() must be awaited first!");
14735                 }
14736                 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));
14737                 return nativeResponseValue;
14738         }
14739         // 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);
14740         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
14741                 if(!isWasmInitialized) {
14742                         throw new Error("initializeWasm() must be awaited first!");
14743                 }
14744                 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
14745                 return nativeResponseValue;
14746         }
14747         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
14748         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
14749                 if(!isWasmInitialized) {
14750                         throw new Error("initializeWasm() must be awaited first!");
14751                 }
14752                 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
14753                 return decodeArray(nativeResponseValue);
14754         }
14755         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
14756         export function HTLCOutputInCommitment_free(this_obj: number): void {
14757                 if(!isWasmInitialized) {
14758                         throw new Error("initializeWasm() must be awaited first!");
14759                 }
14760                 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
14761                 // debug statements here
14762         }
14763         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14764         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
14765                 if(!isWasmInitialized) {
14766                         throw new Error("initializeWasm() must be awaited first!");
14767                 }
14768                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
14769                 return nativeResponseValue;
14770         }
14771         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
14772         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
14773                 if(!isWasmInitialized) {
14774                         throw new Error("initializeWasm() must be awaited first!");
14775                 }
14776                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
14777                 // debug statements here
14778         }
14779         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14780         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
14781                 if(!isWasmInitialized) {
14782                         throw new Error("initializeWasm() must be awaited first!");
14783                 }
14784                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
14785                 return nativeResponseValue;
14786         }
14787         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
14788         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
14789                 if(!isWasmInitialized) {
14790                         throw new Error("initializeWasm() must be awaited first!");
14791                 }
14792                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
14793                 // debug statements here
14794         }
14795         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14796         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
14797                 if(!isWasmInitialized) {
14798                         throw new Error("initializeWasm() must be awaited first!");
14799                 }
14800                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
14801                 return nativeResponseValue;
14802         }
14803         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
14804         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
14805                 if(!isWasmInitialized) {
14806                         throw new Error("initializeWasm() must be awaited first!");
14807                 }
14808                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
14809                 // debug statements here
14810         }
14811         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
14812         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
14813                 if(!isWasmInitialized) {
14814                         throw new Error("initializeWasm() must be awaited first!");
14815                 }
14816                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
14817                 return decodeArray(nativeResponseValue);
14818         }
14819         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14820         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
14821                 if(!isWasmInitialized) {
14822                         throw new Error("initializeWasm() must be awaited first!");
14823                 }
14824                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
14825                 // debug statements here
14826         }
14827         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14828         export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
14829                 if(!isWasmInitialized) {
14830                         throw new Error("initializeWasm() must be awaited first!");
14831                 }
14832                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
14833                 return nativeResponseValue;
14834         }
14835         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
14836         export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
14837                 if(!isWasmInitialized) {
14838                         throw new Error("initializeWasm() must be awaited first!");
14839                 }
14840                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
14841                 // debug statements here
14842         }
14843         // 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);
14844         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 {
14845                 if(!isWasmInitialized) {
14846                         throw new Error("initializeWasm() must be awaited first!");
14847                 }
14848                 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
14849                 return nativeResponseValue;
14850         }
14851         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
14852         export function HTLCOutputInCommitment_clone(orig: number): number {
14853                 if(!isWasmInitialized) {
14854                         throw new Error("initializeWasm() must be awaited first!");
14855                 }
14856                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
14857                 return nativeResponseValue;
14858         }
14859         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
14860         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
14861                 if(!isWasmInitialized) {
14862                         throw new Error("initializeWasm() must be awaited first!");
14863                 }
14864                 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
14865                 return decodeArray(nativeResponseValue);
14866         }
14867         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
14868         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
14869                 if(!isWasmInitialized) {
14870                         throw new Error("initializeWasm() must be awaited first!");
14871                 }
14872                 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
14873                 return nativeResponseValue;
14874         }
14875         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
14876         export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
14877                 if(!isWasmInitialized) {
14878                         throw new Error("initializeWasm() must be awaited first!");
14879                 }
14880                 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
14881                 return decodeArray(nativeResponseValue);
14882         }
14883         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
14884         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
14885                 if(!isWasmInitialized) {
14886                         throw new Error("initializeWasm() must be awaited first!");
14887                 }
14888                 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
14889                 return decodeArray(nativeResponseValue);
14890         }
14891         // 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);
14892         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 {
14893                 if(!isWasmInitialized) {
14894                         throw new Error("initializeWasm() must be awaited first!");
14895                 }
14896                 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(commitment_txid), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
14897                 return decodeArray(nativeResponseValue);
14898         }
14899         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
14900         export function ChannelTransactionParameters_free(this_obj: number): void {
14901                 if(!isWasmInitialized) {
14902                         throw new Error("initializeWasm() must be awaited first!");
14903                 }
14904                 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
14905                 // debug statements here
14906         }
14907         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14908         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
14909                 if(!isWasmInitialized) {
14910                         throw new Error("initializeWasm() must be awaited first!");
14911                 }
14912                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
14913                 return nativeResponseValue;
14914         }
14915         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
14916         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
14917                 if(!isWasmInitialized) {
14918                         throw new Error("initializeWasm() must be awaited first!");
14919                 }
14920                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
14921                 // debug statements here
14922         }
14923         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14924         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
14925                 if(!isWasmInitialized) {
14926                         throw new Error("initializeWasm() must be awaited first!");
14927                 }
14928                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
14929                 return nativeResponseValue;
14930         }
14931         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
14932         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
14933                 if(!isWasmInitialized) {
14934                         throw new Error("initializeWasm() must be awaited first!");
14935                 }
14936                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
14937                 // debug statements here
14938         }
14939         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14940         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
14941                 if(!isWasmInitialized) {
14942                         throw new Error("initializeWasm() must be awaited first!");
14943                 }
14944                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
14945                 return nativeResponseValue;
14946         }
14947         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
14948         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
14949                 if(!isWasmInitialized) {
14950                         throw new Error("initializeWasm() must be awaited first!");
14951                 }
14952                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
14953                 // debug statements here
14954         }
14955         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14956         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
14957                 if(!isWasmInitialized) {
14958                         throw new Error("initializeWasm() must be awaited first!");
14959                 }
14960                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
14961                 return nativeResponseValue;
14962         }
14963         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
14964         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
14965                 if(!isWasmInitialized) {
14966                         throw new Error("initializeWasm() must be awaited first!");
14967                 }
14968                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
14969                 // debug statements here
14970         }
14971         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14972         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
14973                 if(!isWasmInitialized) {
14974                         throw new Error("initializeWasm() must be awaited first!");
14975                 }
14976                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
14977                 return nativeResponseValue;
14978         }
14979         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
14980         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
14981                 if(!isWasmInitialized) {
14982                         throw new Error("initializeWasm() must be awaited first!");
14983                 }
14984                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
14985                 // debug statements here
14986         }
14987         // 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);
14988         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 {
14989                 if(!isWasmInitialized) {
14990                         throw new Error("initializeWasm() must be awaited first!");
14991                 }
14992                 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
14993                 return nativeResponseValue;
14994         }
14995         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
14996         export function ChannelTransactionParameters_clone(orig: number): number {
14997                 if(!isWasmInitialized) {
14998                         throw new Error("initializeWasm() must be awaited first!");
14999                 }
15000                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
15001                 return nativeResponseValue;
15002         }
15003         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
15004         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
15005                 if(!isWasmInitialized) {
15006                         throw new Error("initializeWasm() must be awaited first!");
15007                 }
15008                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
15009                 // debug statements here
15010         }
15011         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
15012         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
15013                 if(!isWasmInitialized) {
15014                         throw new Error("initializeWasm() must be awaited first!");
15015                 }
15016                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
15017                 return nativeResponseValue;
15018         }
15019         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
15020         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
15021                 if(!isWasmInitialized) {
15022                         throw new Error("initializeWasm() must be awaited first!");
15023                 }
15024                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
15025                 // debug statements here
15026         }
15027         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
15028         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
15029                 if(!isWasmInitialized) {
15030                         throw new Error("initializeWasm() must be awaited first!");
15031                 }
15032                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
15033                 return nativeResponseValue;
15034         }
15035         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
15036         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
15037                 if(!isWasmInitialized) {
15038                         throw new Error("initializeWasm() must be awaited first!");
15039                 }
15040                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
15041                 // debug statements here
15042         }
15043         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
15044         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
15045                 if(!isWasmInitialized) {
15046                         throw new Error("initializeWasm() must be awaited first!");
15047                 }
15048                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
15049                 return nativeResponseValue;
15050         }
15051         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
15052         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
15053                 if(!isWasmInitialized) {
15054                         throw new Error("initializeWasm() must be awaited first!");
15055                 }
15056                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
15057                 return nativeResponseValue;
15058         }
15059         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
15060         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
15061                 if(!isWasmInitialized) {
15062                         throw new Error("initializeWasm() must be awaited first!");
15063                 }
15064                 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
15065                 return nativeResponseValue;
15066         }
15067         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
15068         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
15069                 if(!isWasmInitialized) {
15070                         throw new Error("initializeWasm() must be awaited first!");
15071                 }
15072                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
15073                 return nativeResponseValue;
15074         }
15075         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
15076         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
15077                 if(!isWasmInitialized) {
15078                         throw new Error("initializeWasm() must be awaited first!");
15079                 }
15080                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
15081                 return nativeResponseValue;
15082         }
15083         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
15084         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
15085                 if(!isWasmInitialized) {
15086                         throw new Error("initializeWasm() must be awaited first!");
15087                 }
15088                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
15089                 return decodeArray(nativeResponseValue);
15090         }
15091         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
15092         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
15093                 if(!isWasmInitialized) {
15094                         throw new Error("initializeWasm() must be awaited first!");
15095                 }
15096                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
15097                 return nativeResponseValue;
15098         }
15099         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
15100         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
15101                 if(!isWasmInitialized) {
15102                         throw new Error("initializeWasm() must be awaited first!");
15103                 }
15104                 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
15105                 return decodeArray(nativeResponseValue);
15106         }
15107         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
15108         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
15109                 if(!isWasmInitialized) {
15110                         throw new Error("initializeWasm() must be awaited first!");
15111                 }
15112                 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
15113                 return nativeResponseValue;
15114         }
15115         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
15116         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
15117                 if(!isWasmInitialized) {
15118                         throw new Error("initializeWasm() must be awaited first!");
15119                 }
15120                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
15121                 // debug statements here
15122         }
15123         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
15124         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
15125                 if(!isWasmInitialized) {
15126                         throw new Error("initializeWasm() must be awaited first!");
15127                 }
15128                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
15129                 return nativeResponseValue;
15130         }
15131         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
15132         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
15133                 if(!isWasmInitialized) {
15134                         throw new Error("initializeWasm() must be awaited first!");
15135                 }
15136                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
15137                 return nativeResponseValue;
15138         }
15139         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
15140         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
15141                 if(!isWasmInitialized) {
15142                         throw new Error("initializeWasm() must be awaited first!");
15143                 }
15144                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
15145                 return nativeResponseValue;
15146         }
15147         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
15148         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
15149                 if(!isWasmInitialized) {
15150                         throw new Error("initializeWasm() must be awaited first!");
15151                 }
15152                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
15153                 return nativeResponseValue;
15154         }
15155         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
15156         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
15157                 if(!isWasmInitialized) {
15158                         throw new Error("initializeWasm() must be awaited first!");
15159                 }
15160                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
15161                 return nativeResponseValue;
15162         }
15163         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
15164         export function HolderCommitmentTransaction_free(this_obj: number): void {
15165                 if(!isWasmInitialized) {
15166                         throw new Error("initializeWasm() must be awaited first!");
15167                 }
15168                 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
15169                 // debug statements here
15170         }
15171         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
15172         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
15173                 if(!isWasmInitialized) {
15174                         throw new Error("initializeWasm() must be awaited first!");
15175                 }
15176                 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
15177                 return decodeArray(nativeResponseValue);
15178         }
15179         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
15180         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
15181                 if(!isWasmInitialized) {
15182                         throw new Error("initializeWasm() must be awaited first!");
15183                 }
15184                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
15185                 // debug statements here
15186         }
15187         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
15188         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
15189                 if(!isWasmInitialized) {
15190                         throw new Error("initializeWasm() must be awaited first!");
15191                 }
15192                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
15193                 // debug statements here
15194         }
15195         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
15196         export function HolderCommitmentTransaction_clone(orig: number): number {
15197                 if(!isWasmInitialized) {
15198                         throw new Error("initializeWasm() must be awaited first!");
15199                 }
15200                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
15201                 return nativeResponseValue;
15202         }
15203         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
15204         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
15205                 if(!isWasmInitialized) {
15206                         throw new Error("initializeWasm() must be awaited first!");
15207                 }
15208                 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
15209                 return decodeArray(nativeResponseValue);
15210         }
15211         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
15212         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
15213                 if(!isWasmInitialized) {
15214                         throw new Error("initializeWasm() must be awaited first!");
15215                 }
15216                 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
15217                 return nativeResponseValue;
15218         }
15219         // 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);
15220         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
15221                 if(!isWasmInitialized) {
15222                         throw new Error("initializeWasm() must be awaited first!");
15223                 }
15224                 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
15225                 return nativeResponseValue;
15226         }
15227         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
15228         export function BuiltCommitmentTransaction_free(this_obj: number): void {
15229                 if(!isWasmInitialized) {
15230                         throw new Error("initializeWasm() must be awaited first!");
15231                 }
15232                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
15233                 // debug statements here
15234         }
15235         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
15236         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
15237                 if(!isWasmInitialized) {
15238                         throw new Error("initializeWasm() must be awaited first!");
15239                 }
15240                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
15241                 return decodeArray(nativeResponseValue);
15242         }
15243         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
15244         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
15245                 if(!isWasmInitialized) {
15246                         throw new Error("initializeWasm() must be awaited first!");
15247                 }
15248                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
15249                 // debug statements here
15250         }
15251         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
15252         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
15253                 if(!isWasmInitialized) {
15254                         throw new Error("initializeWasm() must be awaited first!");
15255                 }
15256                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
15257                 return decodeArray(nativeResponseValue);
15258         }
15259         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15260         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
15261                 if(!isWasmInitialized) {
15262                         throw new Error("initializeWasm() must be awaited first!");
15263                 }
15264                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
15265                 // debug statements here
15266         }
15267         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
15268         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
15269                 if(!isWasmInitialized) {
15270                         throw new Error("initializeWasm() must be awaited first!");
15271                 }
15272                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
15273                 return nativeResponseValue;
15274         }
15275         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
15276         export function BuiltCommitmentTransaction_clone(orig: number): number {
15277                 if(!isWasmInitialized) {
15278                         throw new Error("initializeWasm() must be awaited first!");
15279                 }
15280                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
15281                 return nativeResponseValue;
15282         }
15283         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
15284         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
15285                 if(!isWasmInitialized) {
15286                         throw new Error("initializeWasm() must be awaited first!");
15287                 }
15288                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
15289                 return decodeArray(nativeResponseValue);
15290         }
15291         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
15292         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
15293                 if(!isWasmInitialized) {
15294                         throw new Error("initializeWasm() must be awaited first!");
15295                 }
15296                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
15297                 return nativeResponseValue;
15298         }
15299         // 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);
15300         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
15301                 if(!isWasmInitialized) {
15302                         throw new Error("initializeWasm() must be awaited first!");
15303                 }
15304                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
15305                 return decodeArray(nativeResponseValue);
15306         }
15307         // 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);
15308         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
15309                 if(!isWasmInitialized) {
15310                         throw new Error("initializeWasm() must be awaited first!");
15311                 }
15312                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
15313                 return decodeArray(nativeResponseValue);
15314         }
15315         // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
15316         export function ClosingTransaction_free(this_obj: number): void {
15317                 if(!isWasmInitialized) {
15318                         throw new Error("initializeWasm() must be awaited first!");
15319                 }
15320                 const nativeResponseValue = wasm.ClosingTransaction_free(this_obj);
15321                 // debug statements here
15322         }
15323         // struct LDKClosingTransaction ClosingTransaction_clone(const struct LDKClosingTransaction *NONNULL_PTR orig);
15324         export function ClosingTransaction_clone(orig: number): number {
15325                 if(!isWasmInitialized) {
15326                         throw new Error("initializeWasm() must be awaited first!");
15327                 }
15328                 const nativeResponseValue = wasm.ClosingTransaction_clone(orig);
15329                 return nativeResponseValue;
15330         }
15331         // uint64_t ClosingTransaction_hash(const struct LDKClosingTransaction *NONNULL_PTR o);
15332         export function ClosingTransaction_hash(o: number): number {
15333                 if(!isWasmInitialized) {
15334                         throw new Error("initializeWasm() must be awaited first!");
15335                 }
15336                 const nativeResponseValue = wasm.ClosingTransaction_hash(o);
15337                 return nativeResponseValue;
15338         }
15339         // 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);
15340         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 {
15341                 if(!isWasmInitialized) {
15342                         throw new Error("initializeWasm() must be awaited first!");
15343                 }
15344                 const nativeResponseValue = wasm.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
15345                 return nativeResponseValue;
15346         }
15347         // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15348         export function ClosingTransaction_trust(this_arg: number): number {
15349                 if(!isWasmInitialized) {
15350                         throw new Error("initializeWasm() must be awaited first!");
15351                 }
15352                 const nativeResponseValue = wasm.ClosingTransaction_trust(this_arg);
15353                 return nativeResponseValue;
15354         }
15355         // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
15356         export function ClosingTransaction_verify(this_arg: number, funding_outpoint: number): number {
15357                 if(!isWasmInitialized) {
15358                         throw new Error("initializeWasm() must be awaited first!");
15359                 }
15360                 const nativeResponseValue = wasm.ClosingTransaction_verify(this_arg, funding_outpoint);
15361                 return nativeResponseValue;
15362         }
15363         // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15364         export function ClosingTransaction_to_holder_value_sat(this_arg: number): number {
15365                 if(!isWasmInitialized) {
15366                         throw new Error("initializeWasm() must be awaited first!");
15367                 }
15368                 const nativeResponseValue = wasm.ClosingTransaction_to_holder_value_sat(this_arg);
15369                 return nativeResponseValue;
15370         }
15371         // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15372         export function ClosingTransaction_to_counterparty_value_sat(this_arg: number): number {
15373                 if(!isWasmInitialized) {
15374                         throw new Error("initializeWasm() must be awaited first!");
15375                 }
15376                 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_value_sat(this_arg);
15377                 return nativeResponseValue;
15378         }
15379         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15380         export function ClosingTransaction_to_holder_script(this_arg: number): Uint8Array {
15381                 if(!isWasmInitialized) {
15382                         throw new Error("initializeWasm() must be awaited first!");
15383                 }
15384                 const nativeResponseValue = wasm.ClosingTransaction_to_holder_script(this_arg);
15385                 return decodeArray(nativeResponseValue);
15386         }
15387         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15388         export function ClosingTransaction_to_counterparty_script(this_arg: number): Uint8Array {
15389                 if(!isWasmInitialized) {
15390                         throw new Error("initializeWasm() must be awaited first!");
15391                 }
15392                 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_script(this_arg);
15393                 return decodeArray(nativeResponseValue);
15394         }
15395         // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
15396         export function TrustedClosingTransaction_free(this_obj: number): void {
15397                 if(!isWasmInitialized) {
15398                         throw new Error("initializeWasm() must be awaited first!");
15399                 }
15400                 const nativeResponseValue = wasm.TrustedClosingTransaction_free(this_obj);
15401                 // debug statements here
15402         }
15403         // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
15404         export function TrustedClosingTransaction_built_transaction(this_arg: number): Uint8Array {
15405                 if(!isWasmInitialized) {
15406                         throw new Error("initializeWasm() must be awaited first!");
15407                 }
15408                 const nativeResponseValue = wasm.TrustedClosingTransaction_built_transaction(this_arg);
15409                 return decodeArray(nativeResponseValue);
15410         }
15411         // 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);
15412         export function TrustedClosingTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
15413                 if(!isWasmInitialized) {
15414                         throw new Error("initializeWasm() must be awaited first!");
15415                 }
15416                 const nativeResponseValue = wasm.TrustedClosingTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
15417                 return decodeArray(nativeResponseValue);
15418         }
15419         // 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);
15420         export function TrustedClosingTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
15421                 if(!isWasmInitialized) {
15422                         throw new Error("initializeWasm() must be awaited first!");
15423                 }
15424                 const nativeResponseValue = wasm.TrustedClosingTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
15425                 return decodeArray(nativeResponseValue);
15426         }
15427         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
15428         export function CommitmentTransaction_free(this_obj: number): void {
15429                 if(!isWasmInitialized) {
15430                         throw new Error("initializeWasm() must be awaited first!");
15431                 }
15432                 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
15433                 // debug statements here
15434         }
15435         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
15436         export function CommitmentTransaction_clone(orig: number): number {
15437                 if(!isWasmInitialized) {
15438                         throw new Error("initializeWasm() must be awaited first!");
15439                 }
15440                 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
15441                 return nativeResponseValue;
15442         }
15443         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
15444         export function CommitmentTransaction_write(obj: number): Uint8Array {
15445                 if(!isWasmInitialized) {
15446                         throw new Error("initializeWasm() must be awaited first!");
15447                 }
15448                 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
15449                 return decodeArray(nativeResponseValue);
15450         }
15451         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
15452         export function CommitmentTransaction_read(ser: Uint8Array): number {
15453                 if(!isWasmInitialized) {
15454                         throw new Error("initializeWasm() must be awaited first!");
15455                 }
15456                 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
15457                 return nativeResponseValue;
15458         }
15459         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15460         export function CommitmentTransaction_commitment_number(this_arg: number): number {
15461                 if(!isWasmInitialized) {
15462                         throw new Error("initializeWasm() must be awaited first!");
15463                 }
15464                 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
15465                 return nativeResponseValue;
15466         }
15467         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15468         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
15469                 if(!isWasmInitialized) {
15470                         throw new Error("initializeWasm() must be awaited first!");
15471                 }
15472                 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
15473                 return nativeResponseValue;
15474         }
15475         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15476         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
15477                 if(!isWasmInitialized) {
15478                         throw new Error("initializeWasm() must be awaited first!");
15479                 }
15480                 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
15481                 return nativeResponseValue;
15482         }
15483         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15484         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
15485                 if(!isWasmInitialized) {
15486                         throw new Error("initializeWasm() must be awaited first!");
15487                 }
15488                 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
15489                 return nativeResponseValue;
15490         }
15491         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15492         export function CommitmentTransaction_trust(this_arg: number): number {
15493                 if(!isWasmInitialized) {
15494                         throw new Error("initializeWasm() must be awaited first!");
15495                 }
15496                 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
15497                 return nativeResponseValue;
15498         }
15499         // 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);
15500         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
15501                 if(!isWasmInitialized) {
15502                         throw new Error("initializeWasm() must be awaited first!");
15503                 }
15504                 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
15505                 return nativeResponseValue;
15506         }
15507         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
15508         export function TrustedCommitmentTransaction_free(this_obj: number): void {
15509                 if(!isWasmInitialized) {
15510                         throw new Error("initializeWasm() must be awaited first!");
15511                 }
15512                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
15513                 // debug statements here
15514         }
15515         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
15516         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
15517                 if(!isWasmInitialized) {
15518                         throw new Error("initializeWasm() must be awaited first!");
15519                 }
15520                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
15521                 return decodeArray(nativeResponseValue);
15522         }
15523         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
15524         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
15525                 if(!isWasmInitialized) {
15526                         throw new Error("initializeWasm() must be awaited first!");
15527                 }
15528                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
15529                 return nativeResponseValue;
15530         }
15531         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
15532         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
15533                 if(!isWasmInitialized) {
15534                         throw new Error("initializeWasm() must be awaited first!");
15535                 }
15536                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
15537                 return nativeResponseValue;
15538         }
15539         // 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);
15540         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
15541                 if(!isWasmInitialized) {
15542                         throw new Error("initializeWasm() must be awaited first!");
15543                 }
15544                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
15545                 return nativeResponseValue;
15546         }
15547         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
15548         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
15549                 if(!isWasmInitialized) {
15550                         throw new Error("initializeWasm() must be awaited first!");
15551                 }
15552                 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
15553                 return nativeResponseValue;
15554         }
15555         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
15556         export function InitFeatures_eq(a: number, b: number): boolean {
15557                 if(!isWasmInitialized) {
15558                         throw new Error("initializeWasm() must be awaited first!");
15559                 }
15560                 const nativeResponseValue = wasm.InitFeatures_eq(a, b);
15561                 return nativeResponseValue;
15562         }
15563         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
15564         export function NodeFeatures_eq(a: number, b: number): boolean {
15565                 if(!isWasmInitialized) {
15566                         throw new Error("initializeWasm() must be awaited first!");
15567                 }
15568                 const nativeResponseValue = wasm.NodeFeatures_eq(a, b);
15569                 return nativeResponseValue;
15570         }
15571         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
15572         export function ChannelFeatures_eq(a: number, b: number): boolean {
15573                 if(!isWasmInitialized) {
15574                         throw new Error("initializeWasm() must be awaited first!");
15575                 }
15576                 const nativeResponseValue = wasm.ChannelFeatures_eq(a, b);
15577                 return nativeResponseValue;
15578         }
15579         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
15580         export function InvoiceFeatures_eq(a: number, b: number): boolean {
15581                 if(!isWasmInitialized) {
15582                         throw new Error("initializeWasm() must be awaited first!");
15583                 }
15584                 const nativeResponseValue = wasm.InvoiceFeatures_eq(a, b);
15585                 return nativeResponseValue;
15586         }
15587         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
15588         export function InitFeatures_clone(orig: number): number {
15589                 if(!isWasmInitialized) {
15590                         throw new Error("initializeWasm() must be awaited first!");
15591                 }
15592                 const nativeResponseValue = wasm.InitFeatures_clone(orig);
15593                 return nativeResponseValue;
15594         }
15595         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
15596         export function NodeFeatures_clone(orig: number): number {
15597                 if(!isWasmInitialized) {
15598                         throw new Error("initializeWasm() must be awaited first!");
15599                 }
15600                 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
15601                 return nativeResponseValue;
15602         }
15603         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
15604         export function ChannelFeatures_clone(orig: number): number {
15605                 if(!isWasmInitialized) {
15606                         throw new Error("initializeWasm() must be awaited first!");
15607                 }
15608                 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
15609                 return nativeResponseValue;
15610         }
15611         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
15612         export function InvoiceFeatures_clone(orig: number): number {
15613                 if(!isWasmInitialized) {
15614                         throw new Error("initializeWasm() must be awaited first!");
15615                 }
15616                 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
15617                 return nativeResponseValue;
15618         }
15619         // void InitFeatures_free(struct LDKInitFeatures this_obj);
15620         export function InitFeatures_free(this_obj: number): void {
15621                 if(!isWasmInitialized) {
15622                         throw new Error("initializeWasm() must be awaited first!");
15623                 }
15624                 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
15625                 // debug statements here
15626         }
15627         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
15628         export function NodeFeatures_free(this_obj: number): void {
15629                 if(!isWasmInitialized) {
15630                         throw new Error("initializeWasm() must be awaited first!");
15631                 }
15632                 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
15633                 // debug statements here
15634         }
15635         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
15636         export function ChannelFeatures_free(this_obj: number): void {
15637                 if(!isWasmInitialized) {
15638                         throw new Error("initializeWasm() must be awaited first!");
15639                 }
15640                 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
15641                 // debug statements here
15642         }
15643         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
15644         export function InvoiceFeatures_free(this_obj: number): void {
15645                 if(!isWasmInitialized) {
15646                         throw new Error("initializeWasm() must be awaited first!");
15647                 }
15648                 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
15649                 // debug statements here
15650         }
15651         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
15652         export function InitFeatures_empty(): number {
15653                 if(!isWasmInitialized) {
15654                         throw new Error("initializeWasm() must be awaited first!");
15655                 }
15656                 const nativeResponseValue = wasm.InitFeatures_empty();
15657                 return nativeResponseValue;
15658         }
15659         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
15660         export function InitFeatures_known(): number {
15661                 if(!isWasmInitialized) {
15662                         throw new Error("initializeWasm() must be awaited first!");
15663                 }
15664                 const nativeResponseValue = wasm.InitFeatures_known();
15665                 return nativeResponseValue;
15666         }
15667         // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
15668         export function InitFeatures_requires_unknown_bits(this_arg: number): boolean {
15669                 if(!isWasmInitialized) {
15670                         throw new Error("initializeWasm() must be awaited first!");
15671                 }
15672                 const nativeResponseValue = wasm.InitFeatures_requires_unknown_bits(this_arg);
15673                 return nativeResponseValue;
15674         }
15675         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
15676         export function NodeFeatures_empty(): number {
15677                 if(!isWasmInitialized) {
15678                         throw new Error("initializeWasm() must be awaited first!");
15679                 }
15680                 const nativeResponseValue = wasm.NodeFeatures_empty();
15681                 return nativeResponseValue;
15682         }
15683         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
15684         export function NodeFeatures_known(): number {
15685                 if(!isWasmInitialized) {
15686                         throw new Error("initializeWasm() must be awaited first!");
15687                 }
15688                 const nativeResponseValue = wasm.NodeFeatures_known();
15689                 return nativeResponseValue;
15690         }
15691         // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
15692         export function NodeFeatures_requires_unknown_bits(this_arg: number): boolean {
15693                 if(!isWasmInitialized) {
15694                         throw new Error("initializeWasm() must be awaited first!");
15695                 }
15696                 const nativeResponseValue = wasm.NodeFeatures_requires_unknown_bits(this_arg);
15697                 return nativeResponseValue;
15698         }
15699         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
15700         export function ChannelFeatures_empty(): number {
15701                 if(!isWasmInitialized) {
15702                         throw new Error("initializeWasm() must be awaited first!");
15703                 }
15704                 const nativeResponseValue = wasm.ChannelFeatures_empty();
15705                 return nativeResponseValue;
15706         }
15707         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
15708         export function ChannelFeatures_known(): number {
15709                 if(!isWasmInitialized) {
15710                         throw new Error("initializeWasm() must be awaited first!");
15711                 }
15712                 const nativeResponseValue = wasm.ChannelFeatures_known();
15713                 return nativeResponseValue;
15714         }
15715         // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
15716         export function ChannelFeatures_requires_unknown_bits(this_arg: number): boolean {
15717                 if(!isWasmInitialized) {
15718                         throw new Error("initializeWasm() must be awaited first!");
15719                 }
15720                 const nativeResponseValue = wasm.ChannelFeatures_requires_unknown_bits(this_arg);
15721                 return nativeResponseValue;
15722         }
15723         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
15724         export function InvoiceFeatures_empty(): number {
15725                 if(!isWasmInitialized) {
15726                         throw new Error("initializeWasm() must be awaited first!");
15727                 }
15728                 const nativeResponseValue = wasm.InvoiceFeatures_empty();
15729                 return nativeResponseValue;
15730         }
15731         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
15732         export function InvoiceFeatures_known(): number {
15733                 if(!isWasmInitialized) {
15734                         throw new Error("initializeWasm() must be awaited first!");
15735                 }
15736                 const nativeResponseValue = wasm.InvoiceFeatures_known();
15737                 return nativeResponseValue;
15738         }
15739         // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
15740         export function InvoiceFeatures_requires_unknown_bits(this_arg: number): boolean {
15741                 if(!isWasmInitialized) {
15742                         throw new Error("initializeWasm() must be awaited first!");
15743                 }
15744                 const nativeResponseValue = wasm.InvoiceFeatures_requires_unknown_bits(this_arg);
15745                 return nativeResponseValue;
15746         }
15747         // MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg);
15748         export function InitFeatures_supports_payment_secret(this_arg: number): boolean {
15749                 if(!isWasmInitialized) {
15750                         throw new Error("initializeWasm() must be awaited first!");
15751                 }
15752                 const nativeResponseValue = wasm.InitFeatures_supports_payment_secret(this_arg);
15753                 return nativeResponseValue;
15754         }
15755         // MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
15756         export function NodeFeatures_supports_payment_secret(this_arg: number): boolean {
15757                 if(!isWasmInitialized) {
15758                         throw new Error("initializeWasm() must be awaited first!");
15759                 }
15760                 const nativeResponseValue = wasm.NodeFeatures_supports_payment_secret(this_arg);
15761                 return nativeResponseValue;
15762         }
15763         // MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
15764         export function InvoiceFeatures_supports_payment_secret(this_arg: number): boolean {
15765                 if(!isWasmInitialized) {
15766                         throw new Error("initializeWasm() must be awaited first!");
15767                 }
15768                 const nativeResponseValue = wasm.InvoiceFeatures_supports_payment_secret(this_arg);
15769                 return nativeResponseValue;
15770         }
15771         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
15772         export function InitFeatures_write(obj: number): Uint8Array {
15773                 if(!isWasmInitialized) {
15774                         throw new Error("initializeWasm() must be awaited first!");
15775                 }
15776                 const nativeResponseValue = wasm.InitFeatures_write(obj);
15777                 return decodeArray(nativeResponseValue);
15778         }
15779         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
15780         export function NodeFeatures_write(obj: number): Uint8Array {
15781                 if(!isWasmInitialized) {
15782                         throw new Error("initializeWasm() must be awaited first!");
15783                 }
15784                 const nativeResponseValue = wasm.NodeFeatures_write(obj);
15785                 return decodeArray(nativeResponseValue);
15786         }
15787         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
15788         export function ChannelFeatures_write(obj: number): Uint8Array {
15789                 if(!isWasmInitialized) {
15790                         throw new Error("initializeWasm() must be awaited first!");
15791                 }
15792                 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
15793                 return decodeArray(nativeResponseValue);
15794         }
15795         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
15796         export function InvoiceFeatures_write(obj: number): Uint8Array {
15797                 if(!isWasmInitialized) {
15798                         throw new Error("initializeWasm() must be awaited first!");
15799                 }
15800                 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
15801                 return decodeArray(nativeResponseValue);
15802         }
15803         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
15804         export function InitFeatures_read(ser: Uint8Array): number {
15805                 if(!isWasmInitialized) {
15806                         throw new Error("initializeWasm() must be awaited first!");
15807                 }
15808                 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
15809                 return nativeResponseValue;
15810         }
15811         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
15812         export function NodeFeatures_read(ser: Uint8Array): number {
15813                 if(!isWasmInitialized) {
15814                         throw new Error("initializeWasm() must be awaited first!");
15815                 }
15816                 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
15817                 return nativeResponseValue;
15818         }
15819         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
15820         export function ChannelFeatures_read(ser: Uint8Array): number {
15821                 if(!isWasmInitialized) {
15822                         throw new Error("initializeWasm() must be awaited first!");
15823                 }
15824                 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
15825                 return nativeResponseValue;
15826         }
15827         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
15828         export function InvoiceFeatures_read(ser: Uint8Array): number {
15829                 if(!isWasmInitialized) {
15830                         throw new Error("initializeWasm() must be awaited first!");
15831                 }
15832                 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
15833                 return nativeResponseValue;
15834         }
15835         // void ShutdownScript_free(struct LDKShutdownScript this_obj);
15836         export function ShutdownScript_free(this_obj: number): void {
15837                 if(!isWasmInitialized) {
15838                         throw new Error("initializeWasm() must be awaited first!");
15839                 }
15840                 const nativeResponseValue = wasm.ShutdownScript_free(this_obj);
15841                 // debug statements here
15842         }
15843         // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
15844         export function ShutdownScript_clone(orig: number): number {
15845                 if(!isWasmInitialized) {
15846                         throw new Error("initializeWasm() must be awaited first!");
15847                 }
15848                 const nativeResponseValue = wasm.ShutdownScript_clone(orig);
15849                 return nativeResponseValue;
15850         }
15851         // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
15852         export function InvalidShutdownScript_free(this_obj: number): void {
15853                 if(!isWasmInitialized) {
15854                         throw new Error("initializeWasm() must be awaited first!");
15855                 }
15856                 const nativeResponseValue = wasm.InvalidShutdownScript_free(this_obj);
15857                 // debug statements here
15858         }
15859         // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
15860         export function InvalidShutdownScript_get_script(this_ptr: number): Uint8Array {
15861                 if(!isWasmInitialized) {
15862                         throw new Error("initializeWasm() must be awaited first!");
15863                 }
15864                 const nativeResponseValue = wasm.InvalidShutdownScript_get_script(this_ptr);
15865                 return decodeArray(nativeResponseValue);
15866         }
15867         // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
15868         export function InvalidShutdownScript_set_script(this_ptr: number, val: Uint8Array): void {
15869                 if(!isWasmInitialized) {
15870                         throw new Error("initializeWasm() must be awaited first!");
15871                 }
15872                 const nativeResponseValue = wasm.InvalidShutdownScript_set_script(this_ptr, encodeArray(val));
15873                 // debug statements here
15874         }
15875         // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
15876         export function InvalidShutdownScript_new(script_arg: Uint8Array): number {
15877                 if(!isWasmInitialized) {
15878                         throw new Error("initializeWasm() must be awaited first!");
15879                 }
15880                 const nativeResponseValue = wasm.InvalidShutdownScript_new(encodeArray(script_arg));
15881                 return nativeResponseValue;
15882         }
15883         // struct LDKInvalidShutdownScript InvalidShutdownScript_clone(const struct LDKInvalidShutdownScript *NONNULL_PTR orig);
15884         export function InvalidShutdownScript_clone(orig: number): number {
15885                 if(!isWasmInitialized) {
15886                         throw new Error("initializeWasm() must be awaited first!");
15887                 }
15888                 const nativeResponseValue = wasm.InvalidShutdownScript_clone(orig);
15889                 return nativeResponseValue;
15890         }
15891         // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
15892         export function ShutdownScript_write(obj: number): Uint8Array {
15893                 if(!isWasmInitialized) {
15894                         throw new Error("initializeWasm() must be awaited first!");
15895                 }
15896                 const nativeResponseValue = wasm.ShutdownScript_write(obj);
15897                 return decodeArray(nativeResponseValue);
15898         }
15899         // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
15900         export function ShutdownScript_read(ser: Uint8Array): number {
15901                 if(!isWasmInitialized) {
15902                         throw new Error("initializeWasm() must be awaited first!");
15903                 }
15904                 const nativeResponseValue = wasm.ShutdownScript_read(encodeArray(ser));
15905                 return nativeResponseValue;
15906         }
15907         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
15908         export function ShutdownScript_new_p2wpkh(pubkey_hash: Uint8Array): number {
15909                 if(!isWasmInitialized) {
15910                         throw new Error("initializeWasm() must be awaited first!");
15911                 }
15912                 const nativeResponseValue = wasm.ShutdownScript_new_p2wpkh(encodeArray(pubkey_hash));
15913                 return nativeResponseValue;
15914         }
15915         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
15916         export function ShutdownScript_new_p2wsh(script_hash: Uint8Array): number {
15917                 if(!isWasmInitialized) {
15918                         throw new Error("initializeWasm() must be awaited first!");
15919                 }
15920                 const nativeResponseValue = wasm.ShutdownScript_new_p2wsh(encodeArray(script_hash));
15921                 return nativeResponseValue;
15922         }
15923         // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
15924         export function ShutdownScript_new_witness_program(version: number, program: Uint8Array): number {
15925                 if(!isWasmInitialized) {
15926                         throw new Error("initializeWasm() must be awaited first!");
15927                 }
15928                 const nativeResponseValue = wasm.ShutdownScript_new_witness_program(version, encodeArray(program));
15929                 return nativeResponseValue;
15930         }
15931         // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
15932         export function ShutdownScript_into_inner(this_arg: number): Uint8Array {
15933                 if(!isWasmInitialized) {
15934                         throw new Error("initializeWasm() must be awaited first!");
15935                 }
15936                 const nativeResponseValue = wasm.ShutdownScript_into_inner(this_arg);
15937                 return decodeArray(nativeResponseValue);
15938         }
15939         // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
15940         export function ShutdownScript_as_legacy_pubkey(this_arg: number): Uint8Array {
15941                 if(!isWasmInitialized) {
15942                         throw new Error("initializeWasm() must be awaited first!");
15943                 }
15944                 const nativeResponseValue = wasm.ShutdownScript_as_legacy_pubkey(this_arg);
15945                 return decodeArray(nativeResponseValue);
15946         }
15947         // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
15948         export function ShutdownScript_is_compatible(this_arg: number, features: number): boolean {
15949                 if(!isWasmInitialized) {
15950                         throw new Error("initializeWasm() must be awaited first!");
15951                 }
15952                 const nativeResponseValue = wasm.ShutdownScript_is_compatible(this_arg, features);
15953                 return nativeResponseValue;
15954         }
15955         // void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
15956         export function CustomMessageReader_free(this_ptr: number): void {
15957                 if(!isWasmInitialized) {
15958                         throw new Error("initializeWasm() must be awaited first!");
15959                 }
15960                 const nativeResponseValue = wasm.CustomMessageReader_free(this_ptr);
15961                 // debug statements here
15962         }
15963         // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
15964         export function Type_clone(orig: number): number {
15965                 if(!isWasmInitialized) {
15966                         throw new Error("initializeWasm() must be awaited first!");
15967                 }
15968                 const nativeResponseValue = wasm.Type_clone(orig);
15969                 return nativeResponseValue;
15970         }
15971         // void Type_free(struct LDKType this_ptr);
15972         export function Type_free(this_ptr: number): void {
15973                 if(!isWasmInitialized) {
15974                         throw new Error("initializeWasm() must be awaited first!");
15975                 }
15976                 const nativeResponseValue = wasm.Type_free(this_ptr);
15977                 // debug statements here
15978         }
15979         // void Score_free(struct LDKScore this_ptr);
15980         export function Score_free(this_ptr: number): void {
15981                 if(!isWasmInitialized) {
15982                         throw new Error("initializeWasm() must be awaited first!");
15983                 }
15984                 const nativeResponseValue = wasm.Score_free(this_ptr);
15985                 // debug statements here
15986         }
15987         // void LockableScore_free(struct LDKLockableScore this_obj);
15988         export function LockableScore_free(this_obj: number): void {
15989                 if(!isWasmInitialized) {
15990                         throw new Error("initializeWasm() must be awaited first!");
15991                 }
15992                 const nativeResponseValue = wasm.LockableScore_free(this_obj);
15993                 // debug statements here
15994         }
15995         // MUST_USE_RES struct LDKLockableScore LockableScore_new(struct LDKScore score);
15996         export function LockableScore_new(score: number): number {
15997                 if(!isWasmInitialized) {
15998                         throw new Error("initializeWasm() must be awaited first!");
15999                 }
16000                 const nativeResponseValue = wasm.LockableScore_new(score);
16001                 return nativeResponseValue;
16002         }
16003         // struct LDKCVec_u8Z LockableScore_write(const struct LDKLockableScore *NONNULL_PTR obj);
16004         export function LockableScore_write(obj: number): Uint8Array {
16005                 if(!isWasmInitialized) {
16006                         throw new Error("initializeWasm() must be awaited first!");
16007                 }
16008                 const nativeResponseValue = wasm.LockableScore_write(obj);
16009                 return decodeArray(nativeResponseValue);
16010         }
16011         // void NodeId_free(struct LDKNodeId this_obj);
16012         export function NodeId_free(this_obj: number): void {
16013                 if(!isWasmInitialized) {
16014                         throw new Error("initializeWasm() must be awaited first!");
16015                 }
16016                 const nativeResponseValue = wasm.NodeId_free(this_obj);
16017                 // debug statements here
16018         }
16019         // struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
16020         export function NodeId_clone(orig: number): number {
16021                 if(!isWasmInitialized) {
16022                         throw new Error("initializeWasm() must be awaited first!");
16023                 }
16024                 const nativeResponseValue = wasm.NodeId_clone(orig);
16025                 return nativeResponseValue;
16026         }
16027         // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
16028         export function NodeId_from_pubkey(pubkey: Uint8Array): number {
16029                 if(!isWasmInitialized) {
16030                         throw new Error("initializeWasm() must be awaited first!");
16031                 }
16032                 const nativeResponseValue = wasm.NodeId_from_pubkey(encodeArray(pubkey));
16033                 return nativeResponseValue;
16034         }
16035         // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
16036         export function NodeId_as_slice(this_arg: number): Uint8Array {
16037                 if(!isWasmInitialized) {
16038                         throw new Error("initializeWasm() must be awaited first!");
16039                 }
16040                 const nativeResponseValue = wasm.NodeId_as_slice(this_arg);
16041                 return decodeArray(nativeResponseValue);
16042         }
16043         // uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
16044         export function NodeId_hash(o: number): number {
16045                 if(!isWasmInitialized) {
16046                         throw new Error("initializeWasm() must be awaited first!");
16047                 }
16048                 const nativeResponseValue = wasm.NodeId_hash(o);
16049                 return nativeResponseValue;
16050         }
16051         // struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
16052         export function NodeId_write(obj: number): Uint8Array {
16053                 if(!isWasmInitialized) {
16054                         throw new Error("initializeWasm() must be awaited first!");
16055                 }
16056                 const nativeResponseValue = wasm.NodeId_write(obj);
16057                 return decodeArray(nativeResponseValue);
16058         }
16059         // struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
16060         export function NodeId_read(ser: Uint8Array): number {
16061                 if(!isWasmInitialized) {
16062                         throw new Error("initializeWasm() must be awaited first!");
16063                 }
16064                 const nativeResponseValue = wasm.NodeId_read(encodeArray(ser));
16065                 return nativeResponseValue;
16066         }
16067         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
16068         export function NetworkGraph_free(this_obj: number): void {
16069                 if(!isWasmInitialized) {
16070                         throw new Error("initializeWasm() must be awaited first!");
16071                 }
16072                 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
16073                 // debug statements here
16074         }
16075         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
16076         export function NetworkGraph_clone(orig: number): number {
16077                 if(!isWasmInitialized) {
16078                         throw new Error("initializeWasm() must be awaited first!");
16079                 }
16080                 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
16081                 return nativeResponseValue;
16082         }
16083         // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
16084         export function ReadOnlyNetworkGraph_free(this_obj: number): void {
16085                 if(!isWasmInitialized) {
16086                         throw new Error("initializeWasm() must be awaited first!");
16087                 }
16088                 const nativeResponseValue = wasm.ReadOnlyNetworkGraph_free(this_obj);
16089                 // debug statements here
16090         }
16091         // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
16092         export function NetworkUpdate_free(this_ptr: number): void {
16093                 if(!isWasmInitialized) {
16094                         throw new Error("initializeWasm() must be awaited first!");
16095                 }
16096                 const nativeResponseValue = wasm.NetworkUpdate_free(this_ptr);
16097                 // debug statements here
16098         }
16099         // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
16100         export function NetworkUpdate_clone(orig: number): number {
16101                 if(!isWasmInitialized) {
16102                         throw new Error("initializeWasm() must be awaited first!");
16103                 }
16104                 const nativeResponseValue = wasm.NetworkUpdate_clone(orig);
16105                 return nativeResponseValue;
16106         }
16107         // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
16108         export function NetworkUpdate_channel_update_message(msg: number): number {
16109                 if(!isWasmInitialized) {
16110                         throw new Error("initializeWasm() must be awaited first!");
16111                 }
16112                 const nativeResponseValue = wasm.NetworkUpdate_channel_update_message(msg);
16113                 return nativeResponseValue;
16114         }
16115         // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
16116         export function NetworkUpdate_channel_closed(short_channel_id: number, is_permanent: boolean): number {
16117                 if(!isWasmInitialized) {
16118                         throw new Error("initializeWasm() must be awaited first!");
16119                 }
16120                 const nativeResponseValue = wasm.NetworkUpdate_channel_closed(short_channel_id, is_permanent);
16121                 return nativeResponseValue;
16122         }
16123         // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
16124         export function NetworkUpdate_node_failure(node_id: Uint8Array, is_permanent: boolean): number {
16125                 if(!isWasmInitialized) {
16126                         throw new Error("initializeWasm() must be awaited first!");
16127                 }
16128                 const nativeResponseValue = wasm.NetworkUpdate_node_failure(encodeArray(node_id), is_permanent);
16129                 return nativeResponseValue;
16130         }
16131         // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
16132         export function NetworkUpdate_write(obj: number): Uint8Array {
16133                 if(!isWasmInitialized) {
16134                         throw new Error("initializeWasm() must be awaited first!");
16135                 }
16136                 const nativeResponseValue = wasm.NetworkUpdate_write(obj);
16137                 return decodeArray(nativeResponseValue);
16138         }
16139         // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
16140         export function NetGraphMsgHandler_as_EventHandler(this_arg: number): number {
16141                 if(!isWasmInitialized) {
16142                         throw new Error("initializeWasm() must be awaited first!");
16143                 }
16144                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_EventHandler(this_arg);
16145                 return nativeResponseValue;
16146         }
16147         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
16148         export function NetGraphMsgHandler_free(this_obj: number): void {
16149                 if(!isWasmInitialized) {
16150                         throw new Error("initializeWasm() must be awaited first!");
16151                 }
16152                 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
16153                 // debug statements here
16154         }
16155         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
16156         export function NetGraphMsgHandler_new(network_graph: number, chain_access: number, logger: number): number {
16157                 if(!isWasmInitialized) {
16158                         throw new Error("initializeWasm() must be awaited first!");
16159                 }
16160                 const nativeResponseValue = wasm.NetGraphMsgHandler_new(network_graph, chain_access, logger);
16161                 return nativeResponseValue;
16162         }
16163         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
16164         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
16165                 if(!isWasmInitialized) {
16166                         throw new Error("initializeWasm() must be awaited first!");
16167                 }
16168                 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
16169                 // debug statements here
16170         }
16171         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
16172         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
16173                 if(!isWasmInitialized) {
16174                         throw new Error("initializeWasm() must be awaited first!");
16175                 }
16176                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
16177                 return nativeResponseValue;
16178         }
16179         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
16180         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
16181                 if(!isWasmInitialized) {
16182                         throw new Error("initializeWasm() must be awaited first!");
16183                 }
16184                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
16185                 return nativeResponseValue;
16186         }
16187         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
16188         export function DirectionalChannelInfo_free(this_obj: number): void {
16189                 if(!isWasmInitialized) {
16190                         throw new Error("initializeWasm() must be awaited first!");
16191                 }
16192                 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
16193                 // debug statements here
16194         }
16195         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
16196         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
16197                 if(!isWasmInitialized) {
16198                         throw new Error("initializeWasm() must be awaited first!");
16199                 }
16200                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
16201                 return nativeResponseValue;
16202         }
16203         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
16204         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
16205                 if(!isWasmInitialized) {
16206                         throw new Error("initializeWasm() must be awaited first!");
16207                 }
16208                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
16209                 // debug statements here
16210         }
16211         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
16212         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
16213                 if(!isWasmInitialized) {
16214                         throw new Error("initializeWasm() must be awaited first!");
16215                 }
16216                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
16217                 return nativeResponseValue;
16218         }
16219         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
16220         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
16221                 if(!isWasmInitialized) {
16222                         throw new Error("initializeWasm() must be awaited first!");
16223                 }
16224                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
16225                 // debug statements here
16226         }
16227         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
16228         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
16229                 if(!isWasmInitialized) {
16230                         throw new Error("initializeWasm() must be awaited first!");
16231                 }
16232                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
16233                 return nativeResponseValue;
16234         }
16235         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
16236         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
16237                 if(!isWasmInitialized) {
16238                         throw new Error("initializeWasm() must be awaited first!");
16239                 }
16240                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
16241                 // debug statements here
16242         }
16243         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
16244         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
16245                 if(!isWasmInitialized) {
16246                         throw new Error("initializeWasm() must be awaited first!");
16247                 }
16248                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
16249                 return nativeResponseValue;
16250         }
16251         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
16252         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
16253                 if(!isWasmInitialized) {
16254                         throw new Error("initializeWasm() must be awaited first!");
16255                 }
16256                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
16257                 // debug statements here
16258         }
16259         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
16260         export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
16261                 if(!isWasmInitialized) {
16262                         throw new Error("initializeWasm() must be awaited first!");
16263                 }
16264                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
16265                 return nativeResponseValue;
16266         }
16267         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
16268         export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
16269                 if(!isWasmInitialized) {
16270                         throw new Error("initializeWasm() must be awaited first!");
16271                 }
16272                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
16273                 // debug statements here
16274         }
16275         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
16276         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
16277                 if(!isWasmInitialized) {
16278                         throw new Error("initializeWasm() must be awaited first!");
16279                 }
16280                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
16281                 return nativeResponseValue;
16282         }
16283         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
16284         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
16285                 if(!isWasmInitialized) {
16286                         throw new Error("initializeWasm() must be awaited first!");
16287                 }
16288                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
16289                 // debug statements here
16290         }
16291         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
16292         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
16293                 if(!isWasmInitialized) {
16294                         throw new Error("initializeWasm() must be awaited first!");
16295                 }
16296                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
16297                 return nativeResponseValue;
16298         }
16299         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
16300         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
16301                 if(!isWasmInitialized) {
16302                         throw new Error("initializeWasm() must be awaited first!");
16303                 }
16304                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
16305                 // debug statements here
16306         }
16307         // 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);
16308         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 {
16309                 if(!isWasmInitialized) {
16310                         throw new Error("initializeWasm() must be awaited first!");
16311                 }
16312                 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);
16313                 return nativeResponseValue;
16314         }
16315         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
16316         export function DirectionalChannelInfo_clone(orig: number): number {
16317                 if(!isWasmInitialized) {
16318                         throw new Error("initializeWasm() must be awaited first!");
16319                 }
16320                 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
16321                 return nativeResponseValue;
16322         }
16323         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
16324         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
16325                 if(!isWasmInitialized) {
16326                         throw new Error("initializeWasm() must be awaited first!");
16327                 }
16328                 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
16329                 return decodeArray(nativeResponseValue);
16330         }
16331         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
16332         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
16333                 if(!isWasmInitialized) {
16334                         throw new Error("initializeWasm() must be awaited first!");
16335                 }
16336                 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
16337                 return nativeResponseValue;
16338         }
16339         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
16340         export function ChannelInfo_free(this_obj: number): void {
16341                 if(!isWasmInitialized) {
16342                         throw new Error("initializeWasm() must be awaited first!");
16343                 }
16344                 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
16345                 // debug statements here
16346         }
16347         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16348         export function ChannelInfo_get_features(this_ptr: number): number {
16349                 if(!isWasmInitialized) {
16350                         throw new Error("initializeWasm() must be awaited first!");
16351                 }
16352                 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
16353                 return nativeResponseValue;
16354         }
16355         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
16356         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
16357                 if(!isWasmInitialized) {
16358                         throw new Error("initializeWasm() must be awaited first!");
16359                 }
16360                 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
16361                 // debug statements here
16362         }
16363         // struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16364         export function ChannelInfo_get_node_one(this_ptr: number): number {
16365                 if(!isWasmInitialized) {
16366                         throw new Error("initializeWasm() must be awaited first!");
16367                 }
16368                 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
16369                 return nativeResponseValue;
16370         }
16371         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
16372         export function ChannelInfo_set_node_one(this_ptr: number, val: number): void {
16373                 if(!isWasmInitialized) {
16374                         throw new Error("initializeWasm() must be awaited first!");
16375                 }
16376                 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, val);
16377                 // debug statements here
16378         }
16379         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16380         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
16381                 if(!isWasmInitialized) {
16382                         throw new Error("initializeWasm() must be awaited first!");
16383                 }
16384                 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
16385                 return nativeResponseValue;
16386         }
16387         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
16388         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
16389                 if(!isWasmInitialized) {
16390                         throw new Error("initializeWasm() must be awaited first!");
16391                 }
16392                 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
16393                 // debug statements here
16394         }
16395         // struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16396         export function ChannelInfo_get_node_two(this_ptr: number): number {
16397                 if(!isWasmInitialized) {
16398                         throw new Error("initializeWasm() must be awaited first!");
16399                 }
16400                 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
16401                 return nativeResponseValue;
16402         }
16403         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
16404         export function ChannelInfo_set_node_two(this_ptr: number, val: number): void {
16405                 if(!isWasmInitialized) {
16406                         throw new Error("initializeWasm() must be awaited first!");
16407                 }
16408                 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, val);
16409                 // debug statements here
16410         }
16411         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16412         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
16413                 if(!isWasmInitialized) {
16414                         throw new Error("initializeWasm() must be awaited first!");
16415                 }
16416                 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
16417                 return nativeResponseValue;
16418         }
16419         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
16420         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
16421                 if(!isWasmInitialized) {
16422                         throw new Error("initializeWasm() must be awaited first!");
16423                 }
16424                 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
16425                 // debug statements here
16426         }
16427         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16428         export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
16429                 if(!isWasmInitialized) {
16430                         throw new Error("initializeWasm() must be awaited first!");
16431                 }
16432                 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
16433                 return nativeResponseValue;
16434         }
16435         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
16436         export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
16437                 if(!isWasmInitialized) {
16438                         throw new Error("initializeWasm() must be awaited first!");
16439                 }
16440                 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
16441                 // debug statements here
16442         }
16443         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16444         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
16445                 if(!isWasmInitialized) {
16446                         throw new Error("initializeWasm() must be awaited first!");
16447                 }
16448                 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
16449                 return nativeResponseValue;
16450         }
16451         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
16452         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
16453                 if(!isWasmInitialized) {
16454                         throw new Error("initializeWasm() must be awaited first!");
16455                 }
16456                 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
16457                 // debug statements here
16458         }
16459         // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKNodeId node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKNodeId node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
16460         export function ChannelInfo_new(features_arg: number, node_one_arg: number, one_to_two_arg: number, node_two_arg: number, two_to_one_arg: number, capacity_sats_arg: number, announcement_message_arg: number): number {
16461                 if(!isWasmInitialized) {
16462                         throw new Error("initializeWasm() must be awaited first!");
16463                 }
16464                 const nativeResponseValue = wasm.ChannelInfo_new(features_arg, node_one_arg, one_to_two_arg, node_two_arg, two_to_one_arg, capacity_sats_arg, announcement_message_arg);
16465                 return nativeResponseValue;
16466         }
16467         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
16468         export function ChannelInfo_clone(orig: number): number {
16469                 if(!isWasmInitialized) {
16470                         throw new Error("initializeWasm() must be awaited first!");
16471                 }
16472                 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
16473                 return nativeResponseValue;
16474         }
16475         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
16476         export function ChannelInfo_write(obj: number): Uint8Array {
16477                 if(!isWasmInitialized) {
16478                         throw new Error("initializeWasm() must be awaited first!");
16479                 }
16480                 const nativeResponseValue = wasm.ChannelInfo_write(obj);
16481                 return decodeArray(nativeResponseValue);
16482         }
16483         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
16484         export function ChannelInfo_read(ser: Uint8Array): number {
16485                 if(!isWasmInitialized) {
16486                         throw new Error("initializeWasm() must be awaited first!");
16487                 }
16488                 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
16489                 return nativeResponseValue;
16490         }
16491         // void RoutingFees_free(struct LDKRoutingFees this_obj);
16492         export function RoutingFees_free(this_obj: number): void {
16493                 if(!isWasmInitialized) {
16494                         throw new Error("initializeWasm() must be awaited first!");
16495                 }
16496                 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
16497                 // debug statements here
16498         }
16499         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
16500         export function RoutingFees_get_base_msat(this_ptr: number): number {
16501                 if(!isWasmInitialized) {
16502                         throw new Error("initializeWasm() must be awaited first!");
16503                 }
16504                 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
16505                 return nativeResponseValue;
16506         }
16507         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
16508         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
16509                 if(!isWasmInitialized) {
16510                         throw new Error("initializeWasm() must be awaited first!");
16511                 }
16512                 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
16513                 // debug statements here
16514         }
16515         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
16516         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
16517                 if(!isWasmInitialized) {
16518                         throw new Error("initializeWasm() must be awaited first!");
16519                 }
16520                 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
16521                 return nativeResponseValue;
16522         }
16523         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
16524         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
16525                 if(!isWasmInitialized) {
16526                         throw new Error("initializeWasm() must be awaited first!");
16527                 }
16528                 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
16529                 // debug statements here
16530         }
16531         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
16532         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
16533                 if(!isWasmInitialized) {
16534                         throw new Error("initializeWasm() must be awaited first!");
16535                 }
16536                 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
16537                 return nativeResponseValue;
16538         }
16539         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
16540         export function RoutingFees_eq(a: number, b: number): boolean {
16541                 if(!isWasmInitialized) {
16542                         throw new Error("initializeWasm() must be awaited first!");
16543                 }
16544                 const nativeResponseValue = wasm.RoutingFees_eq(a, b);
16545                 return nativeResponseValue;
16546         }
16547         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
16548         export function RoutingFees_clone(orig: number): number {
16549                 if(!isWasmInitialized) {
16550                         throw new Error("initializeWasm() must be awaited first!");
16551                 }
16552                 const nativeResponseValue = wasm.RoutingFees_clone(orig);
16553                 return nativeResponseValue;
16554         }
16555         // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
16556         export function RoutingFees_hash(o: number): number {
16557                 if(!isWasmInitialized) {
16558                         throw new Error("initializeWasm() must be awaited first!");
16559                 }
16560                 const nativeResponseValue = wasm.RoutingFees_hash(o);
16561                 return nativeResponseValue;
16562         }
16563         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
16564         export function RoutingFees_write(obj: number): Uint8Array {
16565                 if(!isWasmInitialized) {
16566                         throw new Error("initializeWasm() must be awaited first!");
16567                 }
16568                 const nativeResponseValue = wasm.RoutingFees_write(obj);
16569                 return decodeArray(nativeResponseValue);
16570         }
16571         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
16572         export function RoutingFees_read(ser: Uint8Array): number {
16573                 if(!isWasmInitialized) {
16574                         throw new Error("initializeWasm() must be awaited first!");
16575                 }
16576                 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
16577                 return nativeResponseValue;
16578         }
16579         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
16580         export function NodeAnnouncementInfo_free(this_obj: number): void {
16581                 if(!isWasmInitialized) {
16582                         throw new Error("initializeWasm() must be awaited first!");
16583                 }
16584                 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
16585                 // debug statements here
16586         }
16587         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16588         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
16589                 if(!isWasmInitialized) {
16590                         throw new Error("initializeWasm() must be awaited first!");
16591                 }
16592                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
16593                 return nativeResponseValue;
16594         }
16595         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
16596         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
16597                 if(!isWasmInitialized) {
16598                         throw new Error("initializeWasm() must be awaited first!");
16599                 }
16600                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
16601                 // debug statements here
16602         }
16603         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16604         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
16605                 if(!isWasmInitialized) {
16606                         throw new Error("initializeWasm() must be awaited first!");
16607                 }
16608                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
16609                 return nativeResponseValue;
16610         }
16611         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
16612         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
16613                 if(!isWasmInitialized) {
16614                         throw new Error("initializeWasm() must be awaited first!");
16615                 }
16616                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
16617                 // debug statements here
16618         }
16619         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
16620         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
16621                 if(!isWasmInitialized) {
16622                         throw new Error("initializeWasm() must be awaited first!");
16623                 }
16624                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
16625                 return decodeArray(nativeResponseValue);
16626         }
16627         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
16628         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
16629                 if(!isWasmInitialized) {
16630                         throw new Error("initializeWasm() must be awaited first!");
16631                 }
16632                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
16633                 // debug statements here
16634         }
16635         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
16636         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
16637                 if(!isWasmInitialized) {
16638                         throw new Error("initializeWasm() must be awaited first!");
16639                 }
16640                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
16641                 return decodeArray(nativeResponseValue);
16642         }
16643         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16644         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
16645                 if(!isWasmInitialized) {
16646                         throw new Error("initializeWasm() must be awaited first!");
16647                 }
16648                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
16649                 // debug statements here
16650         }
16651         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
16652         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
16653                 if(!isWasmInitialized) {
16654                         throw new Error("initializeWasm() must be awaited first!");
16655                 }
16656                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
16657                 // debug statements here
16658         }
16659         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16660         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
16661                 if(!isWasmInitialized) {
16662                         throw new Error("initializeWasm() must be awaited first!");
16663                 }
16664                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
16665                 return nativeResponseValue;
16666         }
16667         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
16668         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
16669                 if(!isWasmInitialized) {
16670                         throw new Error("initializeWasm() must be awaited first!");
16671                 }
16672                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
16673                 // debug statements here
16674         }
16675         // 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);
16676         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 {
16677                 if(!isWasmInitialized) {
16678                         throw new Error("initializeWasm() must be awaited first!");
16679                 }
16680                 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
16681                 return nativeResponseValue;
16682         }
16683         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
16684         export function NodeAnnouncementInfo_clone(orig: number): number {
16685                 if(!isWasmInitialized) {
16686                         throw new Error("initializeWasm() must be awaited first!");
16687                 }
16688                 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
16689                 return nativeResponseValue;
16690         }
16691         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
16692         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
16693                 if(!isWasmInitialized) {
16694                         throw new Error("initializeWasm() must be awaited first!");
16695                 }
16696                 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
16697                 return decodeArray(nativeResponseValue);
16698         }
16699         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
16700         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
16701                 if(!isWasmInitialized) {
16702                         throw new Error("initializeWasm() must be awaited first!");
16703                 }
16704                 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
16705                 return nativeResponseValue;
16706         }
16707         // void NodeInfo_free(struct LDKNodeInfo this_obj);
16708         export function NodeInfo_free(this_obj: number): void {
16709                 if(!isWasmInitialized) {
16710                         throw new Error("initializeWasm() must be awaited first!");
16711                 }
16712                 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
16713                 // debug statements here
16714         }
16715         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
16716         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
16717                 if(!isWasmInitialized) {
16718                         throw new Error("initializeWasm() must be awaited first!");
16719                 }
16720                 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
16721                 // debug statements here
16722         }
16723         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
16724         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
16725                 if(!isWasmInitialized) {
16726                         throw new Error("initializeWasm() must be awaited first!");
16727                 }
16728                 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
16729                 return nativeResponseValue;
16730         }
16731         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
16732         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
16733                 if(!isWasmInitialized) {
16734                         throw new Error("initializeWasm() must be awaited first!");
16735                 }
16736                 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
16737                 // debug statements here
16738         }
16739         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
16740         export function NodeInfo_get_announcement_info(this_ptr: number): number {
16741                 if(!isWasmInitialized) {
16742                         throw new Error("initializeWasm() must be awaited first!");
16743                 }
16744                 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
16745                 return nativeResponseValue;
16746         }
16747         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
16748         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
16749                 if(!isWasmInitialized) {
16750                         throw new Error("initializeWasm() must be awaited first!");
16751                 }
16752                 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
16753                 // debug statements here
16754         }
16755         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
16756         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
16757                 if(!isWasmInitialized) {
16758                         throw new Error("initializeWasm() must be awaited first!");
16759                 }
16760                 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
16761                 return nativeResponseValue;
16762         }
16763         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
16764         export function NodeInfo_clone(orig: number): number {
16765                 if(!isWasmInitialized) {
16766                         throw new Error("initializeWasm() must be awaited first!");
16767                 }
16768                 const nativeResponseValue = wasm.NodeInfo_clone(orig);
16769                 return nativeResponseValue;
16770         }
16771         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
16772         export function NodeInfo_write(obj: number): Uint8Array {
16773                 if(!isWasmInitialized) {
16774                         throw new Error("initializeWasm() must be awaited first!");
16775                 }
16776                 const nativeResponseValue = wasm.NodeInfo_write(obj);
16777                 return decodeArray(nativeResponseValue);
16778         }
16779         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
16780         export function NodeInfo_read(ser: Uint8Array): number {
16781                 if(!isWasmInitialized) {
16782                         throw new Error("initializeWasm() must be awaited first!");
16783                 }
16784                 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
16785                 return nativeResponseValue;
16786         }
16787         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
16788         export function NetworkGraph_write(obj: number): Uint8Array {
16789                 if(!isWasmInitialized) {
16790                         throw new Error("initializeWasm() must be awaited first!");
16791                 }
16792                 const nativeResponseValue = wasm.NetworkGraph_write(obj);
16793                 return decodeArray(nativeResponseValue);
16794         }
16795         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
16796         export function NetworkGraph_read(ser: Uint8Array): number {
16797                 if(!isWasmInitialized) {
16798                         throw new Error("initializeWasm() must be awaited first!");
16799                 }
16800                 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
16801                 return nativeResponseValue;
16802         }
16803         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
16804         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
16805                 if(!isWasmInitialized) {
16806                         throw new Error("initializeWasm() must be awaited first!");
16807                 }
16808                 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
16809                 return nativeResponseValue;
16810         }
16811         // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
16812         export function NetworkGraph_read_only(this_arg: number): number {
16813                 if(!isWasmInitialized) {
16814                         throw new Error("initializeWasm() must be awaited first!");
16815                 }
16816                 const nativeResponseValue = wasm.NetworkGraph_read_only(this_arg);
16817                 return nativeResponseValue;
16818         }
16819         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
16820         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
16821                 if(!isWasmInitialized) {
16822                         throw new Error("initializeWasm() must be awaited first!");
16823                 }
16824                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
16825                 return nativeResponseValue;
16826         }
16827         // 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);
16828         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
16829                 if(!isWasmInitialized) {
16830                         throw new Error("initializeWasm() must be awaited first!");
16831                 }
16832                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
16833                 return nativeResponseValue;
16834         }
16835         // 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);
16836         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
16837                 if(!isWasmInitialized) {
16838                         throw new Error("initializeWasm() must be awaited first!");
16839                 }
16840                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
16841                 return nativeResponseValue;
16842         }
16843         // 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);
16844         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
16845                 if(!isWasmInitialized) {
16846                         throw new Error("initializeWasm() must be awaited first!");
16847                 }
16848                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
16849                 return nativeResponseValue;
16850         }
16851         // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
16852         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
16853                 if(!isWasmInitialized) {
16854                         throw new Error("initializeWasm() must be awaited first!");
16855                 }
16856                 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
16857                 // debug statements here
16858         }
16859         // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
16860         export function NetworkGraph_fail_node(this_arg: number, _node_id: Uint8Array, is_permanent: boolean): void {
16861                 if(!isWasmInitialized) {
16862                         throw new Error("initializeWasm() must be awaited first!");
16863                 }
16864                 const nativeResponseValue = wasm.NetworkGraph_fail_node(this_arg, encodeArray(_node_id), is_permanent);
16865                 // debug statements here
16866         }
16867         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
16868         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
16869                 if(!isWasmInitialized) {
16870                         throw new Error("initializeWasm() must be awaited first!");
16871                 }
16872                 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
16873                 return nativeResponseValue;
16874         }
16875         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
16876         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
16877                 if(!isWasmInitialized) {
16878                         throw new Error("initializeWasm() must be awaited first!");
16879                 }
16880                 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
16881                 return nativeResponseValue;
16882         }
16883         // MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
16884         export function ReadOnlyNetworkGraph_get_addresses(this_arg: number, pubkey: Uint8Array): number {
16885                 if(!isWasmInitialized) {
16886                         throw new Error("initializeWasm() must be awaited first!");
16887                 }
16888                 const nativeResponseValue = wasm.ReadOnlyNetworkGraph_get_addresses(this_arg, encodeArray(pubkey));
16889                 return nativeResponseValue;
16890         }
16891         // void RouteHop_free(struct LDKRouteHop this_obj);
16892         export function RouteHop_free(this_obj: number): void {
16893                 if(!isWasmInitialized) {
16894                         throw new Error("initializeWasm() must be awaited first!");
16895                 }
16896                 const nativeResponseValue = wasm.RouteHop_free(this_obj);
16897                 // debug statements here
16898         }
16899         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16900         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
16901                 if(!isWasmInitialized) {
16902                         throw new Error("initializeWasm() must be awaited first!");
16903                 }
16904                 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
16905                 return decodeArray(nativeResponseValue);
16906         }
16907         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16908         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
16909                 if(!isWasmInitialized) {
16910                         throw new Error("initializeWasm() must be awaited first!");
16911                 }
16912                 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
16913                 // debug statements here
16914         }
16915         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16916         export function RouteHop_get_node_features(this_ptr: number): number {
16917                 if(!isWasmInitialized) {
16918                         throw new Error("initializeWasm() must be awaited first!");
16919                 }
16920                 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
16921                 return nativeResponseValue;
16922         }
16923         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
16924         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
16925                 if(!isWasmInitialized) {
16926                         throw new Error("initializeWasm() must be awaited first!");
16927                 }
16928                 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
16929                 // debug statements here
16930         }
16931         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16932         export function RouteHop_get_short_channel_id(this_ptr: number): number {
16933                 if(!isWasmInitialized) {
16934                         throw new Error("initializeWasm() must be awaited first!");
16935                 }
16936                 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
16937                 return nativeResponseValue;
16938         }
16939         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
16940         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
16941                 if(!isWasmInitialized) {
16942                         throw new Error("initializeWasm() must be awaited first!");
16943                 }
16944                 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
16945                 // debug statements here
16946         }
16947         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16948         export function RouteHop_get_channel_features(this_ptr: number): number {
16949                 if(!isWasmInitialized) {
16950                         throw new Error("initializeWasm() must be awaited first!");
16951                 }
16952                 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
16953                 return nativeResponseValue;
16954         }
16955         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
16956         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
16957                 if(!isWasmInitialized) {
16958                         throw new Error("initializeWasm() must be awaited first!");
16959                 }
16960                 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
16961                 // debug statements here
16962         }
16963         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16964         export function RouteHop_get_fee_msat(this_ptr: number): number {
16965                 if(!isWasmInitialized) {
16966                         throw new Error("initializeWasm() must be awaited first!");
16967                 }
16968                 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
16969                 return nativeResponseValue;
16970         }
16971         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
16972         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
16973                 if(!isWasmInitialized) {
16974                         throw new Error("initializeWasm() must be awaited first!");
16975                 }
16976                 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
16977                 // debug statements here
16978         }
16979         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16980         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
16981                 if(!isWasmInitialized) {
16982                         throw new Error("initializeWasm() must be awaited first!");
16983                 }
16984                 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
16985                 return nativeResponseValue;
16986         }
16987         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
16988         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
16989                 if(!isWasmInitialized) {
16990                         throw new Error("initializeWasm() must be awaited first!");
16991                 }
16992                 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
16993                 // debug statements here
16994         }
16995         // 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);
16996         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 {
16997                 if(!isWasmInitialized) {
16998                         throw new Error("initializeWasm() must be awaited first!");
16999                 }
17000                 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);
17001                 return nativeResponseValue;
17002         }
17003         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
17004         export function RouteHop_clone(orig: number): number {
17005                 if(!isWasmInitialized) {
17006                         throw new Error("initializeWasm() must be awaited first!");
17007                 }
17008                 const nativeResponseValue = wasm.RouteHop_clone(orig);
17009                 return nativeResponseValue;
17010         }
17011         // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
17012         export function RouteHop_hash(o: number): number {
17013                 if(!isWasmInitialized) {
17014                         throw new Error("initializeWasm() must be awaited first!");
17015                 }
17016                 const nativeResponseValue = wasm.RouteHop_hash(o);
17017                 return nativeResponseValue;
17018         }
17019         // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
17020         export function RouteHop_eq(a: number, b: number): boolean {
17021                 if(!isWasmInitialized) {
17022                         throw new Error("initializeWasm() must be awaited first!");
17023                 }
17024                 const nativeResponseValue = wasm.RouteHop_eq(a, b);
17025                 return nativeResponseValue;
17026         }
17027         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
17028         export function RouteHop_write(obj: number): Uint8Array {
17029                 if(!isWasmInitialized) {
17030                         throw new Error("initializeWasm() must be awaited first!");
17031                 }
17032                 const nativeResponseValue = wasm.RouteHop_write(obj);
17033                 return decodeArray(nativeResponseValue);
17034         }
17035         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
17036         export function RouteHop_read(ser: Uint8Array): number {
17037                 if(!isWasmInitialized) {
17038                         throw new Error("initializeWasm() must be awaited first!");
17039                 }
17040                 const nativeResponseValue = wasm.RouteHop_read(encodeArray(ser));
17041                 return nativeResponseValue;
17042         }
17043         // void Route_free(struct LDKRoute this_obj);
17044         export function Route_free(this_obj: number): void {
17045                 if(!isWasmInitialized) {
17046                         throw new Error("initializeWasm() must be awaited first!");
17047                 }
17048                 const nativeResponseValue = wasm.Route_free(this_obj);
17049                 // debug statements here
17050         }
17051         // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
17052         export function Route_get_paths(this_ptr: number): number[][] {
17053                 if(!isWasmInitialized) {
17054                         throw new Error("initializeWasm() must be awaited first!");
17055                 }
17056                 const nativeResponseValue = wasm.Route_get_paths(this_ptr);
17057                 return nativeResponseValue;
17058         }
17059         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
17060         export function Route_set_paths(this_ptr: number, val: number[][]): void {
17061                 if(!isWasmInitialized) {
17062                         throw new Error("initializeWasm() must be awaited first!");
17063                 }
17064                 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
17065                 // debug statements here
17066         }
17067         // struct LDKPayee Route_get_payee(const struct LDKRoute *NONNULL_PTR this_ptr);
17068         export function Route_get_payee(this_ptr: number): number {
17069                 if(!isWasmInitialized) {
17070                         throw new Error("initializeWasm() must be awaited first!");
17071                 }
17072                 const nativeResponseValue = wasm.Route_get_payee(this_ptr);
17073                 return nativeResponseValue;
17074         }
17075         // void Route_set_payee(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKPayee val);
17076         export function Route_set_payee(this_ptr: number, val: number): void {
17077                 if(!isWasmInitialized) {
17078                         throw new Error("initializeWasm() must be awaited first!");
17079                 }
17080                 const nativeResponseValue = wasm.Route_set_payee(this_ptr, val);
17081                 // debug statements here
17082         }
17083         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg, struct LDKPayee payee_arg);
17084         export function Route_new(paths_arg: number[][], payee_arg: number): number {
17085                 if(!isWasmInitialized) {
17086                         throw new Error("initializeWasm() must be awaited first!");
17087                 }
17088                 const nativeResponseValue = wasm.Route_new(paths_arg, payee_arg);
17089                 return nativeResponseValue;
17090         }
17091         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
17092         export function Route_clone(orig: number): number {
17093                 if(!isWasmInitialized) {
17094                         throw new Error("initializeWasm() must be awaited first!");
17095                 }
17096                 const nativeResponseValue = wasm.Route_clone(orig);
17097                 return nativeResponseValue;
17098         }
17099         // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
17100         export function Route_hash(o: number): number {
17101                 if(!isWasmInitialized) {
17102                         throw new Error("initializeWasm() must be awaited first!");
17103                 }
17104                 const nativeResponseValue = wasm.Route_hash(o);
17105                 return nativeResponseValue;
17106         }
17107         // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
17108         export function Route_eq(a: number, b: number): boolean {
17109                 if(!isWasmInitialized) {
17110                         throw new Error("initializeWasm() must be awaited first!");
17111                 }
17112                 const nativeResponseValue = wasm.Route_eq(a, b);
17113                 return nativeResponseValue;
17114         }
17115         // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
17116         export function Route_get_total_fees(this_arg: number): number {
17117                 if(!isWasmInitialized) {
17118                         throw new Error("initializeWasm() must be awaited first!");
17119                 }
17120                 const nativeResponseValue = wasm.Route_get_total_fees(this_arg);
17121                 return nativeResponseValue;
17122         }
17123         // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
17124         export function Route_get_total_amount(this_arg: number): number {
17125                 if(!isWasmInitialized) {
17126                         throw new Error("initializeWasm() must be awaited first!");
17127                 }
17128                 const nativeResponseValue = wasm.Route_get_total_amount(this_arg);
17129                 return nativeResponseValue;
17130         }
17131         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
17132         export function Route_write(obj: number): Uint8Array {
17133                 if(!isWasmInitialized) {
17134                         throw new Error("initializeWasm() must be awaited first!");
17135                 }
17136                 const nativeResponseValue = wasm.Route_write(obj);
17137                 return decodeArray(nativeResponseValue);
17138         }
17139         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
17140         export function Route_read(ser: Uint8Array): number {
17141                 if(!isWasmInitialized) {
17142                         throw new Error("initializeWasm() must be awaited first!");
17143                 }
17144                 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
17145                 return nativeResponseValue;
17146         }
17147         // void RouteParameters_free(struct LDKRouteParameters this_obj);
17148         export function RouteParameters_free(this_obj: number): void {
17149                 if(!isWasmInitialized) {
17150                         throw new Error("initializeWasm() must be awaited first!");
17151                 }
17152                 const nativeResponseValue = wasm.RouteParameters_free(this_obj);
17153                 // debug statements here
17154         }
17155         // struct LDKPayee RouteParameters_get_payee(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
17156         export function RouteParameters_get_payee(this_ptr: number): number {
17157                 if(!isWasmInitialized) {
17158                         throw new Error("initializeWasm() must be awaited first!");
17159                 }
17160                 const nativeResponseValue = wasm.RouteParameters_get_payee(this_ptr);
17161                 return nativeResponseValue;
17162         }
17163         // void RouteParameters_set_payee(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
17164         export function RouteParameters_set_payee(this_ptr: number, val: number): void {
17165                 if(!isWasmInitialized) {
17166                         throw new Error("initializeWasm() must be awaited first!");
17167                 }
17168                 const nativeResponseValue = wasm.RouteParameters_set_payee(this_ptr, val);
17169                 // debug statements here
17170         }
17171         // uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
17172         export function RouteParameters_get_final_value_msat(this_ptr: number): number {
17173                 if(!isWasmInitialized) {
17174                         throw new Error("initializeWasm() must be awaited first!");
17175                 }
17176                 const nativeResponseValue = wasm.RouteParameters_get_final_value_msat(this_ptr);
17177                 return nativeResponseValue;
17178         }
17179         // void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
17180         export function RouteParameters_set_final_value_msat(this_ptr: number, val: number): void {
17181                 if(!isWasmInitialized) {
17182                         throw new Error("initializeWasm() must be awaited first!");
17183                 }
17184                 const nativeResponseValue = wasm.RouteParameters_set_final_value_msat(this_ptr, val);
17185                 // debug statements here
17186         }
17187         // uint32_t RouteParameters_get_final_cltv_expiry_delta(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
17188         export function RouteParameters_get_final_cltv_expiry_delta(this_ptr: number): number {
17189                 if(!isWasmInitialized) {
17190                         throw new Error("initializeWasm() must be awaited first!");
17191                 }
17192                 const nativeResponseValue = wasm.RouteParameters_get_final_cltv_expiry_delta(this_ptr);
17193                 return nativeResponseValue;
17194         }
17195         // void RouteParameters_set_final_cltv_expiry_delta(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint32_t val);
17196         export function RouteParameters_set_final_cltv_expiry_delta(this_ptr: number, val: number): void {
17197                 if(!isWasmInitialized) {
17198                         throw new Error("initializeWasm() must be awaited first!");
17199                 }
17200                 const nativeResponseValue = wasm.RouteParameters_set_final_cltv_expiry_delta(this_ptr, val);
17201                 // debug statements here
17202         }
17203         // MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPayee payee_arg, uint64_t final_value_msat_arg, uint32_t final_cltv_expiry_delta_arg);
17204         export function RouteParameters_new(payee_arg: number, final_value_msat_arg: number, final_cltv_expiry_delta_arg: number): number {
17205                 if(!isWasmInitialized) {
17206                         throw new Error("initializeWasm() must be awaited first!");
17207                 }
17208                 const nativeResponseValue = wasm.RouteParameters_new(payee_arg, final_value_msat_arg, final_cltv_expiry_delta_arg);
17209                 return nativeResponseValue;
17210         }
17211         // struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
17212         export function RouteParameters_clone(orig: number): number {
17213                 if(!isWasmInitialized) {
17214                         throw new Error("initializeWasm() must be awaited first!");
17215                 }
17216                 const nativeResponseValue = wasm.RouteParameters_clone(orig);
17217                 return nativeResponseValue;
17218         }
17219         // struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
17220         export function RouteParameters_write(obj: number): Uint8Array {
17221                 if(!isWasmInitialized) {
17222                         throw new Error("initializeWasm() must be awaited first!");
17223                 }
17224                 const nativeResponseValue = wasm.RouteParameters_write(obj);
17225                 return decodeArray(nativeResponseValue);
17226         }
17227         // struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
17228         export function RouteParameters_read(ser: Uint8Array): number {
17229                 if(!isWasmInitialized) {
17230                         throw new Error("initializeWasm() must be awaited first!");
17231                 }
17232                 const nativeResponseValue = wasm.RouteParameters_read(encodeArray(ser));
17233                 return nativeResponseValue;
17234         }
17235         // void Payee_free(struct LDKPayee this_obj);
17236         export function Payee_free(this_obj: number): void {
17237                 if(!isWasmInitialized) {
17238                         throw new Error("initializeWasm() must be awaited first!");
17239                 }
17240                 const nativeResponseValue = wasm.Payee_free(this_obj);
17241                 // debug statements here
17242         }
17243         // struct LDKPublicKey Payee_get_pubkey(const struct LDKPayee *NONNULL_PTR this_ptr);
17244         export function Payee_get_pubkey(this_ptr: number): Uint8Array {
17245                 if(!isWasmInitialized) {
17246                         throw new Error("initializeWasm() must be awaited first!");
17247                 }
17248                 const nativeResponseValue = wasm.Payee_get_pubkey(this_ptr);
17249                 return decodeArray(nativeResponseValue);
17250         }
17251         // void Payee_set_pubkey(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17252         export function Payee_set_pubkey(this_ptr: number, val: Uint8Array): void {
17253                 if(!isWasmInitialized) {
17254                         throw new Error("initializeWasm() must be awaited first!");
17255                 }
17256                 const nativeResponseValue = wasm.Payee_set_pubkey(this_ptr, encodeArray(val));
17257                 // debug statements here
17258         }
17259         // struct LDKInvoiceFeatures Payee_get_features(const struct LDKPayee *NONNULL_PTR this_ptr);
17260         export function Payee_get_features(this_ptr: number): number {
17261                 if(!isWasmInitialized) {
17262                         throw new Error("initializeWasm() must be awaited first!");
17263                 }
17264                 const nativeResponseValue = wasm.Payee_get_features(this_ptr);
17265                 return nativeResponseValue;
17266         }
17267         // void Payee_set_features(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKInvoiceFeatures val);
17268         export function Payee_set_features(this_ptr: number, val: number): void {
17269                 if(!isWasmInitialized) {
17270                         throw new Error("initializeWasm() must be awaited first!");
17271                 }
17272                 const nativeResponseValue = wasm.Payee_set_features(this_ptr, val);
17273                 // debug statements here
17274         }
17275         // struct LDKCVec_RouteHintZ Payee_get_route_hints(const struct LDKPayee *NONNULL_PTR this_ptr);
17276         export function Payee_get_route_hints(this_ptr: number): number[] {
17277                 if(!isWasmInitialized) {
17278                         throw new Error("initializeWasm() must be awaited first!");
17279                 }
17280                 const nativeResponseValue = wasm.Payee_get_route_hints(this_ptr);
17281                 return nativeResponseValue;
17282         }
17283         // void Payee_set_route_hints(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintZ val);
17284         export function Payee_set_route_hints(this_ptr: number, val: number[]): void {
17285                 if(!isWasmInitialized) {
17286                         throw new Error("initializeWasm() must be awaited first!");
17287                 }
17288                 const nativeResponseValue = wasm.Payee_set_route_hints(this_ptr, val);
17289                 // debug statements here
17290         }
17291         // struct LDKCOption_u64Z Payee_get_expiry_time(const struct LDKPayee *NONNULL_PTR this_ptr);
17292         export function Payee_get_expiry_time(this_ptr: number): number {
17293                 if(!isWasmInitialized) {
17294                         throw new Error("initializeWasm() must be awaited first!");
17295                 }
17296                 const nativeResponseValue = wasm.Payee_get_expiry_time(this_ptr);
17297                 return nativeResponseValue;
17298         }
17299         // void Payee_set_expiry_time(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
17300         export function Payee_set_expiry_time(this_ptr: number, val: number): void {
17301                 if(!isWasmInitialized) {
17302                         throw new Error("initializeWasm() must be awaited first!");
17303                 }
17304                 const nativeResponseValue = wasm.Payee_set_expiry_time(this_ptr, val);
17305                 // debug statements here
17306         }
17307         // MUST_USE_RES struct LDKPayee Payee_new(struct LDKPublicKey pubkey_arg, struct LDKInvoiceFeatures features_arg, struct LDKCVec_RouteHintZ route_hints_arg, struct LDKCOption_u64Z expiry_time_arg);
17308         export function Payee_new(pubkey_arg: Uint8Array, features_arg: number, route_hints_arg: number[], expiry_time_arg: number): number {
17309                 if(!isWasmInitialized) {
17310                         throw new Error("initializeWasm() must be awaited first!");
17311                 }
17312                 const nativeResponseValue = wasm.Payee_new(encodeArray(pubkey_arg), features_arg, route_hints_arg, expiry_time_arg);
17313                 return nativeResponseValue;
17314         }
17315         // struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
17316         export function Payee_clone(orig: number): number {
17317                 if(!isWasmInitialized) {
17318                         throw new Error("initializeWasm() must be awaited first!");
17319                 }
17320                 const nativeResponseValue = wasm.Payee_clone(orig);
17321                 return nativeResponseValue;
17322         }
17323         // uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
17324         export function Payee_hash(o: number): number {
17325                 if(!isWasmInitialized) {
17326                         throw new Error("initializeWasm() must be awaited first!");
17327                 }
17328                 const nativeResponseValue = wasm.Payee_hash(o);
17329                 return nativeResponseValue;
17330         }
17331         // bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
17332         export function Payee_eq(a: number, b: number): boolean {
17333                 if(!isWasmInitialized) {
17334                         throw new Error("initializeWasm() must be awaited first!");
17335                 }
17336                 const nativeResponseValue = wasm.Payee_eq(a, b);
17337                 return nativeResponseValue;
17338         }
17339         // struct LDKCVec_u8Z Payee_write(const struct LDKPayee *NONNULL_PTR obj);
17340         export function Payee_write(obj: number): Uint8Array {
17341                 if(!isWasmInitialized) {
17342                         throw new Error("initializeWasm() must be awaited first!");
17343                 }
17344                 const nativeResponseValue = wasm.Payee_write(obj);
17345                 return decodeArray(nativeResponseValue);
17346         }
17347         // struct LDKCResult_PayeeDecodeErrorZ Payee_read(struct LDKu8slice ser);
17348         export function Payee_read(ser: Uint8Array): number {
17349                 if(!isWasmInitialized) {
17350                         throw new Error("initializeWasm() must be awaited first!");
17351                 }
17352                 const nativeResponseValue = wasm.Payee_read(encodeArray(ser));
17353                 return nativeResponseValue;
17354         }
17355         // MUST_USE_RES struct LDKPayee Payee_from_node_id(struct LDKPublicKey pubkey);
17356         export function Payee_from_node_id(pubkey: Uint8Array): number {
17357                 if(!isWasmInitialized) {
17358                         throw new Error("initializeWasm() must be awaited first!");
17359                 }
17360                 const nativeResponseValue = wasm.Payee_from_node_id(encodeArray(pubkey));
17361                 return nativeResponseValue;
17362         }
17363         // MUST_USE_RES struct LDKPayee Payee_for_keysend(struct LDKPublicKey pubkey);
17364         export function Payee_for_keysend(pubkey: Uint8Array): number {
17365                 if(!isWasmInitialized) {
17366                         throw new Error("initializeWasm() must be awaited first!");
17367                 }
17368                 const nativeResponseValue = wasm.Payee_for_keysend(encodeArray(pubkey));
17369                 return nativeResponseValue;
17370         }
17371         // void RouteHint_free(struct LDKRouteHint this_obj);
17372         export function RouteHint_free(this_obj: number): void {
17373                 if(!isWasmInitialized) {
17374                         throw new Error("initializeWasm() must be awaited first!");
17375                 }
17376                 const nativeResponseValue = wasm.RouteHint_free(this_obj);
17377                 // debug statements here
17378         }
17379         // struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
17380         export function RouteHint_get_a(this_ptr: number): number[] {
17381                 if(!isWasmInitialized) {
17382                         throw new Error("initializeWasm() must be awaited first!");
17383                 }
17384                 const nativeResponseValue = wasm.RouteHint_get_a(this_ptr);
17385                 return nativeResponseValue;
17386         }
17387         // void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
17388         export function RouteHint_set_a(this_ptr: number, val: number[]): void {
17389                 if(!isWasmInitialized) {
17390                         throw new Error("initializeWasm() must be awaited first!");
17391                 }
17392                 const nativeResponseValue = wasm.RouteHint_set_a(this_ptr, val);
17393                 // debug statements here
17394         }
17395         // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
17396         export function RouteHint_new(a_arg: number[]): number {
17397                 if(!isWasmInitialized) {
17398                         throw new Error("initializeWasm() must be awaited first!");
17399                 }
17400                 const nativeResponseValue = wasm.RouteHint_new(a_arg);
17401                 return nativeResponseValue;
17402         }
17403         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
17404         export function RouteHint_clone(orig: number): number {
17405                 if(!isWasmInitialized) {
17406                         throw new Error("initializeWasm() must be awaited first!");
17407                 }
17408                 const nativeResponseValue = wasm.RouteHint_clone(orig);
17409                 return nativeResponseValue;
17410         }
17411         // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
17412         export function RouteHint_hash(o: number): number {
17413                 if(!isWasmInitialized) {
17414                         throw new Error("initializeWasm() must be awaited first!");
17415                 }
17416                 const nativeResponseValue = wasm.RouteHint_hash(o);
17417                 return nativeResponseValue;
17418         }
17419         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
17420         export function RouteHint_eq(a: number, b: number): boolean {
17421                 if(!isWasmInitialized) {
17422                         throw new Error("initializeWasm() must be awaited first!");
17423                 }
17424                 const nativeResponseValue = wasm.RouteHint_eq(a, b);
17425                 return nativeResponseValue;
17426         }
17427         // struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
17428         export function RouteHint_write(obj: number): Uint8Array {
17429                 if(!isWasmInitialized) {
17430                         throw new Error("initializeWasm() must be awaited first!");
17431                 }
17432                 const nativeResponseValue = wasm.RouteHint_write(obj);
17433                 return decodeArray(nativeResponseValue);
17434         }
17435         // struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
17436         export function RouteHint_read(ser: Uint8Array): number {
17437                 if(!isWasmInitialized) {
17438                         throw new Error("initializeWasm() must be awaited first!");
17439                 }
17440                 const nativeResponseValue = wasm.RouteHint_read(encodeArray(ser));
17441                 return nativeResponseValue;
17442         }
17443         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
17444         export function RouteHintHop_free(this_obj: number): void {
17445                 if(!isWasmInitialized) {
17446                         throw new Error("initializeWasm() must be awaited first!");
17447                 }
17448                 const nativeResponseValue = wasm.RouteHintHop_free(this_obj);
17449                 // debug statements here
17450         }
17451         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
17452         export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
17453                 if(!isWasmInitialized) {
17454                         throw new Error("initializeWasm() must be awaited first!");
17455                 }
17456                 const nativeResponseValue = wasm.RouteHintHop_get_src_node_id(this_ptr);
17457                 return decodeArray(nativeResponseValue);
17458         }
17459         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17460         export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
17461                 if(!isWasmInitialized) {
17462                         throw new Error("initializeWasm() must be awaited first!");
17463                 }
17464                 const nativeResponseValue = wasm.RouteHintHop_set_src_node_id(this_ptr, encodeArray(val));
17465                 // debug statements here
17466         }
17467         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
17468         export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
17469                 if(!isWasmInitialized) {
17470                         throw new Error("initializeWasm() must be awaited first!");
17471                 }
17472                 const nativeResponseValue = wasm.RouteHintHop_get_short_channel_id(this_ptr);
17473                 return nativeResponseValue;
17474         }
17475         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
17476         export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
17477                 if(!isWasmInitialized) {
17478                         throw new Error("initializeWasm() must be awaited first!");
17479                 }
17480                 const nativeResponseValue = wasm.RouteHintHop_set_short_channel_id(this_ptr, val);
17481                 // debug statements here
17482         }
17483         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
17484         export function RouteHintHop_get_fees(this_ptr: number): number {
17485                 if(!isWasmInitialized) {
17486                         throw new Error("initializeWasm() must be awaited first!");
17487                 }
17488                 const nativeResponseValue = wasm.RouteHintHop_get_fees(this_ptr);
17489                 return nativeResponseValue;
17490         }
17491         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
17492         export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
17493                 if(!isWasmInitialized) {
17494                         throw new Error("initializeWasm() must be awaited first!");
17495                 }
17496                 const nativeResponseValue = wasm.RouteHintHop_set_fees(this_ptr, val);
17497                 // debug statements here
17498         }
17499         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
17500         export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
17501                 if(!isWasmInitialized) {
17502                         throw new Error("initializeWasm() must be awaited first!");
17503                 }
17504                 const nativeResponseValue = wasm.RouteHintHop_get_cltv_expiry_delta(this_ptr);
17505                 return nativeResponseValue;
17506         }
17507         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
17508         export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
17509                 if(!isWasmInitialized) {
17510                         throw new Error("initializeWasm() must be awaited first!");
17511                 }
17512                 const nativeResponseValue = wasm.RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
17513                 // debug statements here
17514         }
17515         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
17516         export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
17517                 if(!isWasmInitialized) {
17518                         throw new Error("initializeWasm() must be awaited first!");
17519                 }
17520                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_minimum_msat(this_ptr);
17521                 return nativeResponseValue;
17522         }
17523         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
17524         export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
17525                 if(!isWasmInitialized) {
17526                         throw new Error("initializeWasm() must be awaited first!");
17527                 }
17528                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
17529                 // debug statements here
17530         }
17531         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
17532         export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
17533                 if(!isWasmInitialized) {
17534                         throw new Error("initializeWasm() must be awaited first!");
17535                 }
17536                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_maximum_msat(this_ptr);
17537                 return nativeResponseValue;
17538         }
17539         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
17540         export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
17541                 if(!isWasmInitialized) {
17542                         throw new Error("initializeWasm() must be awaited first!");
17543                 }
17544                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
17545                 // debug statements here
17546         }
17547         // 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);
17548         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 {
17549                 if(!isWasmInitialized) {
17550                         throw new Error("initializeWasm() must be awaited first!");
17551                 }
17552                 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);
17553                 return nativeResponseValue;
17554         }
17555         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
17556         export function RouteHintHop_clone(orig: number): number {
17557                 if(!isWasmInitialized) {
17558                         throw new Error("initializeWasm() must be awaited first!");
17559                 }
17560                 const nativeResponseValue = wasm.RouteHintHop_clone(orig);
17561                 return nativeResponseValue;
17562         }
17563         // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
17564         export function RouteHintHop_hash(o: number): number {
17565                 if(!isWasmInitialized) {
17566                         throw new Error("initializeWasm() must be awaited first!");
17567                 }
17568                 const nativeResponseValue = wasm.RouteHintHop_hash(o);
17569                 return nativeResponseValue;
17570         }
17571         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
17572         export function RouteHintHop_eq(a: number, b: number): boolean {
17573                 if(!isWasmInitialized) {
17574                         throw new Error("initializeWasm() must be awaited first!");
17575                 }
17576                 const nativeResponseValue = wasm.RouteHintHop_eq(a, b);
17577                 return nativeResponseValue;
17578         }
17579         // struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
17580         export function RouteHintHop_write(obj: number): Uint8Array {
17581                 if(!isWasmInitialized) {
17582                         throw new Error("initializeWasm() must be awaited first!");
17583                 }
17584                 const nativeResponseValue = wasm.RouteHintHop_write(obj);
17585                 return decodeArray(nativeResponseValue);
17586         }
17587         // struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
17588         export function RouteHintHop_read(ser: Uint8Array): number {
17589                 if(!isWasmInitialized) {
17590                         throw new Error("initializeWasm() must be awaited first!");
17591                 }
17592                 const nativeResponseValue = wasm.RouteHintHop_read(encodeArray(ser));
17593                 return nativeResponseValue;
17594         }
17595         // struct LDKCResult_RouteLightningErrorZ find_route(struct LDKPublicKey our_node_pubkey, const struct LDKRouteParameters *NONNULL_PTR params, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKLogger logger, const struct LDKScore *NONNULL_PTR scorer);
17596         export function find_route(our_node_pubkey: Uint8Array, params: number, network: number, first_hops: number[], logger: number, scorer: number): number {
17597                 if(!isWasmInitialized) {
17598                         throw new Error("initializeWasm() must be awaited first!");
17599                 }
17600                 const nativeResponseValue = wasm.find_route(encodeArray(our_node_pubkey), params, network, first_hops, logger, scorer);
17601                 return nativeResponseValue;
17602         }
17603         // void Scorer_free(struct LDKScorer this_obj);
17604         export function Scorer_free(this_obj: number): void {
17605                 if(!isWasmInitialized) {
17606                         throw new Error("initializeWasm() must be awaited first!");
17607                 }
17608                 const nativeResponseValue = wasm.Scorer_free(this_obj);
17609                 // debug statements here
17610         }
17611         // void ScoringParameters_free(struct LDKScoringParameters this_obj);
17612         export function ScoringParameters_free(this_obj: number): void {
17613                 if(!isWasmInitialized) {
17614                         throw new Error("initializeWasm() must be awaited first!");
17615                 }
17616                 const nativeResponseValue = wasm.ScoringParameters_free(this_obj);
17617                 // debug statements here
17618         }
17619         // uint64_t ScoringParameters_get_base_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
17620         export function ScoringParameters_get_base_penalty_msat(this_ptr: number): number {
17621                 if(!isWasmInitialized) {
17622                         throw new Error("initializeWasm() must be awaited first!");
17623                 }
17624                 const nativeResponseValue = wasm.ScoringParameters_get_base_penalty_msat(this_ptr);
17625                 return nativeResponseValue;
17626         }
17627         // void ScoringParameters_set_base_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
17628         export function ScoringParameters_set_base_penalty_msat(this_ptr: number, val: number): void {
17629                 if(!isWasmInitialized) {
17630                         throw new Error("initializeWasm() must be awaited first!");
17631                 }
17632                 const nativeResponseValue = wasm.ScoringParameters_set_base_penalty_msat(this_ptr, val);
17633                 // debug statements here
17634         }
17635         // uint64_t ScoringParameters_get_failure_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
17636         export function ScoringParameters_get_failure_penalty_msat(this_ptr: number): number {
17637                 if(!isWasmInitialized) {
17638                         throw new Error("initializeWasm() must be awaited first!");
17639                 }
17640                 const nativeResponseValue = wasm.ScoringParameters_get_failure_penalty_msat(this_ptr);
17641                 return nativeResponseValue;
17642         }
17643         // void ScoringParameters_set_failure_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
17644         export function ScoringParameters_set_failure_penalty_msat(this_ptr: number, val: number): void {
17645                 if(!isWasmInitialized) {
17646                         throw new Error("initializeWasm() must be awaited first!");
17647                 }
17648                 const nativeResponseValue = wasm.ScoringParameters_set_failure_penalty_msat(this_ptr, val);
17649                 // debug statements here
17650         }
17651         // uint64_t ScoringParameters_get_failure_penalty_half_life(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
17652         export function ScoringParameters_get_failure_penalty_half_life(this_ptr: number): number {
17653                 if(!isWasmInitialized) {
17654                         throw new Error("initializeWasm() must be awaited first!");
17655                 }
17656                 const nativeResponseValue = wasm.ScoringParameters_get_failure_penalty_half_life(this_ptr);
17657                 return nativeResponseValue;
17658         }
17659         // void ScoringParameters_set_failure_penalty_half_life(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
17660         export function ScoringParameters_set_failure_penalty_half_life(this_ptr: number, val: number): void {
17661                 if(!isWasmInitialized) {
17662                         throw new Error("initializeWasm() must be awaited first!");
17663                 }
17664                 const nativeResponseValue = wasm.ScoringParameters_set_failure_penalty_half_life(this_ptr, val);
17665                 // debug statements here
17666         }
17667         // MUST_USE_RES struct LDKScoringParameters ScoringParameters_new(uint64_t base_penalty_msat_arg, uint64_t failure_penalty_msat_arg, uint64_t failure_penalty_half_life_arg);
17668         export function ScoringParameters_new(base_penalty_msat_arg: number, failure_penalty_msat_arg: number, failure_penalty_half_life_arg: number): number {
17669                 if(!isWasmInitialized) {
17670                         throw new Error("initializeWasm() must be awaited first!");
17671                 }
17672                 const nativeResponseValue = wasm.ScoringParameters_new(base_penalty_msat_arg, failure_penalty_msat_arg, failure_penalty_half_life_arg);
17673                 return nativeResponseValue;
17674         }
17675         // struct LDKCVec_u8Z ScoringParameters_write(const struct LDKScoringParameters *NONNULL_PTR obj);
17676         export function ScoringParameters_write(obj: number): Uint8Array {
17677                 if(!isWasmInitialized) {
17678                         throw new Error("initializeWasm() must be awaited first!");
17679                 }
17680                 const nativeResponseValue = wasm.ScoringParameters_write(obj);
17681                 return decodeArray(nativeResponseValue);
17682         }
17683         // struct LDKCResult_ScoringParametersDecodeErrorZ ScoringParameters_read(struct LDKu8slice ser);
17684         export function ScoringParameters_read(ser: Uint8Array): number {
17685                 if(!isWasmInitialized) {
17686                         throw new Error("initializeWasm() must be awaited first!");
17687                 }
17688                 const nativeResponseValue = wasm.ScoringParameters_read(encodeArray(ser));
17689                 return nativeResponseValue;
17690         }
17691         // MUST_USE_RES struct LDKScorer Scorer_new(struct LDKScoringParameters params);
17692         export function Scorer_new(params: number): number {
17693                 if(!isWasmInitialized) {
17694                         throw new Error("initializeWasm() must be awaited first!");
17695                 }
17696                 const nativeResponseValue = wasm.Scorer_new(params);
17697                 return nativeResponseValue;
17698         }
17699         // MUST_USE_RES struct LDKScorer Scorer_default(void);
17700         export function Scorer_default(): number {
17701                 if(!isWasmInitialized) {
17702                         throw new Error("initializeWasm() must be awaited first!");
17703                 }
17704                 const nativeResponseValue = wasm.Scorer_default();
17705                 return nativeResponseValue;
17706         }
17707         // MUST_USE_RES struct LDKScoringParameters ScoringParameters_default(void);
17708         export function ScoringParameters_default(): number {
17709                 if(!isWasmInitialized) {
17710                         throw new Error("initializeWasm() must be awaited first!");
17711                 }
17712                 const nativeResponseValue = wasm.ScoringParameters_default();
17713                 return nativeResponseValue;
17714         }
17715         // struct LDKScore Scorer_as_Score(const struct LDKScorer *NONNULL_PTR this_arg);
17716         export function Scorer_as_Score(this_arg: number): number {
17717                 if(!isWasmInitialized) {
17718                         throw new Error("initializeWasm() must be awaited first!");
17719                 }
17720                 const nativeResponseValue = wasm.Scorer_as_Score(this_arg);
17721                 return nativeResponseValue;
17722         }
17723         // struct LDKCVec_u8Z Scorer_write(const struct LDKScorer *NONNULL_PTR obj);
17724         export function Scorer_write(obj: number): Uint8Array {
17725                 if(!isWasmInitialized) {
17726                         throw new Error("initializeWasm() must be awaited first!");
17727                 }
17728                 const nativeResponseValue = wasm.Scorer_write(obj);
17729                 return decodeArray(nativeResponseValue);
17730         }
17731         // struct LDKCResult_ScorerDecodeErrorZ Scorer_read(struct LDKu8slice ser);
17732         export function Scorer_read(ser: Uint8Array): number {
17733                 if(!isWasmInitialized) {
17734                         throw new Error("initializeWasm() must be awaited first!");
17735                 }
17736                 const nativeResponseValue = wasm.Scorer_read(encodeArray(ser));
17737                 return nativeResponseValue;
17738         }
17739         // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
17740         export function FilesystemPersister_free(this_obj: number): void {
17741                 if(!isWasmInitialized) {
17742                         throw new Error("initializeWasm() must be awaited first!");
17743                 }
17744                 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
17745                 // debug statements here
17746         }
17747         // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
17748         export function FilesystemPersister_new(path_to_channel_data: String): number {
17749                 if(!isWasmInitialized) {
17750                         throw new Error("initializeWasm() must be awaited first!");
17751                 }
17752                 const nativeResponseValue = wasm.FilesystemPersister_new(path_to_channel_data);
17753                 return nativeResponseValue;
17754         }
17755         // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
17756         export function FilesystemPersister_get_data_dir(this_arg: number): String {
17757                 if(!isWasmInitialized) {
17758                         throw new Error("initializeWasm() must be awaited first!");
17759                 }
17760                 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
17761                 return nativeResponseValue;
17762         }
17763         // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
17764         export function FilesystemPersister_persist_manager(data_dir: String, manager: number): number {
17765                 if(!isWasmInitialized) {
17766                         throw new Error("initializeWasm() must be awaited first!");
17767                 }
17768                 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(data_dir, manager);
17769                 return nativeResponseValue;
17770         }
17771         // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
17772         export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
17773                 if(!isWasmInitialized) {
17774                         throw new Error("initializeWasm() must be awaited first!");
17775                 }
17776                 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
17777                 return nativeResponseValue;
17778         }
17779         // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
17780         export function FilesystemPersister_as_Persist(this_arg: number): number {
17781                 if(!isWasmInitialized) {
17782                         throw new Error("initializeWasm() must be awaited first!");
17783                 }
17784                 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
17785                 return nativeResponseValue;
17786         }
17787         // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
17788         export function BackgroundProcessor_free(this_obj: number): void {
17789                 if(!isWasmInitialized) {
17790                         throw new Error("initializeWasm() must be awaited first!");
17791                 }
17792                 const nativeResponseValue = wasm.BackgroundProcessor_free(this_obj);
17793                 // debug statements here
17794         }
17795         // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
17796         export function ChannelManagerPersister_free(this_ptr: number): void {
17797                 if(!isWasmInitialized) {
17798                         throw new Error("initializeWasm() must be awaited first!");
17799                 }
17800                 const nativeResponseValue = wasm.ChannelManagerPersister_free(this_ptr);
17801                 // debug statements here
17802         }
17803         // 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);
17804         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 {
17805                 if(!isWasmInitialized) {
17806                         throw new Error("initializeWasm() must be awaited first!");
17807                 }
17808                 const nativeResponseValue = wasm.BackgroundProcessor_start(persister, event_handler, chain_monitor, channel_manager, net_graph_msg_handler, peer_manager, logger);
17809                 return nativeResponseValue;
17810         }
17811         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_join(struct LDKBackgroundProcessor this_arg);
17812         export function BackgroundProcessor_join(this_arg: number): number {
17813                 if(!isWasmInitialized) {
17814                         throw new Error("initializeWasm() must be awaited first!");
17815                 }
17816                 const nativeResponseValue = wasm.BackgroundProcessor_join(this_arg);
17817                 return nativeResponseValue;
17818         }
17819         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
17820         export function BackgroundProcessor_stop(this_arg: number): number {
17821                 if(!isWasmInitialized) {
17822                         throw new Error("initializeWasm() must be awaited first!");
17823                 }
17824                 const nativeResponseValue = wasm.BackgroundProcessor_stop(this_arg);
17825                 return nativeResponseValue;
17826         }
17827         // void check_platform(void);
17828         export function check_platform(): void {
17829                 if(!isWasmInitialized) {
17830                         throw new Error("initializeWasm() must be awaited first!");
17831                 }
17832                 const nativeResponseValue = wasm.check_platform();
17833                 // debug statements here
17834         }
17835         // void Invoice_free(struct LDKInvoice this_obj);
17836         export function Invoice_free(this_obj: number): void {
17837                 if(!isWasmInitialized) {
17838                         throw new Error("initializeWasm() must be awaited first!");
17839                 }
17840                 const nativeResponseValue = wasm.Invoice_free(this_obj);
17841                 // debug statements here
17842         }
17843         // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
17844         export function Invoice_eq(a: number, b: number): boolean {
17845                 if(!isWasmInitialized) {
17846                         throw new Error("initializeWasm() must be awaited first!");
17847                 }
17848                 const nativeResponseValue = wasm.Invoice_eq(a, b);
17849                 return nativeResponseValue;
17850         }
17851         // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
17852         export function Invoice_clone(orig: number): number {
17853                 if(!isWasmInitialized) {
17854                         throw new Error("initializeWasm() must be awaited first!");
17855                 }
17856                 const nativeResponseValue = wasm.Invoice_clone(orig);
17857                 return nativeResponseValue;
17858         }
17859         // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
17860         export function SignedRawInvoice_free(this_obj: number): void {
17861                 if(!isWasmInitialized) {
17862                         throw new Error("initializeWasm() must be awaited first!");
17863                 }
17864                 const nativeResponseValue = wasm.SignedRawInvoice_free(this_obj);
17865                 // debug statements here
17866         }
17867         // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
17868         export function SignedRawInvoice_eq(a: number, b: number): boolean {
17869                 if(!isWasmInitialized) {
17870                         throw new Error("initializeWasm() must be awaited first!");
17871                 }
17872                 const nativeResponseValue = wasm.SignedRawInvoice_eq(a, b);
17873                 return nativeResponseValue;
17874         }
17875         // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
17876         export function SignedRawInvoice_clone(orig: number): number {
17877                 if(!isWasmInitialized) {
17878                         throw new Error("initializeWasm() must be awaited first!");
17879                 }
17880                 const nativeResponseValue = wasm.SignedRawInvoice_clone(orig);
17881                 return nativeResponseValue;
17882         }
17883         // void RawInvoice_free(struct LDKRawInvoice this_obj);
17884         export function RawInvoice_free(this_obj: number): void {
17885                 if(!isWasmInitialized) {
17886                         throw new Error("initializeWasm() must be awaited first!");
17887                 }
17888                 const nativeResponseValue = wasm.RawInvoice_free(this_obj);
17889                 // debug statements here
17890         }
17891         // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
17892         export function RawInvoice_get_data(this_ptr: number): number {
17893                 if(!isWasmInitialized) {
17894                         throw new Error("initializeWasm() must be awaited first!");
17895                 }
17896                 const nativeResponseValue = wasm.RawInvoice_get_data(this_ptr);
17897                 return nativeResponseValue;
17898         }
17899         // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
17900         export function RawInvoice_set_data(this_ptr: number, val: number): void {
17901                 if(!isWasmInitialized) {
17902                         throw new Error("initializeWasm() must be awaited first!");
17903                 }
17904                 const nativeResponseValue = wasm.RawInvoice_set_data(this_ptr, val);
17905                 // debug statements here
17906         }
17907         // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
17908         export function RawInvoice_eq(a: number, b: number): boolean {
17909                 if(!isWasmInitialized) {
17910                         throw new Error("initializeWasm() must be awaited first!");
17911                 }
17912                 const nativeResponseValue = wasm.RawInvoice_eq(a, b);
17913                 return nativeResponseValue;
17914         }
17915         // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
17916         export function RawInvoice_clone(orig: number): number {
17917                 if(!isWasmInitialized) {
17918                         throw new Error("initializeWasm() must be awaited first!");
17919                 }
17920                 const nativeResponseValue = wasm.RawInvoice_clone(orig);
17921                 return nativeResponseValue;
17922         }
17923         // void RawDataPart_free(struct LDKRawDataPart this_obj);
17924         export function RawDataPart_free(this_obj: number): void {
17925                 if(!isWasmInitialized) {
17926                         throw new Error("initializeWasm() must be awaited first!");
17927                 }
17928                 const nativeResponseValue = wasm.RawDataPart_free(this_obj);
17929                 // debug statements here
17930         }
17931         // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
17932         export function RawDataPart_get_timestamp(this_ptr: number): number {
17933                 if(!isWasmInitialized) {
17934                         throw new Error("initializeWasm() must be awaited first!");
17935                 }
17936                 const nativeResponseValue = wasm.RawDataPart_get_timestamp(this_ptr);
17937                 return nativeResponseValue;
17938         }
17939         // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
17940         export function RawDataPart_set_timestamp(this_ptr: number, val: number): void {
17941                 if(!isWasmInitialized) {
17942                         throw new Error("initializeWasm() must be awaited first!");
17943                 }
17944                 const nativeResponseValue = wasm.RawDataPart_set_timestamp(this_ptr, val);
17945                 // debug statements here
17946         }
17947         // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
17948         export function RawDataPart_eq(a: number, b: number): boolean {
17949                 if(!isWasmInitialized) {
17950                         throw new Error("initializeWasm() must be awaited first!");
17951                 }
17952                 const nativeResponseValue = wasm.RawDataPart_eq(a, b);
17953                 return nativeResponseValue;
17954         }
17955         // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
17956         export function RawDataPart_clone(orig: number): number {
17957                 if(!isWasmInitialized) {
17958                         throw new Error("initializeWasm() must be awaited first!");
17959                 }
17960                 const nativeResponseValue = wasm.RawDataPart_clone(orig);
17961                 return nativeResponseValue;
17962         }
17963         // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
17964         export function PositiveTimestamp_free(this_obj: number): void {
17965                 if(!isWasmInitialized) {
17966                         throw new Error("initializeWasm() must be awaited first!");
17967                 }
17968                 const nativeResponseValue = wasm.PositiveTimestamp_free(this_obj);
17969                 // debug statements here
17970         }
17971         // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
17972         export function PositiveTimestamp_eq(a: number, b: number): boolean {
17973                 if(!isWasmInitialized) {
17974                         throw new Error("initializeWasm() must be awaited first!");
17975                 }
17976                 const nativeResponseValue = wasm.PositiveTimestamp_eq(a, b);
17977                 return nativeResponseValue;
17978         }
17979         // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
17980         export function PositiveTimestamp_clone(orig: number): number {
17981                 if(!isWasmInitialized) {
17982                         throw new Error("initializeWasm() must be awaited first!");
17983                 }
17984                 const nativeResponseValue = wasm.PositiveTimestamp_clone(orig);
17985                 return nativeResponseValue;
17986         }
17987         // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
17988         export function SiPrefix_clone(orig: number): SiPrefix {
17989                 if(!isWasmInitialized) {
17990                         throw new Error("initializeWasm() must be awaited first!");
17991                 }
17992                 const nativeResponseValue = wasm.SiPrefix_clone(orig);
17993                 return nativeResponseValue;
17994         }
17995         // enum LDKSiPrefix SiPrefix_milli(void);
17996         export function SiPrefix_milli(): SiPrefix {
17997                 if(!isWasmInitialized) {
17998                         throw new Error("initializeWasm() must be awaited first!");
17999                 }
18000                 const nativeResponseValue = wasm.SiPrefix_milli();
18001                 return nativeResponseValue;
18002         }
18003         // enum LDKSiPrefix SiPrefix_micro(void);
18004         export function SiPrefix_micro(): SiPrefix {
18005                 if(!isWasmInitialized) {
18006                         throw new Error("initializeWasm() must be awaited first!");
18007                 }
18008                 const nativeResponseValue = wasm.SiPrefix_micro();
18009                 return nativeResponseValue;
18010         }
18011         // enum LDKSiPrefix SiPrefix_nano(void);
18012         export function SiPrefix_nano(): SiPrefix {
18013                 if(!isWasmInitialized) {
18014                         throw new Error("initializeWasm() must be awaited first!");
18015                 }
18016                 const nativeResponseValue = wasm.SiPrefix_nano();
18017                 return nativeResponseValue;
18018         }
18019         // enum LDKSiPrefix SiPrefix_pico(void);
18020         export function SiPrefix_pico(): SiPrefix {
18021                 if(!isWasmInitialized) {
18022                         throw new Error("initializeWasm() must be awaited first!");
18023                 }
18024                 const nativeResponseValue = wasm.SiPrefix_pico();
18025                 return nativeResponseValue;
18026         }
18027         // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
18028         export function SiPrefix_eq(a: number, b: number): boolean {
18029                 if(!isWasmInitialized) {
18030                         throw new Error("initializeWasm() must be awaited first!");
18031                 }
18032                 const nativeResponseValue = wasm.SiPrefix_eq(a, b);
18033                 return nativeResponseValue;
18034         }
18035         // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
18036         export function SiPrefix_multiplier(this_arg: number): number {
18037                 if(!isWasmInitialized) {
18038                         throw new Error("initializeWasm() must be awaited first!");
18039                 }
18040                 const nativeResponseValue = wasm.SiPrefix_multiplier(this_arg);
18041                 return nativeResponseValue;
18042         }
18043         // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
18044         export function Currency_clone(orig: number): Currency {
18045                 if(!isWasmInitialized) {
18046                         throw new Error("initializeWasm() must be awaited first!");
18047                 }
18048                 const nativeResponseValue = wasm.Currency_clone(orig);
18049                 return nativeResponseValue;
18050         }
18051         // enum LDKCurrency Currency_bitcoin(void);
18052         export function Currency_bitcoin(): Currency {
18053                 if(!isWasmInitialized) {
18054                         throw new Error("initializeWasm() must be awaited first!");
18055                 }
18056                 const nativeResponseValue = wasm.Currency_bitcoin();
18057                 return nativeResponseValue;
18058         }
18059         // enum LDKCurrency Currency_bitcoin_testnet(void);
18060         export function Currency_bitcoin_testnet(): Currency {
18061                 if(!isWasmInitialized) {
18062                         throw new Error("initializeWasm() must be awaited first!");
18063                 }
18064                 const nativeResponseValue = wasm.Currency_bitcoin_testnet();
18065                 return nativeResponseValue;
18066         }
18067         // enum LDKCurrency Currency_regtest(void);
18068         export function Currency_regtest(): Currency {
18069                 if(!isWasmInitialized) {
18070                         throw new Error("initializeWasm() must be awaited first!");
18071                 }
18072                 const nativeResponseValue = wasm.Currency_regtest();
18073                 return nativeResponseValue;
18074         }
18075         // enum LDKCurrency Currency_simnet(void);
18076         export function Currency_simnet(): Currency {
18077                 if(!isWasmInitialized) {
18078                         throw new Error("initializeWasm() must be awaited first!");
18079                 }
18080                 const nativeResponseValue = wasm.Currency_simnet();
18081                 return nativeResponseValue;
18082         }
18083         // enum LDKCurrency Currency_signet(void);
18084         export function Currency_signet(): Currency {
18085                 if(!isWasmInitialized) {
18086                         throw new Error("initializeWasm() must be awaited first!");
18087                 }
18088                 const nativeResponseValue = wasm.Currency_signet();
18089                 return nativeResponseValue;
18090         }
18091         // uint64_t Currency_hash(const enum LDKCurrency *NONNULL_PTR o);
18092         export function Currency_hash(o: number): number {
18093                 if(!isWasmInitialized) {
18094                         throw new Error("initializeWasm() must be awaited first!");
18095                 }
18096                 const nativeResponseValue = wasm.Currency_hash(o);
18097                 return nativeResponseValue;
18098         }
18099         // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
18100         export function Currency_eq(a: number, b: number): boolean {
18101                 if(!isWasmInitialized) {
18102                         throw new Error("initializeWasm() must be awaited first!");
18103                 }
18104                 const nativeResponseValue = wasm.Currency_eq(a, b);
18105                 return nativeResponseValue;
18106         }
18107         // void Sha256_free(struct LDKSha256 this_obj);
18108         export function Sha256_free(this_obj: number): void {
18109                 if(!isWasmInitialized) {
18110                         throw new Error("initializeWasm() must be awaited first!");
18111                 }
18112                 const nativeResponseValue = wasm.Sha256_free(this_obj);
18113                 // debug statements here
18114         }
18115         // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
18116         export function Sha256_clone(orig: number): number {
18117                 if(!isWasmInitialized) {
18118                         throw new Error("initializeWasm() must be awaited first!");
18119                 }
18120                 const nativeResponseValue = wasm.Sha256_clone(orig);
18121                 return nativeResponseValue;
18122         }
18123         // uint64_t Sha256_hash(const struct LDKSha256 *NONNULL_PTR o);
18124         export function Sha256_hash(o: number): number {
18125                 if(!isWasmInitialized) {
18126                         throw new Error("initializeWasm() must be awaited first!");
18127                 }
18128                 const nativeResponseValue = wasm.Sha256_hash(o);
18129                 return nativeResponseValue;
18130         }
18131         // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
18132         export function Sha256_eq(a: number, b: number): boolean {
18133                 if(!isWasmInitialized) {
18134                         throw new Error("initializeWasm() must be awaited first!");
18135                 }
18136                 const nativeResponseValue = wasm.Sha256_eq(a, b);
18137                 return nativeResponseValue;
18138         }
18139         // void Description_free(struct LDKDescription this_obj);
18140         export function Description_free(this_obj: number): void {
18141                 if(!isWasmInitialized) {
18142                         throw new Error("initializeWasm() must be awaited first!");
18143                 }
18144                 const nativeResponseValue = wasm.Description_free(this_obj);
18145                 // debug statements here
18146         }
18147         // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
18148         export function Description_clone(orig: number): number {
18149                 if(!isWasmInitialized) {
18150                         throw new Error("initializeWasm() must be awaited first!");
18151                 }
18152                 const nativeResponseValue = wasm.Description_clone(orig);
18153                 return nativeResponseValue;
18154         }
18155         // uint64_t Description_hash(const struct LDKDescription *NONNULL_PTR o);
18156         export function Description_hash(o: number): number {
18157                 if(!isWasmInitialized) {
18158                         throw new Error("initializeWasm() must be awaited first!");
18159                 }
18160                 const nativeResponseValue = wasm.Description_hash(o);
18161                 return nativeResponseValue;
18162         }
18163         // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
18164         export function Description_eq(a: number, b: number): boolean {
18165                 if(!isWasmInitialized) {
18166                         throw new Error("initializeWasm() must be awaited first!");
18167                 }
18168                 const nativeResponseValue = wasm.Description_eq(a, b);
18169                 return nativeResponseValue;
18170         }
18171         // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
18172         export function PayeePubKey_free(this_obj: number): void {
18173                 if(!isWasmInitialized) {
18174                         throw new Error("initializeWasm() must be awaited first!");
18175                 }
18176                 const nativeResponseValue = wasm.PayeePubKey_free(this_obj);
18177                 // debug statements here
18178         }
18179         // struct LDKPublicKey PayeePubKey_get_a(const struct LDKPayeePubKey *NONNULL_PTR this_ptr);
18180         export function PayeePubKey_get_a(this_ptr: number): Uint8Array {
18181                 if(!isWasmInitialized) {
18182                         throw new Error("initializeWasm() must be awaited first!");
18183                 }
18184                 const nativeResponseValue = wasm.PayeePubKey_get_a(this_ptr);
18185                 return decodeArray(nativeResponseValue);
18186         }
18187         // void PayeePubKey_set_a(struct LDKPayeePubKey *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18188         export function PayeePubKey_set_a(this_ptr: number, val: Uint8Array): void {
18189                 if(!isWasmInitialized) {
18190                         throw new Error("initializeWasm() must be awaited first!");
18191                 }
18192                 const nativeResponseValue = wasm.PayeePubKey_set_a(this_ptr, encodeArray(val));
18193                 // debug statements here
18194         }
18195         // MUST_USE_RES struct LDKPayeePubKey PayeePubKey_new(struct LDKPublicKey a_arg);
18196         export function PayeePubKey_new(a_arg: Uint8Array): number {
18197                 if(!isWasmInitialized) {
18198                         throw new Error("initializeWasm() must be awaited first!");
18199                 }
18200                 const nativeResponseValue = wasm.PayeePubKey_new(encodeArray(a_arg));
18201                 return nativeResponseValue;
18202         }
18203         // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
18204         export function PayeePubKey_clone(orig: number): number {
18205                 if(!isWasmInitialized) {
18206                         throw new Error("initializeWasm() must be awaited first!");
18207                 }
18208                 const nativeResponseValue = wasm.PayeePubKey_clone(orig);
18209                 return nativeResponseValue;
18210         }
18211         // uint64_t PayeePubKey_hash(const struct LDKPayeePubKey *NONNULL_PTR o);
18212         export function PayeePubKey_hash(o: number): number {
18213                 if(!isWasmInitialized) {
18214                         throw new Error("initializeWasm() must be awaited first!");
18215                 }
18216                 const nativeResponseValue = wasm.PayeePubKey_hash(o);
18217                 return nativeResponseValue;
18218         }
18219         // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
18220         export function PayeePubKey_eq(a: number, b: number): boolean {
18221                 if(!isWasmInitialized) {
18222                         throw new Error("initializeWasm() must be awaited first!");
18223                 }
18224                 const nativeResponseValue = wasm.PayeePubKey_eq(a, b);
18225                 return nativeResponseValue;
18226         }
18227         // void ExpiryTime_free(struct LDKExpiryTime this_obj);
18228         export function ExpiryTime_free(this_obj: number): void {
18229                 if(!isWasmInitialized) {
18230                         throw new Error("initializeWasm() must be awaited first!");
18231                 }
18232                 const nativeResponseValue = wasm.ExpiryTime_free(this_obj);
18233                 // debug statements here
18234         }
18235         // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
18236         export function ExpiryTime_clone(orig: number): number {
18237                 if(!isWasmInitialized) {
18238                         throw new Error("initializeWasm() must be awaited first!");
18239                 }
18240                 const nativeResponseValue = wasm.ExpiryTime_clone(orig);
18241                 return nativeResponseValue;
18242         }
18243         // uint64_t ExpiryTime_hash(const struct LDKExpiryTime *NONNULL_PTR o);
18244         export function ExpiryTime_hash(o: number): number {
18245                 if(!isWasmInitialized) {
18246                         throw new Error("initializeWasm() must be awaited first!");
18247                 }
18248                 const nativeResponseValue = wasm.ExpiryTime_hash(o);
18249                 return nativeResponseValue;
18250         }
18251         // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
18252         export function ExpiryTime_eq(a: number, b: number): boolean {
18253                 if(!isWasmInitialized) {
18254                         throw new Error("initializeWasm() must be awaited first!");
18255                 }
18256                 const nativeResponseValue = wasm.ExpiryTime_eq(a, b);
18257                 return nativeResponseValue;
18258         }
18259         // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
18260         export function MinFinalCltvExpiry_free(this_obj: number): void {
18261                 if(!isWasmInitialized) {
18262                         throw new Error("initializeWasm() must be awaited first!");
18263                 }
18264                 const nativeResponseValue = wasm.MinFinalCltvExpiry_free(this_obj);
18265                 // debug statements here
18266         }
18267         // uint64_t MinFinalCltvExpiry_get_a(const struct LDKMinFinalCltvExpiry *NONNULL_PTR this_ptr);
18268         export function MinFinalCltvExpiry_get_a(this_ptr: number): number {
18269                 if(!isWasmInitialized) {
18270                         throw new Error("initializeWasm() must be awaited first!");
18271                 }
18272                 const nativeResponseValue = wasm.MinFinalCltvExpiry_get_a(this_ptr);
18273                 return nativeResponseValue;
18274         }
18275         // void MinFinalCltvExpiry_set_a(struct LDKMinFinalCltvExpiry *NONNULL_PTR this_ptr, uint64_t val);
18276         export function MinFinalCltvExpiry_set_a(this_ptr: number, val: number): void {
18277                 if(!isWasmInitialized) {
18278                         throw new Error("initializeWasm() must be awaited first!");
18279                 }
18280                 const nativeResponseValue = wasm.MinFinalCltvExpiry_set_a(this_ptr, val);
18281                 // debug statements here
18282         }
18283         // MUST_USE_RES struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_new(uint64_t a_arg);
18284         export function MinFinalCltvExpiry_new(a_arg: number): number {
18285                 if(!isWasmInitialized) {
18286                         throw new Error("initializeWasm() must be awaited first!");
18287                 }
18288                 const nativeResponseValue = wasm.MinFinalCltvExpiry_new(a_arg);
18289                 return nativeResponseValue;
18290         }
18291         // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
18292         export function MinFinalCltvExpiry_clone(orig: number): number {
18293                 if(!isWasmInitialized) {
18294                         throw new Error("initializeWasm() must be awaited first!");
18295                 }
18296                 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone(orig);
18297                 return nativeResponseValue;
18298         }
18299         // uint64_t MinFinalCltvExpiry_hash(const struct LDKMinFinalCltvExpiry *NONNULL_PTR o);
18300         export function MinFinalCltvExpiry_hash(o: number): number {
18301                 if(!isWasmInitialized) {
18302                         throw new Error("initializeWasm() must be awaited first!");
18303                 }
18304                 const nativeResponseValue = wasm.MinFinalCltvExpiry_hash(o);
18305                 return nativeResponseValue;
18306         }
18307         // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
18308         export function MinFinalCltvExpiry_eq(a: number, b: number): boolean {
18309                 if(!isWasmInitialized) {
18310                         throw new Error("initializeWasm() must be awaited first!");
18311                 }
18312                 const nativeResponseValue = wasm.MinFinalCltvExpiry_eq(a, b);
18313                 return nativeResponseValue;
18314         }
18315         // void Fallback_free(struct LDKFallback this_ptr);
18316         export function Fallback_free(this_ptr: number): void {
18317                 if(!isWasmInitialized) {
18318                         throw new Error("initializeWasm() must be awaited first!");
18319                 }
18320                 const nativeResponseValue = wasm.Fallback_free(this_ptr);
18321                 // debug statements here
18322         }
18323         // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
18324         export function Fallback_clone(orig: number): number {
18325                 if(!isWasmInitialized) {
18326                         throw new Error("initializeWasm() must be awaited first!");
18327                 }
18328                 const nativeResponseValue = wasm.Fallback_clone(orig);
18329                 return nativeResponseValue;
18330         }
18331         // struct LDKFallback Fallback_seg_wit_program(struct LDKu5 version, struct LDKCVec_u8Z program);
18332         export function Fallback_seg_wit_program(version: number, program: Uint8Array): number {
18333                 if(!isWasmInitialized) {
18334                         throw new Error("initializeWasm() must be awaited first!");
18335                 }
18336                 const nativeResponseValue = wasm.Fallback_seg_wit_program(version, encodeArray(program));
18337                 return nativeResponseValue;
18338         }
18339         // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
18340         export function Fallback_pub_key_hash(a: Uint8Array): number {
18341                 if(!isWasmInitialized) {
18342                         throw new Error("initializeWasm() must be awaited first!");
18343                 }
18344                 const nativeResponseValue = wasm.Fallback_pub_key_hash(encodeArray(a));
18345                 return nativeResponseValue;
18346         }
18347         // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
18348         export function Fallback_script_hash(a: Uint8Array): number {
18349                 if(!isWasmInitialized) {
18350                         throw new Error("initializeWasm() must be awaited first!");
18351                 }
18352                 const nativeResponseValue = wasm.Fallback_script_hash(encodeArray(a));
18353                 return nativeResponseValue;
18354         }
18355         // uint64_t Fallback_hash(const struct LDKFallback *NONNULL_PTR o);
18356         export function Fallback_hash(o: number): number {
18357                 if(!isWasmInitialized) {
18358                         throw new Error("initializeWasm() must be awaited first!");
18359                 }
18360                 const nativeResponseValue = wasm.Fallback_hash(o);
18361                 return nativeResponseValue;
18362         }
18363         // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
18364         export function Fallback_eq(a: number, b: number): boolean {
18365                 if(!isWasmInitialized) {
18366                         throw new Error("initializeWasm() must be awaited first!");
18367                 }
18368                 const nativeResponseValue = wasm.Fallback_eq(a, b);
18369                 return nativeResponseValue;
18370         }
18371         // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
18372         export function InvoiceSignature_free(this_obj: number): void {
18373                 if(!isWasmInitialized) {
18374                         throw new Error("initializeWasm() must be awaited first!");
18375                 }
18376                 const nativeResponseValue = wasm.InvoiceSignature_free(this_obj);
18377                 // debug statements here
18378         }
18379         // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
18380         export function InvoiceSignature_clone(orig: number): number {
18381                 if(!isWasmInitialized) {
18382                         throw new Error("initializeWasm() must be awaited first!");
18383                 }
18384                 const nativeResponseValue = wasm.InvoiceSignature_clone(orig);
18385                 return nativeResponseValue;
18386         }
18387         // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
18388         export function InvoiceSignature_eq(a: number, b: number): boolean {
18389                 if(!isWasmInitialized) {
18390                         throw new Error("initializeWasm() must be awaited first!");
18391                 }
18392                 const nativeResponseValue = wasm.InvoiceSignature_eq(a, b);
18393                 return nativeResponseValue;
18394         }
18395         // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
18396         export function PrivateRoute_free(this_obj: number): void {
18397                 if(!isWasmInitialized) {
18398                         throw new Error("initializeWasm() must be awaited first!");
18399                 }
18400                 const nativeResponseValue = wasm.PrivateRoute_free(this_obj);
18401                 // debug statements here
18402         }
18403         // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
18404         export function PrivateRoute_clone(orig: number): number {
18405                 if(!isWasmInitialized) {
18406                         throw new Error("initializeWasm() must be awaited first!");
18407                 }
18408                 const nativeResponseValue = wasm.PrivateRoute_clone(orig);
18409                 return nativeResponseValue;
18410         }
18411         // uint64_t PrivateRoute_hash(const struct LDKPrivateRoute *NONNULL_PTR o);
18412         export function PrivateRoute_hash(o: number): number {
18413                 if(!isWasmInitialized) {
18414                         throw new Error("initializeWasm() must be awaited first!");
18415                 }
18416                 const nativeResponseValue = wasm.PrivateRoute_hash(o);
18417                 return nativeResponseValue;
18418         }
18419         // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
18420         export function PrivateRoute_eq(a: number, b: number): boolean {
18421                 if(!isWasmInitialized) {
18422                         throw new Error("initializeWasm() must be awaited first!");
18423                 }
18424                 const nativeResponseValue = wasm.PrivateRoute_eq(a, b);
18425                 return nativeResponseValue;
18426         }
18427         // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
18428         export function SignedRawInvoice_into_parts(this_arg: number): number {
18429                 if(!isWasmInitialized) {
18430                         throw new Error("initializeWasm() must be awaited first!");
18431                 }
18432                 const nativeResponseValue = wasm.SignedRawInvoice_into_parts(this_arg);
18433                 return nativeResponseValue;
18434         }
18435         // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
18436         export function SignedRawInvoice_raw_invoice(this_arg: number): number {
18437                 if(!isWasmInitialized) {
18438                         throw new Error("initializeWasm() must be awaited first!");
18439                 }
18440                 const nativeResponseValue = wasm.SignedRawInvoice_raw_invoice(this_arg);
18441                 return nativeResponseValue;
18442         }
18443         // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
18444         export function SignedRawInvoice_hash(this_arg: number): Uint8Array {
18445                 if(!isWasmInitialized) {
18446                         throw new Error("initializeWasm() must be awaited first!");
18447                 }
18448                 const nativeResponseValue = wasm.SignedRawInvoice_hash(this_arg);
18449                 return decodeArray(nativeResponseValue);
18450         }
18451         // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
18452         export function SignedRawInvoice_signature(this_arg: number): number {
18453                 if(!isWasmInitialized) {
18454                         throw new Error("initializeWasm() must be awaited first!");
18455                 }
18456                 const nativeResponseValue = wasm.SignedRawInvoice_signature(this_arg);
18457                 return nativeResponseValue;
18458         }
18459         // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
18460         export function SignedRawInvoice_recover_payee_pub_key(this_arg: number): number {
18461                 if(!isWasmInitialized) {
18462                         throw new Error("initializeWasm() must be awaited first!");
18463                 }
18464                 const nativeResponseValue = wasm.SignedRawInvoice_recover_payee_pub_key(this_arg);
18465                 return nativeResponseValue;
18466         }
18467         // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
18468         export function SignedRawInvoice_check_signature(this_arg: number): boolean {
18469                 if(!isWasmInitialized) {
18470                         throw new Error("initializeWasm() must be awaited first!");
18471                 }
18472                 const nativeResponseValue = wasm.SignedRawInvoice_check_signature(this_arg);
18473                 return nativeResponseValue;
18474         }
18475         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
18476         export function RawInvoice_hash(this_arg: number): Uint8Array {
18477                 if(!isWasmInitialized) {
18478                         throw new Error("initializeWasm() must be awaited first!");
18479                 }
18480                 const nativeResponseValue = wasm.RawInvoice_hash(this_arg);
18481                 return decodeArray(nativeResponseValue);
18482         }
18483         // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
18484         export function RawInvoice_payment_hash(this_arg: number): number {
18485                 if(!isWasmInitialized) {
18486                         throw new Error("initializeWasm() must be awaited first!");
18487                 }
18488                 const nativeResponseValue = wasm.RawInvoice_payment_hash(this_arg);
18489                 return nativeResponseValue;
18490         }
18491         // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
18492         export function RawInvoice_description(this_arg: number): number {
18493                 if(!isWasmInitialized) {
18494                         throw new Error("initializeWasm() must be awaited first!");
18495                 }
18496                 const nativeResponseValue = wasm.RawInvoice_description(this_arg);
18497                 return nativeResponseValue;
18498         }
18499         // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
18500         export function RawInvoice_payee_pub_key(this_arg: number): number {
18501                 if(!isWasmInitialized) {
18502                         throw new Error("initializeWasm() must be awaited first!");
18503                 }
18504                 const nativeResponseValue = wasm.RawInvoice_payee_pub_key(this_arg);
18505                 return nativeResponseValue;
18506         }
18507         // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
18508         export function RawInvoice_description_hash(this_arg: number): number {
18509                 if(!isWasmInitialized) {
18510                         throw new Error("initializeWasm() must be awaited first!");
18511                 }
18512                 const nativeResponseValue = wasm.RawInvoice_description_hash(this_arg);
18513                 return nativeResponseValue;
18514         }
18515         // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
18516         export function RawInvoice_expiry_time(this_arg: number): number {
18517                 if(!isWasmInitialized) {
18518                         throw new Error("initializeWasm() must be awaited first!");
18519                 }
18520                 const nativeResponseValue = wasm.RawInvoice_expiry_time(this_arg);
18521                 return nativeResponseValue;
18522         }
18523         // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
18524         export function RawInvoice_min_final_cltv_expiry(this_arg: number): number {
18525                 if(!isWasmInitialized) {
18526                         throw new Error("initializeWasm() must be awaited first!");
18527                 }
18528                 const nativeResponseValue = wasm.RawInvoice_min_final_cltv_expiry(this_arg);
18529                 return nativeResponseValue;
18530         }
18531         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
18532         export function RawInvoice_payment_secret(this_arg: number): Uint8Array {
18533                 if(!isWasmInitialized) {
18534                         throw new Error("initializeWasm() must be awaited first!");
18535                 }
18536                 const nativeResponseValue = wasm.RawInvoice_payment_secret(this_arg);
18537                 return decodeArray(nativeResponseValue);
18538         }
18539         // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
18540         export function RawInvoice_features(this_arg: number): number {
18541                 if(!isWasmInitialized) {
18542                         throw new Error("initializeWasm() must be awaited first!");
18543                 }
18544                 const nativeResponseValue = wasm.RawInvoice_features(this_arg);
18545                 return nativeResponseValue;
18546         }
18547         // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
18548         export function RawInvoice_private_routes(this_arg: number): number[] {
18549                 if(!isWasmInitialized) {
18550                         throw new Error("initializeWasm() must be awaited first!");
18551                 }
18552                 const nativeResponseValue = wasm.RawInvoice_private_routes(this_arg);
18553                 return nativeResponseValue;
18554         }
18555         // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
18556         export function RawInvoice_amount_pico_btc(this_arg: number): number {
18557                 if(!isWasmInitialized) {
18558                         throw new Error("initializeWasm() must be awaited first!");
18559                 }
18560                 const nativeResponseValue = wasm.RawInvoice_amount_pico_btc(this_arg);
18561                 return nativeResponseValue;
18562         }
18563         // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
18564         export function RawInvoice_currency(this_arg: number): Currency {
18565                 if(!isWasmInitialized) {
18566                         throw new Error("initializeWasm() must be awaited first!");
18567                 }
18568                 const nativeResponseValue = wasm.RawInvoice_currency(this_arg);
18569                 return nativeResponseValue;
18570         }
18571         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
18572         export function PositiveTimestamp_from_unix_timestamp(unix_seconds: number): number {
18573                 if(!isWasmInitialized) {
18574                         throw new Error("initializeWasm() must be awaited first!");
18575                 }
18576                 const nativeResponseValue = wasm.PositiveTimestamp_from_unix_timestamp(unix_seconds);
18577                 return nativeResponseValue;
18578         }
18579         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
18580         export function PositiveTimestamp_from_system_time(time: number): number {
18581                 if(!isWasmInitialized) {
18582                         throw new Error("initializeWasm() must be awaited first!");
18583                 }
18584                 const nativeResponseValue = wasm.PositiveTimestamp_from_system_time(time);
18585                 return nativeResponseValue;
18586         }
18587         // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
18588         export function PositiveTimestamp_as_unix_timestamp(this_arg: number): number {
18589                 if(!isWasmInitialized) {
18590                         throw new Error("initializeWasm() must be awaited first!");
18591                 }
18592                 const nativeResponseValue = wasm.PositiveTimestamp_as_unix_timestamp(this_arg);
18593                 return nativeResponseValue;
18594         }
18595         // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
18596         export function PositiveTimestamp_as_time(this_arg: number): number {
18597                 if(!isWasmInitialized) {
18598                         throw new Error("initializeWasm() must be awaited first!");
18599                 }
18600                 const nativeResponseValue = wasm.PositiveTimestamp_as_time(this_arg);
18601                 return nativeResponseValue;
18602         }
18603         // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
18604         export function Invoice_into_signed_raw(this_arg: number): number {
18605                 if(!isWasmInitialized) {
18606                         throw new Error("initializeWasm() must be awaited first!");
18607                 }
18608                 const nativeResponseValue = wasm.Invoice_into_signed_raw(this_arg);
18609                 return nativeResponseValue;
18610         }
18611         // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
18612         export function Invoice_check_signature(this_arg: number): number {
18613                 if(!isWasmInitialized) {
18614                         throw new Error("initializeWasm() must be awaited first!");
18615                 }
18616                 const nativeResponseValue = wasm.Invoice_check_signature(this_arg);
18617                 return nativeResponseValue;
18618         }
18619         // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
18620         export function Invoice_from_signed(signed_invoice: number): number {
18621                 if(!isWasmInitialized) {
18622                         throw new Error("initializeWasm() must be awaited first!");
18623                 }
18624                 const nativeResponseValue = wasm.Invoice_from_signed(signed_invoice);
18625                 return nativeResponseValue;
18626         }
18627         // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
18628         export function Invoice_timestamp(this_arg: number): number {
18629                 if(!isWasmInitialized) {
18630                         throw new Error("initializeWasm() must be awaited first!");
18631                 }
18632                 const nativeResponseValue = wasm.Invoice_timestamp(this_arg);
18633                 return nativeResponseValue;
18634         }
18635         // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
18636         export function Invoice_payment_hash(this_arg: number): Uint8Array {
18637                 if(!isWasmInitialized) {
18638                         throw new Error("initializeWasm() must be awaited first!");
18639                 }
18640                 const nativeResponseValue = wasm.Invoice_payment_hash(this_arg);
18641                 return decodeArray(nativeResponseValue);
18642         }
18643         // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
18644         export function Invoice_payee_pub_key(this_arg: number): Uint8Array {
18645                 if(!isWasmInitialized) {
18646                         throw new Error("initializeWasm() must be awaited first!");
18647                 }
18648                 const nativeResponseValue = wasm.Invoice_payee_pub_key(this_arg);
18649                 return decodeArray(nativeResponseValue);
18650         }
18651         // MUST_USE_RES const uint8_t (*Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
18652         export function Invoice_payment_secret(this_arg: number): Uint8Array {
18653                 if(!isWasmInitialized) {
18654                         throw new Error("initializeWasm() must be awaited first!");
18655                 }
18656                 const nativeResponseValue = wasm.Invoice_payment_secret(this_arg);
18657                 return decodeArray(nativeResponseValue);
18658         }
18659         // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
18660         export function Invoice_features(this_arg: number): number {
18661                 if(!isWasmInitialized) {
18662                         throw new Error("initializeWasm() must be awaited first!");
18663                 }
18664                 const nativeResponseValue = wasm.Invoice_features(this_arg);
18665                 return nativeResponseValue;
18666         }
18667         // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
18668         export function Invoice_recover_payee_pub_key(this_arg: number): Uint8Array {
18669                 if(!isWasmInitialized) {
18670                         throw new Error("initializeWasm() must be awaited first!");
18671                 }
18672                 const nativeResponseValue = wasm.Invoice_recover_payee_pub_key(this_arg);
18673                 return decodeArray(nativeResponseValue);
18674         }
18675         // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
18676         export function Invoice_expiry_time(this_arg: number): number {
18677                 if(!isWasmInitialized) {
18678                         throw new Error("initializeWasm() must be awaited first!");
18679                 }
18680                 const nativeResponseValue = wasm.Invoice_expiry_time(this_arg);
18681                 return nativeResponseValue;
18682         }
18683         // MUST_USE_RES bool Invoice_is_expired(const struct LDKInvoice *NONNULL_PTR this_arg);
18684         export function Invoice_is_expired(this_arg: number): boolean {
18685                 if(!isWasmInitialized) {
18686                         throw new Error("initializeWasm() must be awaited first!");
18687                 }
18688                 const nativeResponseValue = wasm.Invoice_is_expired(this_arg);
18689                 return nativeResponseValue;
18690         }
18691         // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
18692         export function Invoice_min_final_cltv_expiry(this_arg: number): number {
18693                 if(!isWasmInitialized) {
18694                         throw new Error("initializeWasm() must be awaited first!");
18695                 }
18696                 const nativeResponseValue = wasm.Invoice_min_final_cltv_expiry(this_arg);
18697                 return nativeResponseValue;
18698         }
18699         // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
18700         export function Invoice_private_routes(this_arg: number): number[] {
18701                 if(!isWasmInitialized) {
18702                         throw new Error("initializeWasm() must be awaited first!");
18703                 }
18704                 const nativeResponseValue = wasm.Invoice_private_routes(this_arg);
18705                 return nativeResponseValue;
18706         }
18707         // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
18708         export function Invoice_route_hints(this_arg: number): number[] {
18709                 if(!isWasmInitialized) {
18710                         throw new Error("initializeWasm() must be awaited first!");
18711                 }
18712                 const nativeResponseValue = wasm.Invoice_route_hints(this_arg);
18713                 return nativeResponseValue;
18714         }
18715         // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
18716         export function Invoice_currency(this_arg: number): Currency {
18717                 if(!isWasmInitialized) {
18718                         throw new Error("initializeWasm() must be awaited first!");
18719                 }
18720                 const nativeResponseValue = wasm.Invoice_currency(this_arg);
18721                 return nativeResponseValue;
18722         }
18723         // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_milli_satoshis(const struct LDKInvoice *NONNULL_PTR this_arg);
18724         export function Invoice_amount_milli_satoshis(this_arg: number): number {
18725                 if(!isWasmInitialized) {
18726                         throw new Error("initializeWasm() must be awaited first!");
18727                 }
18728                 const nativeResponseValue = wasm.Invoice_amount_milli_satoshis(this_arg);
18729                 return nativeResponseValue;
18730         }
18731         // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
18732         export function Description_new(description: String): number {
18733                 if(!isWasmInitialized) {
18734                         throw new Error("initializeWasm() must be awaited first!");
18735                 }
18736                 const nativeResponseValue = wasm.Description_new(description);
18737                 return nativeResponseValue;
18738         }
18739         // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
18740         export function Description_into_inner(this_arg: number): String {
18741                 if(!isWasmInitialized) {
18742                         throw new Error("initializeWasm() must be awaited first!");
18743                 }
18744                 const nativeResponseValue = wasm.Description_into_inner(this_arg);
18745                 return nativeResponseValue;
18746         }
18747         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
18748         export function ExpiryTime_from_seconds(seconds: number): number {
18749                 if(!isWasmInitialized) {
18750                         throw new Error("initializeWasm() must be awaited first!");
18751                 }
18752                 const nativeResponseValue = wasm.ExpiryTime_from_seconds(seconds);
18753                 return nativeResponseValue;
18754         }
18755         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
18756         export function ExpiryTime_from_duration(duration: number): number {
18757                 if(!isWasmInitialized) {
18758                         throw new Error("initializeWasm() must be awaited first!");
18759                 }
18760                 const nativeResponseValue = wasm.ExpiryTime_from_duration(duration);
18761                 return nativeResponseValue;
18762         }
18763         // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
18764         export function ExpiryTime_as_seconds(this_arg: number): number {
18765                 if(!isWasmInitialized) {
18766                         throw new Error("initializeWasm() must be awaited first!");
18767                 }
18768                 const nativeResponseValue = wasm.ExpiryTime_as_seconds(this_arg);
18769                 return nativeResponseValue;
18770         }
18771         // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
18772         export function ExpiryTime_as_duration(this_arg: number): number {
18773                 if(!isWasmInitialized) {
18774                         throw new Error("initializeWasm() must be awaited first!");
18775                 }
18776                 const nativeResponseValue = wasm.ExpiryTime_as_duration(this_arg);
18777                 return nativeResponseValue;
18778         }
18779         // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
18780         export function PrivateRoute_new(hops: number): number {
18781                 if(!isWasmInitialized) {
18782                         throw new Error("initializeWasm() must be awaited first!");
18783                 }
18784                 const nativeResponseValue = wasm.PrivateRoute_new(hops);
18785                 return nativeResponseValue;
18786         }
18787         // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
18788         export function PrivateRoute_into_inner(this_arg: number): number {
18789                 if(!isWasmInitialized) {
18790                         throw new Error("initializeWasm() must be awaited first!");
18791                 }
18792                 const nativeResponseValue = wasm.PrivateRoute_into_inner(this_arg);
18793                 return nativeResponseValue;
18794         }
18795         // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
18796         export function CreationError_clone(orig: number): CreationError {
18797                 if(!isWasmInitialized) {
18798                         throw new Error("initializeWasm() must be awaited first!");
18799                 }
18800                 const nativeResponseValue = wasm.CreationError_clone(orig);
18801                 return nativeResponseValue;
18802         }
18803         // enum LDKCreationError CreationError_description_too_long(void);
18804         export function CreationError_description_too_long(): CreationError {
18805                 if(!isWasmInitialized) {
18806                         throw new Error("initializeWasm() must be awaited first!");
18807                 }
18808                 const nativeResponseValue = wasm.CreationError_description_too_long();
18809                 return nativeResponseValue;
18810         }
18811         // enum LDKCreationError CreationError_route_too_long(void);
18812         export function CreationError_route_too_long(): CreationError {
18813                 if(!isWasmInitialized) {
18814                         throw new Error("initializeWasm() must be awaited first!");
18815                 }
18816                 const nativeResponseValue = wasm.CreationError_route_too_long();
18817                 return nativeResponseValue;
18818         }
18819         // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
18820         export function CreationError_timestamp_out_of_bounds(): CreationError {
18821                 if(!isWasmInitialized) {
18822                         throw new Error("initializeWasm() must be awaited first!");
18823                 }
18824                 const nativeResponseValue = wasm.CreationError_timestamp_out_of_bounds();
18825                 return nativeResponseValue;
18826         }
18827         // enum LDKCreationError CreationError_expiry_time_out_of_bounds(void);
18828         export function CreationError_expiry_time_out_of_bounds(): CreationError {
18829                 if(!isWasmInitialized) {
18830                         throw new Error("initializeWasm() must be awaited first!");
18831                 }
18832                 const nativeResponseValue = wasm.CreationError_expiry_time_out_of_bounds();
18833                 return nativeResponseValue;
18834         }
18835         // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
18836         export function CreationError_eq(a: number, b: number): boolean {
18837                 if(!isWasmInitialized) {
18838                         throw new Error("initializeWasm() must be awaited first!");
18839                 }
18840                 const nativeResponseValue = wasm.CreationError_eq(a, b);
18841                 return nativeResponseValue;
18842         }
18843         // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
18844         export function CreationError_to_str(o: number): String {
18845                 if(!isWasmInitialized) {
18846                         throw new Error("initializeWasm() must be awaited first!");
18847                 }
18848                 const nativeResponseValue = wasm.CreationError_to_str(o);
18849                 return nativeResponseValue;
18850         }
18851         // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
18852         export function SemanticError_clone(orig: number): SemanticError {
18853                 if(!isWasmInitialized) {
18854                         throw new Error("initializeWasm() must be awaited first!");
18855                 }
18856                 const nativeResponseValue = wasm.SemanticError_clone(orig);
18857                 return nativeResponseValue;
18858         }
18859         // enum LDKSemanticError SemanticError_no_payment_hash(void);
18860         export function SemanticError_no_payment_hash(): SemanticError {
18861                 if(!isWasmInitialized) {
18862                         throw new Error("initializeWasm() must be awaited first!");
18863                 }
18864                 const nativeResponseValue = wasm.SemanticError_no_payment_hash();
18865                 return nativeResponseValue;
18866         }
18867         // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
18868         export function SemanticError_multiple_payment_hashes(): SemanticError {
18869                 if(!isWasmInitialized) {
18870                         throw new Error("initializeWasm() must be awaited first!");
18871                 }
18872                 const nativeResponseValue = wasm.SemanticError_multiple_payment_hashes();
18873                 return nativeResponseValue;
18874         }
18875         // enum LDKSemanticError SemanticError_no_description(void);
18876         export function SemanticError_no_description(): SemanticError {
18877                 if(!isWasmInitialized) {
18878                         throw new Error("initializeWasm() must be awaited first!");
18879                 }
18880                 const nativeResponseValue = wasm.SemanticError_no_description();
18881                 return nativeResponseValue;
18882         }
18883         // enum LDKSemanticError SemanticError_multiple_descriptions(void);
18884         export function SemanticError_multiple_descriptions(): SemanticError {
18885                 if(!isWasmInitialized) {
18886                         throw new Error("initializeWasm() must be awaited first!");
18887                 }
18888                 const nativeResponseValue = wasm.SemanticError_multiple_descriptions();
18889                 return nativeResponseValue;
18890         }
18891         // enum LDKSemanticError SemanticError_no_payment_secret(void);
18892         export function SemanticError_no_payment_secret(): SemanticError {
18893                 if(!isWasmInitialized) {
18894                         throw new Error("initializeWasm() must be awaited first!");
18895                 }
18896                 const nativeResponseValue = wasm.SemanticError_no_payment_secret();
18897                 return nativeResponseValue;
18898         }
18899         // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
18900         export function SemanticError_multiple_payment_secrets(): SemanticError {
18901                 if(!isWasmInitialized) {
18902                         throw new Error("initializeWasm() must be awaited first!");
18903                 }
18904                 const nativeResponseValue = wasm.SemanticError_multiple_payment_secrets();
18905                 return nativeResponseValue;
18906         }
18907         // enum LDKSemanticError SemanticError_invalid_features(void);
18908         export function SemanticError_invalid_features(): SemanticError {
18909                 if(!isWasmInitialized) {
18910                         throw new Error("initializeWasm() must be awaited first!");
18911                 }
18912                 const nativeResponseValue = wasm.SemanticError_invalid_features();
18913                 return nativeResponseValue;
18914         }
18915         // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
18916         export function SemanticError_invalid_recovery_id(): SemanticError {
18917                 if(!isWasmInitialized) {
18918                         throw new Error("initializeWasm() must be awaited first!");
18919                 }
18920                 const nativeResponseValue = wasm.SemanticError_invalid_recovery_id();
18921                 return nativeResponseValue;
18922         }
18923         // enum LDKSemanticError SemanticError_invalid_signature(void);
18924         export function SemanticError_invalid_signature(): SemanticError {
18925                 if(!isWasmInitialized) {
18926                         throw new Error("initializeWasm() must be awaited first!");
18927                 }
18928                 const nativeResponseValue = wasm.SemanticError_invalid_signature();
18929                 return nativeResponseValue;
18930         }
18931         // enum LDKSemanticError SemanticError_imprecise_amount(void);
18932         export function SemanticError_imprecise_amount(): SemanticError {
18933                 if(!isWasmInitialized) {
18934                         throw new Error("initializeWasm() must be awaited first!");
18935                 }
18936                 const nativeResponseValue = wasm.SemanticError_imprecise_amount();
18937                 return nativeResponseValue;
18938         }
18939         // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
18940         export function SemanticError_eq(a: number, b: number): boolean {
18941                 if(!isWasmInitialized) {
18942                         throw new Error("initializeWasm() must be awaited first!");
18943                 }
18944                 const nativeResponseValue = wasm.SemanticError_eq(a, b);
18945                 return nativeResponseValue;
18946         }
18947         // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
18948         export function SemanticError_to_str(o: number): String {
18949                 if(!isWasmInitialized) {
18950                         throw new Error("initializeWasm() must be awaited first!");
18951                 }
18952                 const nativeResponseValue = wasm.SemanticError_to_str(o);
18953                 return nativeResponseValue;
18954         }
18955         // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
18956         export function SignOrCreationError_free(this_ptr: number): void {
18957                 if(!isWasmInitialized) {
18958                         throw new Error("initializeWasm() must be awaited first!");
18959                 }
18960                 const nativeResponseValue = wasm.SignOrCreationError_free(this_ptr);
18961                 // debug statements here
18962         }
18963         // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
18964         export function SignOrCreationError_clone(orig: number): number {
18965                 if(!isWasmInitialized) {
18966                         throw new Error("initializeWasm() must be awaited first!");
18967                 }
18968                 const nativeResponseValue = wasm.SignOrCreationError_clone(orig);
18969                 return nativeResponseValue;
18970         }
18971         // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
18972         export function SignOrCreationError_sign_error(): number {
18973                 if(!isWasmInitialized) {
18974                         throw new Error("initializeWasm() must be awaited first!");
18975                 }
18976                 const nativeResponseValue = wasm.SignOrCreationError_sign_error();
18977                 return nativeResponseValue;
18978         }
18979         // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
18980         export function SignOrCreationError_creation_error(a: CreationError): number {
18981                 if(!isWasmInitialized) {
18982                         throw new Error("initializeWasm() must be awaited first!");
18983                 }
18984                 const nativeResponseValue = wasm.SignOrCreationError_creation_error(a);
18985                 return nativeResponseValue;
18986         }
18987         // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
18988         export function SignOrCreationError_eq(a: number, b: number): boolean {
18989                 if(!isWasmInitialized) {
18990                         throw new Error("initializeWasm() must be awaited first!");
18991                 }
18992                 const nativeResponseValue = wasm.SignOrCreationError_eq(a, b);
18993                 return nativeResponseValue;
18994         }
18995         // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
18996         export function SignOrCreationError_to_str(o: number): String {
18997                 if(!isWasmInitialized) {
18998                         throw new Error("initializeWasm() must be awaited first!");
18999                 }
19000                 const nativeResponseValue = wasm.SignOrCreationError_to_str(o);
19001                 return nativeResponseValue;
19002         }
19003         // void InvoicePayer_free(struct LDKInvoicePayer this_obj);
19004         export function InvoicePayer_free(this_obj: number): void {
19005                 if(!isWasmInitialized) {
19006                         throw new Error("initializeWasm() must be awaited first!");
19007                 }
19008                 const nativeResponseValue = wasm.InvoicePayer_free(this_obj);
19009                 // debug statements here
19010         }
19011         // void Payer_free(struct LDKPayer this_ptr);
19012         export function Payer_free(this_ptr: number): void {
19013                 if(!isWasmInitialized) {
19014                         throw new Error("initializeWasm() must be awaited first!");
19015                 }
19016                 const nativeResponseValue = wasm.Payer_free(this_ptr);
19017                 // debug statements here
19018         }
19019         // void Router_free(struct LDKRouter this_ptr);
19020         export function Router_free(this_ptr: number): void {
19021                 if(!isWasmInitialized) {
19022                         throw new Error("initializeWasm() must be awaited first!");
19023                 }
19024                 const nativeResponseValue = wasm.Router_free(this_ptr);
19025                 // debug statements here
19026         }
19027         // void RetryAttempts_free(struct LDKRetryAttempts this_obj);
19028         export function RetryAttempts_free(this_obj: number): void {
19029                 if(!isWasmInitialized) {
19030                         throw new Error("initializeWasm() must be awaited first!");
19031                 }
19032                 const nativeResponseValue = wasm.RetryAttempts_free(this_obj);
19033                 // debug statements here
19034         }
19035         // uintptr_t RetryAttempts_get_a(const struct LDKRetryAttempts *NONNULL_PTR this_ptr);
19036         export function RetryAttempts_get_a(this_ptr: number): number {
19037                 if(!isWasmInitialized) {
19038                         throw new Error("initializeWasm() must be awaited first!");
19039                 }
19040                 const nativeResponseValue = wasm.RetryAttempts_get_a(this_ptr);
19041                 return nativeResponseValue;
19042         }
19043         // void RetryAttempts_set_a(struct LDKRetryAttempts *NONNULL_PTR this_ptr, uintptr_t val);
19044         export function RetryAttempts_set_a(this_ptr: number, val: number): void {
19045                 if(!isWasmInitialized) {
19046                         throw new Error("initializeWasm() must be awaited first!");
19047                 }
19048                 const nativeResponseValue = wasm.RetryAttempts_set_a(this_ptr, val);
19049                 // debug statements here
19050         }
19051         // MUST_USE_RES struct LDKRetryAttempts RetryAttempts_new(uintptr_t a_arg);
19052         export function RetryAttempts_new(a_arg: number): number {
19053                 if(!isWasmInitialized) {
19054                         throw new Error("initializeWasm() must be awaited first!");
19055                 }
19056                 const nativeResponseValue = wasm.RetryAttempts_new(a_arg);
19057                 return nativeResponseValue;
19058         }
19059         // struct LDKRetryAttempts RetryAttempts_clone(const struct LDKRetryAttempts *NONNULL_PTR orig);
19060         export function RetryAttempts_clone(orig: number): number {
19061                 if(!isWasmInitialized) {
19062                         throw new Error("initializeWasm() must be awaited first!");
19063                 }
19064                 const nativeResponseValue = wasm.RetryAttempts_clone(orig);
19065                 return nativeResponseValue;
19066         }
19067         // bool RetryAttempts_eq(const struct LDKRetryAttempts *NONNULL_PTR a, const struct LDKRetryAttempts *NONNULL_PTR b);
19068         export function RetryAttempts_eq(a: number, b: number): boolean {
19069                 if(!isWasmInitialized) {
19070                         throw new Error("initializeWasm() must be awaited first!");
19071                 }
19072                 const nativeResponseValue = wasm.RetryAttempts_eq(a, b);
19073                 return nativeResponseValue;
19074         }
19075         // uint64_t RetryAttempts_hash(const struct LDKRetryAttempts *NONNULL_PTR o);
19076         export function RetryAttempts_hash(o: number): number {
19077                 if(!isWasmInitialized) {
19078                         throw new Error("initializeWasm() must be awaited first!");
19079                 }
19080                 const nativeResponseValue = wasm.RetryAttempts_hash(o);
19081                 return nativeResponseValue;
19082         }
19083         // void PaymentError_free(struct LDKPaymentError this_ptr);
19084         export function PaymentError_free(this_ptr: number): void {
19085                 if(!isWasmInitialized) {
19086                         throw new Error("initializeWasm() must be awaited first!");
19087                 }
19088                 const nativeResponseValue = wasm.PaymentError_free(this_ptr);
19089                 // debug statements here
19090         }
19091         // struct LDKPaymentError PaymentError_clone(const struct LDKPaymentError *NONNULL_PTR orig);
19092         export function PaymentError_clone(orig: number): number {
19093                 if(!isWasmInitialized) {
19094                         throw new Error("initializeWasm() must be awaited first!");
19095                 }
19096                 const nativeResponseValue = wasm.PaymentError_clone(orig);
19097                 return nativeResponseValue;
19098         }
19099         // struct LDKPaymentError PaymentError_invoice(struct LDKStr a);
19100         export function PaymentError_invoice(a: String): number {
19101                 if(!isWasmInitialized) {
19102                         throw new Error("initializeWasm() must be awaited first!");
19103                 }
19104                 const nativeResponseValue = wasm.PaymentError_invoice(a);
19105                 return nativeResponseValue;
19106         }
19107         // struct LDKPaymentError PaymentError_routing(struct LDKLightningError a);
19108         export function PaymentError_routing(a: number): number {
19109                 if(!isWasmInitialized) {
19110                         throw new Error("initializeWasm() must be awaited first!");
19111                 }
19112                 const nativeResponseValue = wasm.PaymentError_routing(a);
19113                 return nativeResponseValue;
19114         }
19115         // struct LDKPaymentError PaymentError_sending(struct LDKPaymentSendFailure a);
19116         export function PaymentError_sending(a: number): number {
19117                 if(!isWasmInitialized) {
19118                         throw new Error("initializeWasm() must be awaited first!");
19119                 }
19120                 const nativeResponseValue = wasm.PaymentError_sending(a);
19121                 return nativeResponseValue;
19122         }
19123         // MUST_USE_RES struct LDKInvoicePayer InvoicePayer_new(struct LDKPayer payer, struct LDKRouter router, const struct LDKLockableScore *NONNULL_PTR scorer, struct LDKLogger logger, struct LDKEventHandler event_handler, struct LDKRetryAttempts retry_attempts);
19124         export function InvoicePayer_new(payer: number, router: number, scorer: number, logger: number, event_handler: number, retry_attempts: number): number {
19125                 if(!isWasmInitialized) {
19126                         throw new Error("initializeWasm() must be awaited first!");
19127                 }
19128                 const nativeResponseValue = wasm.InvoicePayer_new(payer, router, scorer, logger, event_handler, retry_attempts);
19129                 return nativeResponseValue;
19130         }
19131         // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_invoice(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const struct LDKInvoice *NONNULL_PTR invoice);
19132         export function InvoicePayer_pay_invoice(this_arg: number, invoice: number): number {
19133                 if(!isWasmInitialized) {
19134                         throw new Error("initializeWasm() must be awaited first!");
19135                 }
19136                 const nativeResponseValue = wasm.InvoicePayer_pay_invoice(this_arg, invoice);
19137                 return nativeResponseValue;
19138         }
19139         // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_zero_value_invoice(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const struct LDKInvoice *NONNULL_PTR invoice, uint64_t amount_msats);
19140         export function InvoicePayer_pay_zero_value_invoice(this_arg: number, invoice: number, amount_msats: number): number {
19141                 if(!isWasmInitialized) {
19142                         throw new Error("initializeWasm() must be awaited first!");
19143                 }
19144                 const nativeResponseValue = wasm.InvoicePayer_pay_zero_value_invoice(this_arg, invoice, amount_msats);
19145                 return nativeResponseValue;
19146         }
19147         // void InvoicePayer_remove_cached_payment(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
19148         export function InvoicePayer_remove_cached_payment(this_arg: number, payment_hash: Uint8Array): void {
19149                 if(!isWasmInitialized) {
19150                         throw new Error("initializeWasm() must be awaited first!");
19151                 }
19152                 const nativeResponseValue = wasm.InvoicePayer_remove_cached_payment(this_arg, encodeArray(payment_hash));
19153                 // debug statements here
19154         }
19155         // struct LDKEventHandler InvoicePayer_as_EventHandler(const struct LDKInvoicePayer *NONNULL_PTR this_arg);
19156         export function InvoicePayer_as_EventHandler(this_arg: number): number {
19157                 if(!isWasmInitialized) {
19158                         throw new Error("initializeWasm() must be awaited first!");
19159                 }
19160                 const nativeResponseValue = wasm.InvoicePayer_as_EventHandler(this_arg);
19161                 return nativeResponseValue;
19162         }
19163         // 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);
19164         export function create_invoice_from_channelmanager(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description: String): number {
19165                 if(!isWasmInitialized) {
19166                         throw new Error("initializeWasm() must be awaited first!");
19167                 }
19168                 const nativeResponseValue = wasm.create_invoice_from_channelmanager(channelmanager, keys_manager, network, amt_msat, description);
19169                 return nativeResponseValue;
19170         }
19171         // void DefaultRouter_free(struct LDKDefaultRouter this_obj);
19172         export function DefaultRouter_free(this_obj: number): void {
19173                 if(!isWasmInitialized) {
19174                         throw new Error("initializeWasm() must be awaited first!");
19175                 }
19176                 const nativeResponseValue = wasm.DefaultRouter_free(this_obj);
19177                 // debug statements here
19178         }
19179         // MUST_USE_RES struct LDKDefaultRouter DefaultRouter_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger);
19180         export function DefaultRouter_new(network_graph: number, logger: number): number {
19181                 if(!isWasmInitialized) {
19182                         throw new Error("initializeWasm() must be awaited first!");
19183                 }
19184                 const nativeResponseValue = wasm.DefaultRouter_new(network_graph, logger);
19185                 return nativeResponseValue;
19186         }
19187         // struct LDKRouter DefaultRouter_as_Router(const struct LDKDefaultRouter *NONNULL_PTR this_arg);
19188         export function DefaultRouter_as_Router(this_arg: number): number {
19189                 if(!isWasmInitialized) {
19190                         throw new Error("initializeWasm() must be awaited first!");
19191                 }
19192                 const nativeResponseValue = wasm.DefaultRouter_as_Router(this_arg);
19193                 return nativeResponseValue;
19194         }
19195         // struct LDKPayer ChannelManager_as_Payer(const struct LDKChannelManager *NONNULL_PTR this_arg);
19196         export function ChannelManager_as_Payer(this_arg: number): number {
19197                 if(!isWasmInitialized) {
19198                         throw new Error("initializeWasm() must be awaited first!");
19199                 }
19200                 const nativeResponseValue = wasm.ChannelManager_as_Payer(this_arg);
19201                 return nativeResponseValue;
19202         }
19203         // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
19204         export function SiPrefix_from_str(s: String): number {
19205                 if(!isWasmInitialized) {
19206                         throw new Error("initializeWasm() must be awaited first!");
19207                 }
19208                 const nativeResponseValue = wasm.SiPrefix_from_str(s);
19209                 return nativeResponseValue;
19210         }
19211         // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
19212         export function Invoice_from_str(s: String): number {
19213                 if(!isWasmInitialized) {
19214                         throw new Error("initializeWasm() must be awaited first!");
19215                 }
19216                 const nativeResponseValue = wasm.Invoice_from_str(s);
19217                 return nativeResponseValue;
19218         }
19219         // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
19220         export function SignedRawInvoice_from_str(s: String): number {
19221                 if(!isWasmInitialized) {
19222                         throw new Error("initializeWasm() must be awaited first!");
19223                 }
19224                 const nativeResponseValue = wasm.SignedRawInvoice_from_str(s);
19225                 return nativeResponseValue;
19226         }
19227         // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
19228         export function Invoice_to_str(o: number): String {
19229                 if(!isWasmInitialized) {
19230                         throw new Error("initializeWasm() must be awaited first!");
19231                 }
19232                 const nativeResponseValue = wasm.Invoice_to_str(o);
19233                 return nativeResponseValue;
19234         }
19235         // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
19236         export function SignedRawInvoice_to_str(o: number): String {
19237                 if(!isWasmInitialized) {
19238                         throw new Error("initializeWasm() must be awaited first!");
19239                 }
19240                 const nativeResponseValue = wasm.SignedRawInvoice_to_str(o);
19241                 return nativeResponseValue;
19242         }
19243         // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
19244         export function Currency_to_str(o: number): String {
19245                 if(!isWasmInitialized) {
19246                         throw new Error("initializeWasm() must be awaited first!");
19247                 }
19248                 const nativeResponseValue = wasm.Currency_to_str(o);
19249                 return nativeResponseValue;
19250         }
19251         // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
19252         export function SiPrefix_to_str(o: number): String {
19253                 if(!isWasmInitialized) {
19254                         throw new Error("initializeWasm() must be awaited first!");
19255                 }
19256                 const nativeResponseValue = wasm.SiPrefix_to_str(o);
19257                 return nativeResponseValue;
19258         }
19259
19260         export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
19261             if(isWasmInitialized && !allowDoubleInitialization) {
19262                 return;
19263             }
19264             const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
19265             wasm = wasmInstance.exports;
19266             isWasmInitialized = true;
19267         }
19268