54dae4ed97068f9bb5da6951a2c6d6ca9753aa4f
[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         public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
156         public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
157         public static native Secp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
158         public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
159         public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
160         public static native Secp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
161         public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
162         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
163         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
164         public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
165         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
166         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
167         public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
168         public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
169         public static native Secp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
170         public static class LDKCOption_u32Z {
171                 private LDKCOption_u32Z() {}
172                 export class Some extends LDKCOption_u32Z {
173                         public number some;
174                         Some(number some) { this.some = some; }
175                 }
176                 export class None extends LDKCOption_u32Z {
177                         None() { }
178                 }
179                 static native void init();
180         }
181         static { LDKCOption_u32Z.init(); }
182         public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
183         public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
184         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
185         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
186         public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
187         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
188         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
189         public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
190         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
191         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
192         public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
193         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
194         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
195         public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
196         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
197         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
198         public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
199         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
200         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
201         public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
202         public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
203         public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
204         public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
205         public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
206         public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
207         public static native boolean LDKCResult_NoneErrorZ_result_ok(long arg);
208         public static native void LDKCResult_NoneErrorZ_get_ok(long arg);
209         public static native IOError LDKCResult_NoneErrorZ_get_err(long arg);
210         public static native boolean LDKCResult_RouteHopDecodeErrorZ_result_ok(long arg);
211         public static native number LDKCResult_RouteHopDecodeErrorZ_get_ok(long arg);
212         public static native number LDKCResult_RouteHopDecodeErrorZ_get_err(long arg);
213         public static native long LDKCVec_RouteHopZ_new(number[] elems);
214         public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
215         public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
216         public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
217         public static class LDKCOption_u64Z {
218                 private LDKCOption_u64Z() {}
219                 export class Some extends LDKCOption_u64Z {
220                         public number some;
221                         Some(number some) { this.some = some; }
222                 }
223                 export class None extends LDKCOption_u64Z {
224                         None() { }
225                 }
226                 static native void init();
227         }
228         static { LDKCOption_u64Z.init(); }
229         public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
230         public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
231         public static native long LDKCVec_RouteHintZ_new(number[] elems);
232         public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
233         public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
234         public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
235         public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
236         public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
237         public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
238         public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
239         public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
240         public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
241         public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
242         public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
243         public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
244         public static native ChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
245         public static class LDKMonitorEvent {
246                 private LDKMonitorEvent() {}
247                 export class HTLCEvent extends LDKMonitorEvent {
248                         public number htlc_event;
249                         HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
250                 }
251                 export class CommitmentTxBroadcasted extends LDKMonitorEvent {
252                         public number commitment_tx_broadcasted;
253                         CommitmentTxBroadcasted(number commitment_tx_broadcasted) { this.commitment_tx_broadcasted = commitment_tx_broadcasted; }
254                 }
255                 static native void init();
256         }
257         static { LDKMonitorEvent.init(); }
258         public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
259         public static native long LDKCVec_MonitorEventZ_new(number[] elems);
260         public static class LDKCOption_C2Tuple_usizeTransactionZZ {
261                 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
262                 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
263                         public number some;
264                         Some(number some) { this.some = some; }
265                 }
266                 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
267                         None() { }
268                 }
269                 static native void init();
270         }
271         static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
272         public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
273         public static class LDKSpendableOutputDescriptor {
274                 private LDKSpendableOutputDescriptor() {}
275                 export class StaticOutput extends LDKSpendableOutputDescriptor {
276                         public number outpoint;
277                         public number output;
278                         StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
279                 }
280                 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
281                         public number delayed_payment_output;
282                         DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
283                 }
284                 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
285                         public number static_payment_output;
286                         StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
287                 }
288                 static native void init();
289         }
290         static { LDKSpendableOutputDescriptor.init(); }
291         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
292         public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
293         public static class LDKErrorAction {
294                 private LDKErrorAction() {}
295                 export class DisconnectPeer extends LDKErrorAction {
296                         public number msg;
297                         DisconnectPeer(number msg) { this.msg = msg; }
298                 }
299                 export class IgnoreError extends LDKErrorAction {
300                         IgnoreError() { }
301                 }
302                 export class SendErrorMessage extends LDKErrorAction {
303                         public number msg;
304                         SendErrorMessage(number msg) { this.msg = msg; }
305                 }
306                 static native void init();
307         }
308         static { LDKErrorAction.init(); }
309         public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
310         public static class LDKHTLCFailChannelUpdate {
311                 private LDKHTLCFailChannelUpdate() {}
312                 export class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
313                         public number msg;
314                         ChannelUpdateMessage(number msg) { this.msg = msg; }
315                 }
316                 export class ChannelClosed extends LDKHTLCFailChannelUpdate {
317                         public number short_channel_id;
318                         public boolean is_permanent;
319                         ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
320                 }
321                 export class NodeFailure extends LDKHTLCFailChannelUpdate {
322                         public Uint8Array node_id;
323                         public boolean is_permanent;
324                         NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
325                 }
326                 static native void init();
327         }
328         static { LDKHTLCFailChannelUpdate.init(); }
329         public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
330         public static class LDKMessageSendEvent {
331                 private LDKMessageSendEvent() {}
332                 export class SendAcceptChannel extends LDKMessageSendEvent {
333                         public Uint8Array node_id;
334                         public number msg;
335                         SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
336                 }
337                 export class SendOpenChannel extends LDKMessageSendEvent {
338                         public Uint8Array node_id;
339                         public number msg;
340                         SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
341                 }
342                 export class SendFundingCreated extends LDKMessageSendEvent {
343                         public Uint8Array node_id;
344                         public number msg;
345                         SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
346                 }
347                 export class SendFundingSigned extends LDKMessageSendEvent {
348                         public Uint8Array node_id;
349                         public number msg;
350                         SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
351                 }
352                 export class SendFundingLocked extends LDKMessageSendEvent {
353                         public Uint8Array node_id;
354                         public number msg;
355                         SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
356                 }
357                 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
358                         public Uint8Array node_id;
359                         public number msg;
360                         SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
361                 }
362                 export class UpdateHTLCs extends LDKMessageSendEvent {
363                         public Uint8Array node_id;
364                         public number updates;
365                         UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
366                 }
367                 export class SendRevokeAndACK extends LDKMessageSendEvent {
368                         public Uint8Array node_id;
369                         public number msg;
370                         SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
371                 }
372                 export class SendClosingSigned extends LDKMessageSendEvent {
373                         public Uint8Array node_id;
374                         public number msg;
375                         SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
376                 }
377                 export class SendShutdown extends LDKMessageSendEvent {
378                         public Uint8Array node_id;
379                         public number msg;
380                         SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
381                 }
382                 export class SendChannelReestablish extends LDKMessageSendEvent {
383                         public Uint8Array node_id;
384                         public number msg;
385                         SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
386                 }
387                 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
388                         public number msg;
389                         public number update_msg;
390                         BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
391                 }
392                 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
393                         public number msg;
394                         BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
395                 }
396                 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
397                         public number msg;
398                         BroadcastChannelUpdate(number msg) { this.msg = msg; }
399                 }
400                 export class HandleError extends LDKMessageSendEvent {
401                         public Uint8Array node_id;
402                         public number action;
403                         HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
404                 }
405                 export class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
406                         public number update;
407                         PaymentFailureNetworkUpdate(number update) { this.update = update; }
408                 }
409                 export class SendChannelRangeQuery extends LDKMessageSendEvent {
410                         public Uint8Array node_id;
411                         public number msg;
412                         SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
413                 }
414                 export class SendShortIdsQuery extends LDKMessageSendEvent {
415                         public Uint8Array node_id;
416                         public number msg;
417                         SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
418                 }
419                 export class SendReplyChannelRange extends LDKMessageSendEvent {
420                         public Uint8Array node_id;
421                         public number msg;
422                         SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
423                 }
424                 static native void init();
425         }
426         static { LDKMessageSendEvent.init(); }
427         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
428         public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
429         public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
430         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
431         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
432         public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
433         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
434         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
435         public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
436         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
437         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
438         public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
439         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
440         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
441         public static native boolean LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
442         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
443         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
444         public static native boolean LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
445         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
446         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
447         public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
448         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
449         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
450         public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
451         public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
452         public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
453         public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
454         public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
455         public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
456         public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
457         public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
458         public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
459
460
461
462 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
463
464                 export interface LDKBaseSign {
465                         get_per_commitment_point (idx: number): Uint8Array;
466                         release_commitment_secret (idx: number): Uint8Array;
467                         channel_keys_id (): Uint8Array;
468                         sign_counterparty_commitment (commitment_tx: number): number;
469                         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
470                         sign_justice_revoked_output (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number;
471                         sign_justice_revoked_htlc (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
472                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
473                         sign_closing_transaction (closing_tx: Uint8Array): number;
474                         sign_channel_announcement (msg: number): number;
475                         ready_channel (channel_parameters: number): void;
476                 }
477
478                 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
479             throw new Error('unimplemented'); // TODO: bind to WASM
480         }
481
482 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
483
484
485         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
486         export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
487                 if(!isWasmInitialized) {
488                         throw new Error("initializeWasm() must be awaited first!");
489                 }
490                 const nativeResponseValue = wasm.BaseSign_get_per_commitment_point(this_arg, idx);
491                 return decodeArray(nativeResponseValue);
492         }
493         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
494         export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
495                 if(!isWasmInitialized) {
496                         throw new Error("initializeWasm() must be awaited first!");
497                 }
498                 const nativeResponseValue = wasm.BaseSign_release_commitment_secret(this_arg, idx);
499                 return decodeArray(nativeResponseValue);
500         }
501         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
502         export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
503                 if(!isWasmInitialized) {
504                         throw new Error("initializeWasm() must be awaited first!");
505                 }
506                 const nativeResponseValue = wasm.BaseSign_channel_keys_id(this_arg);
507                 return decodeArray(nativeResponseValue);
508         }
509         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
510         export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
511                 if(!isWasmInitialized) {
512                         throw new Error("initializeWasm() must be awaited first!");
513                 }
514                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
515                 return nativeResponseValue;
516         }
517         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
518         export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
519                 if(!isWasmInitialized) {
520                         throw new Error("initializeWasm() must be awaited first!");
521                 }
522                 const nativeResponseValue = wasm.BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
523                 return nativeResponseValue;
524         }
525         // 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]
526         export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number {
527                 if(!isWasmInitialized) {
528                         throw new Error("initializeWasm() must be awaited first!");
529                 }
530                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_output(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key));
531                 return nativeResponseValue;
532         }
533         // 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
534         export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
535                 if(!isWasmInitialized) {
536                         throw new Error("initializeWasm() must be awaited first!");
537                 }
538                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_htlc(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
539                 return nativeResponseValue;
540         }
541         // 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
542         export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
543                 if(!isWasmInitialized) {
544                         throw new Error("initializeWasm() must be awaited first!");
545                 }
546                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
547                 return nativeResponseValue;
548         }
549         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
550         export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
551                 if(!isWasmInitialized) {
552                         throw new Error("initializeWasm() must be awaited first!");
553                 }
554                 const nativeResponseValue = wasm.BaseSign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
555                 return nativeResponseValue;
556         }
557         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
558         export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
559                 if(!isWasmInitialized) {
560                         throw new Error("initializeWasm() must be awaited first!");
561                 }
562                 const nativeResponseValue = wasm.BaseSign_sign_channel_announcement(this_arg, msg);
563                 return nativeResponseValue;
564         }
565         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
566         export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
567                 if(!isWasmInitialized) {
568                         throw new Error("initializeWasm() must be awaited first!");
569                 }
570                 const nativeResponseValue = wasm.BaseSign_ready_channel(this_arg, channel_parameters);
571                 // debug statements here
572         }
573         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
574         export function BaseSign_get_pubkeys(this_arg: number): number {
575                 if(!isWasmInitialized) {
576                         throw new Error("initializeWasm() must be awaited first!");
577                 }
578                 const nativeResponseValue = wasm.BaseSign_get_pubkeys(this_arg);
579                 return nativeResponseValue;
580         }
581
582
583
584 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
585
586                 export interface LDKSign {
587                         write (): Uint8Array;
588                 }
589
590                 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
591             throw new Error('unimplemented'); // TODO: bind to WASM
592         }
593
594 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
595
596
597         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
598         export function Sign_write(this_arg: number): Uint8Array {
599                 if(!isWasmInitialized) {
600                         throw new Error("initializeWasm() must be awaited first!");
601                 }
602                 const nativeResponseValue = wasm.Sign_write(this_arg);
603                 return decodeArray(nativeResponseValue);
604         }
605         public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
606         public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
607         public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
608         public static native boolean LDKCResult_RecoverableSignatureNoneZ_result_ok(long arg);
609         public static native Uint8Array LDKCResult_RecoverableSignatureNoneZ_get_ok(long arg);
610         public static native void LDKCResult_RecoverableSignatureNoneZ_get_err(long arg);
611         public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
612         public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
613         public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
614         public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
615         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
616         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
617         public static native long LDKCVec_TxOutZ_new(number[] elems);
618         public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
619         public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
620         public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
621         public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
622         public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
623         public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
624         public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(number[] elems);
625         public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
626         public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
627         public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
628         public static class LDKAPIError {
629                 private LDKAPIError() {}
630                 export class APIMisuseError extends LDKAPIError {
631                         public String err;
632                         APIMisuseError(String err) { this.err = err; }
633                 }
634                 export class FeeRateTooHigh extends LDKAPIError {
635                         public String err;
636                         public number feerate;
637                         FeeRateTooHigh(String err, number feerate) { this.err = err; this.feerate = feerate; }
638                 }
639                 export class RouteError extends LDKAPIError {
640                         public String err;
641                         RouteError(String err) { this.err = err; }
642                 }
643                 export class ChannelUnavailable extends LDKAPIError {
644                         public String err;
645                         ChannelUnavailable(String err) { this.err = err; }
646                 }
647                 export class MonitorUpdateFailed extends LDKAPIError {
648                         MonitorUpdateFailed() { }
649                 }
650                 static native void init();
651         }
652         static { LDKAPIError.init(); }
653         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
654         public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
655         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
656         public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
657         public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
658         public static native long LDKCVec_APIErrorZ_new(number[] elems);
659         public static class LDKPaymentSendFailure {
660                 private LDKPaymentSendFailure() {}
661                 export class ParameterError extends LDKPaymentSendFailure {
662                         public number parameter_error;
663                         ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
664                 }
665                 export class PathParameterError extends LDKPaymentSendFailure {
666                         public number[] path_parameter_error;
667                         PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
668                 }
669                 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
670                         public number[] all_failed_retry_safe;
671                         AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
672                 }
673                 export class PartialFailure extends LDKPaymentSendFailure {
674                         public number[] partial_failure;
675                         PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
676                 }
677                 static native void init();
678         }
679         static { LDKPaymentSendFailure.init(); }
680         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
681         public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
682         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
683         public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
684         public static class LDKNetAddress {
685                 private LDKNetAddress() {}
686                 export class IPv4 extends LDKNetAddress {
687                         public Uint8Array addr;
688                         public number port;
689                         IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
690                 }
691                 export class IPv6 extends LDKNetAddress {
692                         public Uint8Array addr;
693                         public number port;
694                         IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
695                 }
696                 export class OnionV2 extends LDKNetAddress {
697                         public Uint8Array addr;
698                         public number port;
699                         OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
700                 }
701                 export class OnionV3 extends LDKNetAddress {
702                         public Uint8Array ed25519_pubkey;
703                         public number checksum;
704                         public number version;
705                         public number port;
706                         OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
707                 }
708                 static native void init();
709         }
710         static { LDKNetAddress.init(); }
711         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
712         public static native long LDKCVec_NetAddressZ_new(number[] elems);
713         public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(Uint8Array a, Uint8Array b);
714         public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(long ptr);
715         public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(long ptr);
716         public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
717         public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
718         public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
719         public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
720
721
722
723 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
724
725                 export interface LDKWatch {
726                         watch_channel (funding_txo: number, monitor: number): number;
727                         update_channel (funding_txo: number, update: number): number;
728                         release_pending_monitor_events (): number[];
729                 }
730
731                 export function LDKWatch_new(impl: LDKWatch): number {
732             throw new Error('unimplemented'); // TODO: bind to WASM
733         }
734
735 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
736
737
738         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
739         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
740                 if(!isWasmInitialized) {
741                         throw new Error("initializeWasm() must be awaited first!");
742                 }
743                 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
744                 return nativeResponseValue;
745         }
746         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
747         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
748                 if(!isWasmInitialized) {
749                         throw new Error("initializeWasm() must be awaited first!");
750                 }
751                 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
752                 return nativeResponseValue;
753         }
754         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
755         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
756                 if(!isWasmInitialized) {
757                         throw new Error("initializeWasm() must be awaited first!");
758                 }
759                 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
760                 return nativeResponseValue;
761         }
762
763
764
765 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
766
767                 export interface LDKBroadcasterInterface {
768                         broadcast_transaction (tx: Uint8Array): void;
769                 }
770
771                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
772             throw new Error('unimplemented'); // TODO: bind to WASM
773         }
774
775 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
776
777
778         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
779         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
780                 if(!isWasmInitialized) {
781                         throw new Error("initializeWasm() must be awaited first!");
782                 }
783                 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
784                 // debug statements here
785         }
786
787
788
789 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
790
791                 export interface LDKKeysInterface {
792                         get_node_secret (): Uint8Array;
793                         get_destination_script (): Uint8Array;
794                         get_shutdown_pubkey (): Uint8Array;
795                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
796                         get_secure_random_bytes (): Uint8Array;
797                         read_chan_signer (reader: Uint8Array): number;
798                         sign_invoice (invoice_preimage: Uint8Array): number;
799                 }
800
801                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
802             throw new Error('unimplemented'); // TODO: bind to WASM
803         }
804
805 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
806
807
808         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
809         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
810                 if(!isWasmInitialized) {
811                         throw new Error("initializeWasm() must be awaited first!");
812                 }
813                 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
814                 return decodeArray(nativeResponseValue);
815         }
816         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
817         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
818                 if(!isWasmInitialized) {
819                         throw new Error("initializeWasm() must be awaited first!");
820                 }
821                 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
822                 return decodeArray(nativeResponseValue);
823         }
824         // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
825         export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
826                 if(!isWasmInitialized) {
827                         throw new Error("initializeWasm() must be awaited first!");
828                 }
829                 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
830                 return decodeArray(nativeResponseValue);
831         }
832         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
833         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
834                 if(!isWasmInitialized) {
835                         throw new Error("initializeWasm() must be awaited first!");
836                 }
837                 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
838                 return nativeResponseValue;
839         }
840         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
841         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
842                 if(!isWasmInitialized) {
843                         throw new Error("initializeWasm() must be awaited first!");
844                 }
845                 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
846                 return decodeArray(nativeResponseValue);
847         }
848         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
849         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
850                 if(!isWasmInitialized) {
851                         throw new Error("initializeWasm() must be awaited first!");
852                 }
853                 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
854                 return nativeResponseValue;
855         }
856         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
857         export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
858                 if(!isWasmInitialized) {
859                         throw new Error("initializeWasm() must be awaited first!");
860                 }
861                 const nativeResponseValue = wasm.KeysInterface_sign_invoice(this_arg, encodeArray(invoice_preimage));
862                 return nativeResponseValue;
863         }
864
865
866
867 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
868
869                 export interface LDKFeeEstimator {
870                         get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
871                 }
872
873                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
874             throw new Error('unimplemented'); // TODO: bind to WASM
875         }
876
877 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
878
879
880         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
881         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
882                 if(!isWasmInitialized) {
883                         throw new Error("initializeWasm() must be awaited first!");
884                 }
885                 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
886                 return nativeResponseValue;
887         }
888
889
890
891 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
892
893                 export interface LDKLogger {
894                         log (record: String): void;
895                 }
896
897                 export function LDKLogger_new(impl: LDKLogger): number {
898             throw new Error('unimplemented'); // TODO: bind to WASM
899         }
900
901 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
902
903
904         public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
905         public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
906         public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
907         public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
908         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
909         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
910         public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
911         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
912         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
913         public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
914         public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
915         public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
916         public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
917         public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
918         public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
919         public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
920         public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
921         public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
922         public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
923         public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
924         public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
925         public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(number a, Uint8Array b, number c);
926         public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long ptr);
927         public static native Uint8Array LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long ptr);
928         public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long ptr);
929         public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
930         public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
931         public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
932         public static native long LDKCVec_PrivateRouteZ_new(number[] elems);
933         public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
934         public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
935         public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
936         public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
937         public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
938         public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
939         public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
940         public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
941         public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
942         public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
943         public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
944         public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
945         public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
946         public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
947         public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
948         public static native boolean LDKCResult_PrivateRouteCreationErrorZ_result_ok(long arg);
949         public static native number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
950         public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
951         public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
952         public static native String LDKCResult_StringErrorZ_get_ok(long arg);
953         public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
954         public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
955         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
956         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
957         public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
958         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
959         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
960         public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
961         public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
962         public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
963         public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
964         public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
965         public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
966         public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
967         public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
968         public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
969         public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
970         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
971         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
972         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
973         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
974         public static class LDKEvent {
975                 private LDKEvent() {}
976                 export class FundingGenerationReady extends LDKEvent {
977                         public Uint8Array temporary_channel_id;
978                         public number channel_value_satoshis;
979                         public Uint8Array output_script;
980                         public number user_channel_id;
981                         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; }
982                 }
983                 export class PaymentReceived extends LDKEvent {
984                         public Uint8Array payment_hash;
985                         public Uint8Array payment_preimage;
986                         public Uint8Array payment_secret;
987                         public number amt;
988                         public number user_payment_id;
989                         PaymentReceived(Uint8Array payment_hash, Uint8Array payment_preimage, Uint8Array payment_secret, number amt, number user_payment_id) { this.payment_hash = payment_hash; this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.amt = amt; this.user_payment_id = user_payment_id; }
990                 }
991                 export class PaymentSent extends LDKEvent {
992                         public Uint8Array payment_preimage;
993                         PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
994                 }
995                 export class PaymentFailed extends LDKEvent {
996                         public Uint8Array payment_hash;
997                         public boolean rejected_by_dest;
998                         PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
999                 }
1000                 export class PendingHTLCsForwardable extends LDKEvent {
1001                         public number time_forwardable;
1002                         PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
1003                 }
1004                 export class SpendableOutputs extends LDKEvent {
1005                         public number[] outputs;
1006                         SpendableOutputs(number[] outputs) { this.outputs = outputs; }
1007                 }
1008                 static native void init();
1009         }
1010         static { LDKEvent.init(); }
1011         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
1012         public static native long LDKCVec_EventZ_new(number[] elems);
1013         public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
1014         public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
1015         public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
1016         public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
1017         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
1018         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
1019         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
1020         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
1021         public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
1022         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
1023         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
1024         public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
1025         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
1026         public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
1027         public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
1028         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
1029         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
1030         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
1031         public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
1032         public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
1033         public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
1034         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
1035         public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
1036         public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
1037         public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
1038         public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
1039         public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
1040         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
1041         public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
1042         public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
1043         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
1044         public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
1045         public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
1046         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
1047         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
1048         public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
1049         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
1050         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
1051         public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
1052         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
1053         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
1054         public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
1055         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
1056         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
1057         public static native long LDKCVec_u64Z_new(number[] elems);
1058         public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
1059         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
1060         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
1061         public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
1062         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
1063         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
1064         public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
1065         public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
1066         public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
1067         public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
1068         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
1069         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
1070         public static native boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
1071         public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
1072         public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
1073         public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
1074         public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
1075         public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
1076         public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
1077         public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
1078         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
1079         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
1080         public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
1081         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
1082         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
1083         public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
1084         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
1085         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
1086         public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
1087         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
1088         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
1089         public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
1090         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
1091         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
1092         public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
1093         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
1094         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
1095         public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
1096         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1097         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1098         public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
1099         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1100         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1101         public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
1102         public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1103         public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
1104         public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
1105         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1106         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1107         public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
1108         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1109         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1110         public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
1111         public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1112         public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1113         public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
1114         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1115         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1116         public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
1117         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1118         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1119         public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
1120         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1121         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1122         public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
1123         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1124         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1125         public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
1126         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1127         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1128         public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
1129         public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1130         public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
1131         public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
1132         public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1133         public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
1134         public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1135         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1136         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1137         public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1138         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1139         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1140         public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
1141         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1142         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1143         public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
1144         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1145         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1146         public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
1147         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1148         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1149         public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1150         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1151         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1152         public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1153         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1154         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1155         public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1156         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1157         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1158         public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1159         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1160         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1161         public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1162         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1163         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1164         public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1165         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1166         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1167         public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1168         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1169         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1170         public static class LDKSignOrCreationError {
1171                 private LDKSignOrCreationError() {}
1172                 export class SignError extends LDKSignOrCreationError {
1173                         SignError() { }
1174                 }
1175                 export class CreationError extends LDKSignOrCreationError {
1176                         public CreationError creation_error;
1177                         CreationError(CreationError creation_error) { this.creation_error = creation_error; }
1178                 }
1179                 static native void init();
1180         }
1181         static { LDKSignOrCreationError.init(); }
1182         public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1183         public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
1184         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
1185         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
1186
1187
1188
1189 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1190
1191                 export interface LDKMessageSendEventsProvider {
1192                         get_and_clear_pending_msg_events (): number[];
1193                 }
1194
1195                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1196             throw new Error('unimplemented'); // TODO: bind to WASM
1197         }
1198
1199 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1200
1201
1202         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1203         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1204                 if(!isWasmInitialized) {
1205                         throw new Error("initializeWasm() must be awaited first!");
1206                 }
1207                 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1208                 return nativeResponseValue;
1209         }
1210
1211
1212
1213 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1214
1215                 export interface LDKEventHandler {
1216                         handle_event (event: number): void;
1217                 }
1218
1219                 export function LDKEventHandler_new(impl: LDKEventHandler): number {
1220             throw new Error('unimplemented'); // TODO: bind to WASM
1221         }
1222
1223 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1224
1225
1226         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, struct LDKEvent event
1227         export function EventHandler_handle_event(this_arg: number, event: number): void {
1228                 if(!isWasmInitialized) {
1229                         throw new Error("initializeWasm() must be awaited first!");
1230                 }
1231                 const nativeResponseValue = wasm.EventHandler_handle_event(this_arg, event);
1232                 // debug statements here
1233         }
1234
1235
1236
1237 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1238
1239                 export interface LDKEventsProvider {
1240                         process_pending_events (handler: number): void;
1241                 }
1242
1243                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1244             throw new Error('unimplemented'); // TODO: bind to WASM
1245         }
1246
1247 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1248
1249
1250         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1251         export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
1252                 if(!isWasmInitialized) {
1253                         throw new Error("initializeWasm() must be awaited first!");
1254                 }
1255                 const nativeResponseValue = wasm.EventsProvider_process_pending_events(this_arg, handler);
1256                 // debug statements here
1257         }
1258
1259
1260
1261 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1262
1263                 export interface LDKAccess {
1264                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1265                 }
1266
1267                 export function LDKAccess_new(impl: LDKAccess): number {
1268             throw new Error('unimplemented'); // TODO: bind to WASM
1269         }
1270
1271 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1272
1273
1274         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1275         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1276                 if(!isWasmInitialized) {
1277                         throw new Error("initializeWasm() must be awaited first!");
1278                 }
1279                 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1280                 return nativeResponseValue;
1281         }
1282
1283
1284
1285 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1286
1287                 export interface LDKListen {
1288                         block_connected (block: Uint8Array, height: number): void;
1289                         block_disconnected (header: Uint8Array, height: number): void;
1290                 }
1291
1292                 export function LDKListen_new(impl: LDKListen): number {
1293             throw new Error('unimplemented'); // TODO: bind to WASM
1294         }
1295
1296 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1297
1298
1299         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1300         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1301                 if(!isWasmInitialized) {
1302                         throw new Error("initializeWasm() must be awaited first!");
1303                 }
1304                 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1305                 // debug statements here
1306         }
1307         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1308         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1309                 if(!isWasmInitialized) {
1310                         throw new Error("initializeWasm() must be awaited first!");
1311                 }
1312                 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1313                 // debug statements here
1314         }
1315
1316
1317
1318 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1319
1320                 export interface LDKConfirm {
1321                         transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
1322                         transaction_unconfirmed (txid: Uint8Array): void;
1323                         best_block_updated (header: Uint8Array, height: number): void;
1324                         get_relevant_txids (): Uint8Array[];
1325                 }
1326
1327                 export function LDKConfirm_new(impl: LDKConfirm): number {
1328             throw new Error('unimplemented'); // TODO: bind to WASM
1329         }
1330
1331 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1332
1333
1334         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1335         export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
1336                 if(!isWasmInitialized) {
1337                         throw new Error("initializeWasm() must be awaited first!");
1338                 }
1339                 const nativeResponseValue = wasm.Confirm_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
1340                 // debug statements here
1341         }
1342         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1343         export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
1344                 if(!isWasmInitialized) {
1345                         throw new Error("initializeWasm() must be awaited first!");
1346                 }
1347                 const nativeResponseValue = wasm.Confirm_transaction_unconfirmed(this_arg, encodeArray(txid));
1348                 // debug statements here
1349         }
1350         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1351         export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
1352                 if(!isWasmInitialized) {
1353                         throw new Error("initializeWasm() must be awaited first!");
1354                 }
1355                 const nativeResponseValue = wasm.Confirm_best_block_updated(this_arg, encodeArray(header), height);
1356                 // debug statements here
1357         }
1358         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1359         export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
1360                 if(!isWasmInitialized) {
1361                         throw new Error("initializeWasm() must be awaited first!");
1362                 }
1363                 const nativeResponseValue = wasm.Confirm_get_relevant_txids(this_arg);
1364                 return nativeResponseValue;
1365         }
1366
1367
1368
1369 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1370
1371                 export interface LDKFilter {
1372                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1373                         register_output (output: number): number;
1374                 }
1375
1376                 export function LDKFilter_new(impl: LDKFilter): number {
1377             throw new Error('unimplemented'); // TODO: bind to WASM
1378         }
1379
1380 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1381
1382
1383         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1384         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1385                 if(!isWasmInitialized) {
1386                         throw new Error("initializeWasm() must be awaited first!");
1387                 }
1388                 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1389                 // debug statements here
1390         }
1391         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1392         export function Filter_register_output(this_arg: number, output: number): number {
1393                 if(!isWasmInitialized) {
1394                         throw new Error("initializeWasm() must be awaited first!");
1395                 }
1396                 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1397                 return nativeResponseValue;
1398         }
1399
1400
1401
1402 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1403
1404                 export interface LDKPersist {
1405                         persist_new_channel (id: number, data: number): number;
1406                         update_persisted_channel (id: number, update: number, data: number): number;
1407                 }
1408
1409                 export function LDKPersist_new(impl: LDKPersist): number {
1410             throw new Error('unimplemented'); // TODO: bind to WASM
1411         }
1412
1413 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1414
1415
1416         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1417         export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1418                 if(!isWasmInitialized) {
1419                         throw new Error("initializeWasm() must be awaited first!");
1420                 }
1421                 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1422                 return nativeResponseValue;
1423         }
1424         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
1425         export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1426                 if(!isWasmInitialized) {
1427                         throw new Error("initializeWasm() must be awaited first!");
1428                 }
1429                 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1430                 return nativeResponseValue;
1431         }
1432
1433
1434
1435 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1436
1437                 export interface LDKChannelMessageHandler {
1438                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1439                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1440                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1441                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1442                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1443                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1444                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1445                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1446                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1447                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1448                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1449                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1450                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1451                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1452                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1453                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1454                         peer_connected (their_node_id: Uint8Array, msg: number): void;
1455                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1456                         handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1457                         handle_error (their_node_id: Uint8Array, msg: number): void;
1458                 }
1459
1460                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1461             throw new Error('unimplemented'); // TODO: bind to WASM
1462         }
1463
1464 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1465
1466
1467         // 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
1468         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1469                 if(!isWasmInitialized) {
1470                         throw new Error("initializeWasm() must be awaited first!");
1471                 }
1472                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1473                 // debug statements here
1474         }
1475         // 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
1476         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1477                 if(!isWasmInitialized) {
1478                         throw new Error("initializeWasm() must be awaited first!");
1479                 }
1480                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1481                 // debug statements here
1482         }
1483         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1484         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1485                 if(!isWasmInitialized) {
1486                         throw new Error("initializeWasm() must be awaited first!");
1487                 }
1488                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1489                 // debug statements here
1490         }
1491         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1492         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1493                 if(!isWasmInitialized) {
1494                         throw new Error("initializeWasm() must be awaited first!");
1495                 }
1496                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1497                 // debug statements here
1498         }
1499         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1500         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1501                 if(!isWasmInitialized) {
1502                         throw new Error("initializeWasm() must be awaited first!");
1503                 }
1504                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1505                 // debug statements here
1506         }
1507         // 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
1508         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1509                 if(!isWasmInitialized) {
1510                         throw new Error("initializeWasm() must be awaited first!");
1511                 }
1512                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1513                 // debug statements here
1514         }
1515         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1516         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1517                 if(!isWasmInitialized) {
1518                         throw new Error("initializeWasm() must be awaited first!");
1519                 }
1520                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1521                 // debug statements here
1522         }
1523         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1524         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1525                 if(!isWasmInitialized) {
1526                         throw new Error("initializeWasm() must be awaited first!");
1527                 }
1528                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1529                 // debug statements here
1530         }
1531         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1532         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1533                 if(!isWasmInitialized) {
1534                         throw new Error("initializeWasm() must be awaited first!");
1535                 }
1536                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1537                 // debug statements here
1538         }
1539         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1540         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1541                 if(!isWasmInitialized) {
1542                         throw new Error("initializeWasm() must be awaited first!");
1543                 }
1544                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1545                 // debug statements here
1546         }
1547         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1548         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1549                 if(!isWasmInitialized) {
1550                         throw new Error("initializeWasm() must be awaited first!");
1551                 }
1552                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1553                 // debug statements here
1554         }
1555         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1556         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1557                 if(!isWasmInitialized) {
1558                         throw new Error("initializeWasm() must be awaited first!");
1559                 }
1560                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1561                 // debug statements here
1562         }
1563         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1564         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1565                 if(!isWasmInitialized) {
1566                         throw new Error("initializeWasm() must be awaited first!");
1567                 }
1568                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1569                 // debug statements here
1570         }
1571         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1572         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1573                 if(!isWasmInitialized) {
1574                         throw new Error("initializeWasm() must be awaited first!");
1575                 }
1576                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1577                 // debug statements here
1578         }
1579         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1580         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1581                 if(!isWasmInitialized) {
1582                         throw new Error("initializeWasm() must be awaited first!");
1583                 }
1584                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1585                 // debug statements here
1586         }
1587         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1588         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1589                 if(!isWasmInitialized) {
1590                         throw new Error("initializeWasm() must be awaited first!");
1591                 }
1592                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1593                 // debug statements here
1594         }
1595         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1596         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1597                 if(!isWasmInitialized) {
1598                         throw new Error("initializeWasm() must be awaited first!");
1599                 }
1600                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1601                 // debug statements here
1602         }
1603         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1604         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1605                 if(!isWasmInitialized) {
1606                         throw new Error("initializeWasm() must be awaited first!");
1607                 }
1608                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1609                 // debug statements here
1610         }
1611         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
1612         export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1613                 if(!isWasmInitialized) {
1614                         throw new Error("initializeWasm() must be awaited first!");
1615                 }
1616                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
1617                 // debug statements here
1618         }
1619         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1620         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1621                 if(!isWasmInitialized) {
1622                         throw new Error("initializeWasm() must be awaited first!");
1623                 }
1624                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1625                 // debug statements here
1626         }
1627
1628
1629
1630 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1631
1632                 export interface LDKRoutingMessageHandler {
1633                         handle_node_announcement (msg: number): number;
1634                         handle_channel_announcement (msg: number): number;
1635                         handle_channel_update (msg: number): number;
1636                         handle_htlc_fail_channel_update (update: number): void;
1637                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1638                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1639                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
1640                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1641                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1642                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1643                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1644                 }
1645
1646                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1647             throw new Error('unimplemented'); // TODO: bind to WASM
1648         }
1649
1650 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1651
1652
1653         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1654         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1655                 if(!isWasmInitialized) {
1656                         throw new Error("initializeWasm() must be awaited first!");
1657                 }
1658                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1659                 return nativeResponseValue;
1660         }
1661         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1662         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1663                 if(!isWasmInitialized) {
1664                         throw new Error("initializeWasm() must be awaited first!");
1665                 }
1666                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1667                 return nativeResponseValue;
1668         }
1669         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1670         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1671                 if(!isWasmInitialized) {
1672                         throw new Error("initializeWasm() must be awaited first!");
1673                 }
1674                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1675                 return nativeResponseValue;
1676         }
1677         // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1678         export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1679                 if(!isWasmInitialized) {
1680                         throw new Error("initializeWasm() must be awaited first!");
1681                 }
1682                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1683                 // debug statements here
1684         }
1685         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1686         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1687                 if(!isWasmInitialized) {
1688                         throw new Error("initializeWasm() must be awaited first!");
1689                 }
1690                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1691                 return nativeResponseValue;
1692         }
1693         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1694         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1695                 if(!isWasmInitialized) {
1696                         throw new Error("initializeWasm() must be awaited first!");
1697                 }
1698                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1699                 return nativeResponseValue;
1700         }
1701         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1702         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1703                 if(!isWasmInitialized) {
1704                         throw new Error("initializeWasm() must be awaited first!");
1705                 }
1706                 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1707                 // debug statements here
1708         }
1709         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1710         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1711                 if(!isWasmInitialized) {
1712                         throw new Error("initializeWasm() must be awaited first!");
1713                 }
1714                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1715                 return nativeResponseValue;
1716         }
1717         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1718         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1719                 if(!isWasmInitialized) {
1720                         throw new Error("initializeWasm() must be awaited first!");
1721                 }
1722                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1723                 return nativeResponseValue;
1724         }
1725         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1726         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1727                 if(!isWasmInitialized) {
1728                         throw new Error("initializeWasm() must be awaited first!");
1729                 }
1730                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1731                 return nativeResponseValue;
1732         }
1733         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1734         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1735                 if(!isWasmInitialized) {
1736                         throw new Error("initializeWasm() must be awaited first!");
1737                 }
1738                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1739                 return nativeResponseValue;
1740         }
1741
1742
1743
1744 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1745
1746                 export interface LDKSocketDescriptor {
1747                         send_data (data: Uint8Array, resume_read: boolean): number;
1748                         disconnect_socket (): void;
1749                         eq (other_arg: number): boolean;
1750                         hash (): number;
1751                 }
1752
1753                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1754             throw new Error('unimplemented'); // TODO: bind to WASM
1755         }
1756
1757 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1758
1759
1760         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1761         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1762                 if(!isWasmInitialized) {
1763                         throw new Error("initializeWasm() must be awaited first!");
1764                 }
1765                 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1766                 return nativeResponseValue;
1767         }
1768         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1769         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1770                 if(!isWasmInitialized) {
1771                         throw new Error("initializeWasm() must be awaited first!");
1772                 }
1773                 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1774                 // debug statements here
1775         }
1776         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1777         export function SocketDescriptor_hash(this_arg: number): number {
1778                 if(!isWasmInitialized) {
1779                         throw new Error("initializeWasm() must be awaited first!");
1780                 }
1781                 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1782                 return nativeResponseValue;
1783         }
1784
1785
1786
1787 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1788
1789                 export interface LDKChannelManagerPersister {
1790                         persist_manager (channel_manager: number): number;
1791                 }
1792
1793                 export function LDKChannelManagerPersister_new(impl: LDKChannelManagerPersister): number {
1794             throw new Error('unimplemented'); // TODO: bind to WASM
1795         }
1796
1797 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1798
1799
1800         // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
1801         export function ChannelManagerPersister_persist_manager(this_arg: number, channel_manager: number): number {
1802                 if(!isWasmInitialized) {
1803                         throw new Error("initializeWasm() must be awaited first!");
1804                 }
1805                 const nativeResponseValue = wasm.ChannelManagerPersister_persist_manager(this_arg, channel_manager);
1806                 return nativeResponseValue;
1807         }
1808         public static class LDKFallback {
1809                 private LDKFallback() {}
1810                 export class SegWitProgram extends LDKFallback {
1811                         public number version;
1812                         public Uint8Array program;
1813                         SegWitProgram(number version, Uint8Array program) { this.version = version; this.program = program; }
1814                 }
1815                 export class PubKeyHash extends LDKFallback {
1816                         public Uint8Array pub_key_hash;
1817                         PubKeyHash(Uint8Array pub_key_hash) { this.pub_key_hash = pub_key_hash; }
1818                 }
1819                 export class ScriptHash extends LDKFallback {
1820                         public Uint8Array script_hash;
1821                         ScriptHash(Uint8Array script_hash) { this.script_hash = script_hash; }
1822                 }
1823                 static native void init();
1824         }
1825         static { LDKFallback.init(); }
1826         public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
1827         // struct LDKStr _ldk_get_compiled_version(void);
1828         export function _ldk_get_compiled_version(): String {
1829                 if(!isWasmInitialized) {
1830                         throw new Error("initializeWasm() must be awaited first!");
1831                 }
1832                 const nativeResponseValue = wasm._ldk_get_compiled_version();
1833                 return nativeResponseValue;
1834         }
1835         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
1836         export function _ldk_c_bindings_get_compiled_version(): String {
1837                 if(!isWasmInitialized) {
1838                         throw new Error("initializeWasm() must be awaited first!");
1839                 }
1840                 const nativeResponseValue = wasm._ldk_c_bindings_get_compiled_version();
1841                 return nativeResponseValue;
1842         }
1843         // void Transaction_free(struct LDKTransaction _res);
1844         export function Transaction_free(_res: Uint8Array): void {
1845                 if(!isWasmInitialized) {
1846                         throw new Error("initializeWasm() must be awaited first!");
1847                 }
1848                 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1849                 // debug statements here
1850         }
1851         // void TxOut_free(struct LDKTxOut _res);
1852         export function TxOut_free(_res: number): void {
1853                 if(!isWasmInitialized) {
1854                         throw new Error("initializeWasm() must be awaited first!");
1855                 }
1856                 const nativeResponseValue = wasm.TxOut_free(_res);
1857                 // debug statements here
1858         }
1859         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1860         export function TxOut_clone(orig: number): number {
1861                 if(!isWasmInitialized) {
1862                         throw new Error("initializeWasm() must be awaited first!");
1863                 }
1864                 const nativeResponseValue = wasm.TxOut_clone(orig);
1865                 return nativeResponseValue;
1866         }
1867         // void Str_free(struct LDKStr _res);
1868         export function Str_free(_res: String): void {
1869                 if(!isWasmInitialized) {
1870                         throw new Error("initializeWasm() must be awaited first!");
1871                 }
1872                 const nativeResponseValue = wasm.Str_free(_res);
1873                 // debug statements here
1874         }
1875         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1876         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1877                 if(!isWasmInitialized) {
1878                         throw new Error("initializeWasm() must be awaited first!");
1879                 }
1880                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1881                 return nativeResponseValue;
1882         }
1883         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1884         export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
1885                 if(!isWasmInitialized) {
1886                         throw new Error("initializeWasm() must be awaited first!");
1887                 }
1888                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1889                 return nativeResponseValue;
1890         }
1891         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1892         export function CResult_SecretKeyErrorZ_free(_res: number): void {
1893                 if(!isWasmInitialized) {
1894                         throw new Error("initializeWasm() must be awaited first!");
1895                 }
1896                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1897                 // debug statements here
1898         }
1899         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1900         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1901                 if(!isWasmInitialized) {
1902                         throw new Error("initializeWasm() must be awaited first!");
1903                 }
1904                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1905                 return nativeResponseValue;
1906         }
1907         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1908         export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
1909                 if(!isWasmInitialized) {
1910                         throw new Error("initializeWasm() must be awaited first!");
1911                 }
1912                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1913                 return nativeResponseValue;
1914         }
1915         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1916         export function CResult_PublicKeyErrorZ_free(_res: number): void {
1917                 if(!isWasmInitialized) {
1918                         throw new Error("initializeWasm() must be awaited first!");
1919                 }
1920                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
1921                 // debug statements here
1922         }
1923         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
1924         export function CResult_PublicKeyErrorZ_clone(orig: number): number {
1925                 if(!isWasmInitialized) {
1926                         throw new Error("initializeWasm() must be awaited first!");
1927                 }
1928                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
1929                 return nativeResponseValue;
1930         }
1931         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1932         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
1933                 if(!isWasmInitialized) {
1934                         throw new Error("initializeWasm() must be awaited first!");
1935                 }
1936                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
1937                 return nativeResponseValue;
1938         }
1939         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1940         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
1941                 if(!isWasmInitialized) {
1942                         throw new Error("initializeWasm() must be awaited first!");
1943                 }
1944                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
1945                 return nativeResponseValue;
1946         }
1947         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1948         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
1949                 if(!isWasmInitialized) {
1950                         throw new Error("initializeWasm() must be awaited first!");
1951                 }
1952                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
1953                 // debug statements here
1954         }
1955         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1956         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
1957                 if(!isWasmInitialized) {
1958                         throw new Error("initializeWasm() must be awaited first!");
1959                 }
1960                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
1961                 return nativeResponseValue;
1962         }
1963         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1964         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
1965                 if(!isWasmInitialized) {
1966                         throw new Error("initializeWasm() must be awaited first!");
1967                 }
1968                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
1969                 return nativeResponseValue;
1970         }
1971         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1972         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
1973                 if(!isWasmInitialized) {
1974                         throw new Error("initializeWasm() must be awaited first!");
1975                 }
1976                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
1977                 return nativeResponseValue;
1978         }
1979         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
1980         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
1981                 if(!isWasmInitialized) {
1982                         throw new Error("initializeWasm() must be awaited first!");
1983                 }
1984                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
1985                 // debug statements here
1986         }
1987         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
1988         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
1989                 if(!isWasmInitialized) {
1990                         throw new Error("initializeWasm() must be awaited first!");
1991                 }
1992                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
1993                 return nativeResponseValue;
1994         }
1995         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
1996         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
1997                 if(!isWasmInitialized) {
1998                         throw new Error("initializeWasm() must be awaited first!");
1999                 }
2000                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
2001                 return nativeResponseValue;
2002         }
2003         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
2004         export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
2005                 if(!isWasmInitialized) {
2006                         throw new Error("initializeWasm() must be awaited first!");
2007                 }
2008                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
2009                 return nativeResponseValue;
2010         }
2011         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
2012         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
2013                 if(!isWasmInitialized) {
2014                         throw new Error("initializeWasm() must be awaited first!");
2015                 }
2016                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
2017                 // debug statements here
2018         }
2019         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
2020         export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
2021                 if(!isWasmInitialized) {
2022                         throw new Error("initializeWasm() must be awaited first!");
2023                 }
2024                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
2025                 return nativeResponseValue;
2026         }
2027         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
2028         export function COption_u32Z_some(o: number): number {
2029                 if(!isWasmInitialized) {
2030                         throw new Error("initializeWasm() must be awaited first!");
2031                 }
2032                 const nativeResponseValue = wasm.COption_u32Z_some(o);
2033                 return nativeResponseValue;
2034         }
2035         // struct LDKCOption_u32Z COption_u32Z_none(void);
2036         export function COption_u32Z_none(): number {
2037                 if(!isWasmInitialized) {
2038                         throw new Error("initializeWasm() must be awaited first!");
2039                 }
2040                 const nativeResponseValue = wasm.COption_u32Z_none();
2041                 return nativeResponseValue;
2042         }
2043         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
2044         export function COption_u32Z_free(_res: number): void {
2045                 if(!isWasmInitialized) {
2046                         throw new Error("initializeWasm() must be awaited first!");
2047                 }
2048                 const nativeResponseValue = wasm.COption_u32Z_free(_res);
2049                 // debug statements here
2050         }
2051         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
2052         export function COption_u32Z_clone(orig: number): number {
2053                 if(!isWasmInitialized) {
2054                         throw new Error("initializeWasm() must be awaited first!");
2055                 }
2056                 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
2057                 return nativeResponseValue;
2058         }
2059         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
2060         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
2061                 if(!isWasmInitialized) {
2062                         throw new Error("initializeWasm() must be awaited first!");
2063                 }
2064                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
2065                 return nativeResponseValue;
2066         }
2067         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
2068         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
2069                 if(!isWasmInitialized) {
2070                         throw new Error("initializeWasm() must be awaited first!");
2071                 }
2072                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
2073                 return nativeResponseValue;
2074         }
2075         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
2076         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
2077                 if(!isWasmInitialized) {
2078                         throw new Error("initializeWasm() must be awaited first!");
2079                 }
2080                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
2081                 // debug statements here
2082         }
2083         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
2084         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
2085                 if(!isWasmInitialized) {
2086                         throw new Error("initializeWasm() must be awaited first!");
2087                 }
2088                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
2089                 return nativeResponseValue;
2090         }
2091         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
2092         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2093                 if(!isWasmInitialized) {
2094                         throw new Error("initializeWasm() must be awaited first!");
2095                 }
2096                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
2097                 return nativeResponseValue;
2098         }
2099         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2100         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2101                 if(!isWasmInitialized) {
2102                         throw new Error("initializeWasm() must be awaited first!");
2103                 }
2104                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
2105                 return nativeResponseValue;
2106         }
2107         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
2108         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2109                 if(!isWasmInitialized) {
2110                         throw new Error("initializeWasm() must be awaited first!");
2111                 }
2112                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
2113                 // debug statements here
2114         }
2115         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2116         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2117                 if(!isWasmInitialized) {
2118                         throw new Error("initializeWasm() must be awaited first!");
2119                 }
2120                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
2121                 return nativeResponseValue;
2122         }
2123         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
2124         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2125                 if(!isWasmInitialized) {
2126                         throw new Error("initializeWasm() must be awaited first!");
2127                 }
2128                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
2129                 return nativeResponseValue;
2130         }
2131         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2132         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2133                 if(!isWasmInitialized) {
2134                         throw new Error("initializeWasm() must be awaited first!");
2135                 }
2136                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
2137                 return nativeResponseValue;
2138         }
2139         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
2140         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2141                 if(!isWasmInitialized) {
2142                         throw new Error("initializeWasm() must be awaited first!");
2143                 }
2144                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
2145                 // debug statements here
2146         }
2147         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2148         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2149                 if(!isWasmInitialized) {
2150                         throw new Error("initializeWasm() must be awaited first!");
2151                 }
2152                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
2153                 return nativeResponseValue;
2154         }
2155         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
2156         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
2157                 if(!isWasmInitialized) {
2158                         throw new Error("initializeWasm() must be awaited first!");
2159                 }
2160                 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
2161                 // debug statements here
2162         }
2163         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
2164         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2165                 if(!isWasmInitialized) {
2166                         throw new Error("initializeWasm() must be awaited first!");
2167                 }
2168                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
2169                 return nativeResponseValue;
2170         }
2171         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2172         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
2173                 if(!isWasmInitialized) {
2174                         throw new Error("initializeWasm() must be awaited first!");
2175                 }
2176                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
2177                 return nativeResponseValue;
2178         }
2179         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
2180         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2181                 if(!isWasmInitialized) {
2182                         throw new Error("initializeWasm() must be awaited first!");
2183                 }
2184                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
2185                 // debug statements here
2186         }
2187         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2188         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2189                 if(!isWasmInitialized) {
2190                         throw new Error("initializeWasm() must be awaited first!");
2191                 }
2192                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
2193                 return nativeResponseValue;
2194         }
2195         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
2196         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2197                 if(!isWasmInitialized) {
2198                         throw new Error("initializeWasm() must be awaited first!");
2199                 }
2200                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
2201                 return nativeResponseValue;
2202         }
2203         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2204         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
2205                 if(!isWasmInitialized) {
2206                         throw new Error("initializeWasm() must be awaited first!");
2207                 }
2208                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
2209                 return nativeResponseValue;
2210         }
2211         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
2212         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2213                 if(!isWasmInitialized) {
2214                         throw new Error("initializeWasm() must be awaited first!");
2215                 }
2216                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
2217                 // debug statements here
2218         }
2219         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2220         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2221                 if(!isWasmInitialized) {
2222                         throw new Error("initializeWasm() must be awaited first!");
2223                 }
2224                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
2225                 return nativeResponseValue;
2226         }
2227         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
2228         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
2229                 if(!isWasmInitialized) {
2230                         throw new Error("initializeWasm() must be awaited first!");
2231                 }
2232                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
2233                 return nativeResponseValue;
2234         }
2235         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2236         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
2237                 if(!isWasmInitialized) {
2238                         throw new Error("initializeWasm() must be awaited first!");
2239                 }
2240                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
2241                 return nativeResponseValue;
2242         }
2243         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
2244         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
2245                 if(!isWasmInitialized) {
2246                         throw new Error("initializeWasm() must be awaited first!");
2247                 }
2248                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
2249                 // debug statements here
2250         }
2251         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2252         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2253                 if(!isWasmInitialized) {
2254                         throw new Error("initializeWasm() must be awaited first!");
2255                 }
2256                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
2257                 return nativeResponseValue;
2258         }
2259         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2260         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2261                 if(!isWasmInitialized) {
2262                         throw new Error("initializeWasm() must be awaited first!");
2263                 }
2264                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
2265                 return nativeResponseValue;
2266         }
2267         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
2268         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
2269                 if(!isWasmInitialized) {
2270                         throw new Error("initializeWasm() must be awaited first!");
2271                 }
2272                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2273                 return nativeResponseValue;
2274         }
2275         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2276         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2277                 if(!isWasmInitialized) {
2278                         throw new Error("initializeWasm() must be awaited first!");
2279                 }
2280                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2281                 // debug statements here
2282         }
2283         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
2284         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
2285                 if(!isWasmInitialized) {
2286                         throw new Error("initializeWasm() must be awaited first!");
2287                 }
2288                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
2289                 return nativeResponseValue;
2290         }
2291         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
2292         export function CResult_CVec_SignatureZNoneZ_err(): number {
2293                 if(!isWasmInitialized) {
2294                         throw new Error("initializeWasm() must be awaited first!");
2295                 }
2296                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
2297                 return nativeResponseValue;
2298         }
2299         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
2300         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
2301                 if(!isWasmInitialized) {
2302                         throw new Error("initializeWasm() must be awaited first!");
2303                 }
2304                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
2305                 // debug statements here
2306         }
2307         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
2308         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
2309                 if(!isWasmInitialized) {
2310                         throw new Error("initializeWasm() must be awaited first!");
2311                 }
2312                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
2313                 return nativeResponseValue;
2314         }
2315         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
2316         export function CResult_NoneErrorZ_ok(): number {
2317                 if(!isWasmInitialized) {
2318                         throw new Error("initializeWasm() must be awaited first!");
2319                 }
2320                 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
2321                 return nativeResponseValue;
2322         }
2323         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
2324         export function CResult_NoneErrorZ_err(e: IOError): number {
2325                 if(!isWasmInitialized) {
2326                         throw new Error("initializeWasm() must be awaited first!");
2327                 }
2328                 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
2329                 return nativeResponseValue;
2330         }
2331         // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
2332         export function CResult_NoneErrorZ_free(_res: number): void {
2333                 if(!isWasmInitialized) {
2334                         throw new Error("initializeWasm() must be awaited first!");
2335                 }
2336                 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
2337                 // debug statements here
2338         }
2339         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
2340         export function CResult_NoneErrorZ_clone(orig: number): number {
2341                 if(!isWasmInitialized) {
2342                         throw new Error("initializeWasm() must be awaited first!");
2343                 }
2344                 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
2345                 return nativeResponseValue;
2346         }
2347         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
2348         export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
2349                 if(!isWasmInitialized) {
2350                         throw new Error("initializeWasm() must be awaited first!");
2351                 }
2352                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
2353                 return nativeResponseValue;
2354         }
2355         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
2356         export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
2357                 if(!isWasmInitialized) {
2358                         throw new Error("initializeWasm() must be awaited first!");
2359                 }
2360                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
2361                 return nativeResponseValue;
2362         }
2363         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
2364         export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
2365                 if(!isWasmInitialized) {
2366                         throw new Error("initializeWasm() must be awaited first!");
2367                 }
2368                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
2369                 // debug statements here
2370         }
2371         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
2372         export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
2373                 if(!isWasmInitialized) {
2374                         throw new Error("initializeWasm() must be awaited first!");
2375                 }
2376                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
2377                 return nativeResponseValue;
2378         }
2379         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
2380         export function CVec_RouteHopZ_free(_res: number[]): void {
2381                 if(!isWasmInitialized) {
2382                         throw new Error("initializeWasm() must be awaited first!");
2383                 }
2384                 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
2385                 // debug statements here
2386         }
2387         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
2388         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
2389                 if(!isWasmInitialized) {
2390                         throw new Error("initializeWasm() must be awaited first!");
2391                 }
2392                 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
2393                 // debug statements here
2394         }
2395         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
2396         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
2397                 if(!isWasmInitialized) {
2398                         throw new Error("initializeWasm() must be awaited first!");
2399                 }
2400                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
2401                 return nativeResponseValue;
2402         }
2403         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
2404         export function CResult_RouteDecodeErrorZ_err(e: number): number {
2405                 if(!isWasmInitialized) {
2406                         throw new Error("initializeWasm() must be awaited first!");
2407                 }
2408                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
2409                 return nativeResponseValue;
2410         }
2411         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
2412         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
2413                 if(!isWasmInitialized) {
2414                         throw new Error("initializeWasm() must be awaited first!");
2415                 }
2416                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
2417                 // debug statements here
2418         }
2419         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
2420         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
2421                 if(!isWasmInitialized) {
2422                         throw new Error("initializeWasm() must be awaited first!");
2423                 }
2424                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
2425                 return nativeResponseValue;
2426         }
2427         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
2428         export function COption_u64Z_some(o: number): number {
2429                 if(!isWasmInitialized) {
2430                         throw new Error("initializeWasm() must be awaited first!");
2431                 }
2432                 const nativeResponseValue = wasm.COption_u64Z_some(o);
2433                 return nativeResponseValue;
2434         }
2435         // struct LDKCOption_u64Z COption_u64Z_none(void);
2436         export function COption_u64Z_none(): number {
2437                 if(!isWasmInitialized) {
2438                         throw new Error("initializeWasm() must be awaited first!");
2439                 }
2440                 const nativeResponseValue = wasm.COption_u64Z_none();
2441                 return nativeResponseValue;
2442         }
2443         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
2444         export function COption_u64Z_free(_res: number): void {
2445                 if(!isWasmInitialized) {
2446                         throw new Error("initializeWasm() must be awaited first!");
2447                 }
2448                 const nativeResponseValue = wasm.COption_u64Z_free(_res);
2449                 // debug statements here
2450         }
2451         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
2452         export function COption_u64Z_clone(orig: number): number {
2453                 if(!isWasmInitialized) {
2454                         throw new Error("initializeWasm() must be awaited first!");
2455                 }
2456                 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
2457                 return nativeResponseValue;
2458         }
2459         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2460         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
2461                 if(!isWasmInitialized) {
2462                         throw new Error("initializeWasm() must be awaited first!");
2463                 }
2464                 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
2465                 // debug statements here
2466         }
2467         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
2468         export function CVec_RouteHintZ_free(_res: number[]): void {
2469                 if(!isWasmInitialized) {
2470                         throw new Error("initializeWasm() must be awaited first!");
2471                 }
2472                 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
2473                 // debug statements here
2474         }
2475         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
2476         export function CResult_RouteLightningErrorZ_ok(o: number): number {
2477                 if(!isWasmInitialized) {
2478                         throw new Error("initializeWasm() must be awaited first!");
2479                 }
2480                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
2481                 return nativeResponseValue;
2482         }
2483         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
2484         export function CResult_RouteLightningErrorZ_err(e: number): number {
2485                 if(!isWasmInitialized) {
2486                         throw new Error("initializeWasm() must be awaited first!");
2487                 }
2488                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
2489                 return nativeResponseValue;
2490         }
2491         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
2492         export function CResult_RouteLightningErrorZ_free(_res: number): void {
2493                 if(!isWasmInitialized) {
2494                         throw new Error("initializeWasm() must be awaited first!");
2495                 }
2496                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
2497                 // debug statements here
2498         }
2499         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
2500         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
2501                 if(!isWasmInitialized) {
2502                         throw new Error("initializeWasm() must be awaited first!");
2503                 }
2504                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
2505                 return nativeResponseValue;
2506         }
2507         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2508         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2509                 if(!isWasmInitialized) {
2510                         throw new Error("initializeWasm() must be awaited first!");
2511                 }
2512                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2513                 return nativeResponseValue;
2514         }
2515         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2516         export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
2517                 if(!isWasmInitialized) {
2518                         throw new Error("initializeWasm() must be awaited first!");
2519                 }
2520                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2521                 return nativeResponseValue;
2522         }
2523         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2524         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2525                 if(!isWasmInitialized) {
2526                         throw new Error("initializeWasm() must be awaited first!");
2527                 }
2528                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2529                 // debug statements here
2530         }
2531         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2532         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2533                 if(!isWasmInitialized) {
2534                         throw new Error("initializeWasm() must be awaited first!");
2535                 }
2536                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2537                 return nativeResponseValue;
2538         }
2539         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
2540         export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
2541                 if(!isWasmInitialized) {
2542                         throw new Error("initializeWasm() must be awaited first!");
2543                 }
2544                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
2545                 return nativeResponseValue;
2546         }
2547         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2548         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2549                 if(!isWasmInitialized) {
2550                         throw new Error("initializeWasm() must be awaited first!");
2551                 }
2552                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2553                 return nativeResponseValue;
2554         }
2555         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2556         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2557                 if(!isWasmInitialized) {
2558                         throw new Error("initializeWasm() must be awaited first!");
2559                 }
2560                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2561                 // debug statements here
2562         }
2563         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2564         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2565                 if(!isWasmInitialized) {
2566                         throw new Error("initializeWasm() must be awaited first!");
2567                 }
2568                 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2569                 // debug statements here
2570         }
2571         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
2572         export function CVec_TxidZ_free(_res: Uint8Array[]): void {
2573                 if(!isWasmInitialized) {
2574                         throw new Error("initializeWasm() must be awaited first!");
2575                 }
2576                 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
2577                 // debug statements here
2578         }
2579         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2580         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2581                 if(!isWasmInitialized) {
2582                         throw new Error("initializeWasm() must be awaited first!");
2583                 }
2584                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2585                 return nativeResponseValue;
2586         }
2587         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2588         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
2589                 if(!isWasmInitialized) {
2590                         throw new Error("initializeWasm() must be awaited first!");
2591                 }
2592                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2593                 return nativeResponseValue;
2594         }
2595         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2596         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2597                 if(!isWasmInitialized) {
2598                         throw new Error("initializeWasm() must be awaited first!");
2599                 }
2600                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2601                 // debug statements here
2602         }
2603         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2604         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2605                 if(!isWasmInitialized) {
2606                         throw new Error("initializeWasm() must be awaited first!");
2607                 }
2608                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2609                 return nativeResponseValue;
2610         }
2611         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2612         export function CVec_MonitorEventZ_free(_res: number[]): void {
2613                 if(!isWasmInitialized) {
2614                         throw new Error("initializeWasm() must be awaited first!");
2615                 }
2616                 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2617                 // debug statements here
2618         }
2619         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
2620         export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
2621                 if(!isWasmInitialized) {
2622                         throw new Error("initializeWasm() must be awaited first!");
2623                 }
2624                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
2625                 return nativeResponseValue;
2626         }
2627         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
2628         export function COption_C2Tuple_usizeTransactionZZ_none(): number {
2629                 if(!isWasmInitialized) {
2630                         throw new Error("initializeWasm() must be awaited first!");
2631                 }
2632                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
2633                 return nativeResponseValue;
2634         }
2635         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
2636         export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
2637                 if(!isWasmInitialized) {
2638                         throw new Error("initializeWasm() must be awaited first!");
2639                 }
2640                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
2641                 // debug statements here
2642         }
2643         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
2644         export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
2645                 if(!isWasmInitialized) {
2646                         throw new Error("initializeWasm() must be awaited first!");
2647                 }
2648                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
2649                 return nativeResponseValue;
2650         }
2651         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2652         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
2653                 if(!isWasmInitialized) {
2654                         throw new Error("initializeWasm() must be awaited first!");
2655                 }
2656                 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
2657                 // debug statements here
2658         }
2659         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
2660         export function CVec_MessageSendEventZ_free(_res: number[]): void {
2661                 if(!isWasmInitialized) {
2662                         throw new Error("initializeWasm() must be awaited first!");
2663                 }
2664                 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
2665                 // debug statements here
2666         }
2667         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
2668         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
2669                 if(!isWasmInitialized) {
2670                         throw new Error("initializeWasm() must be awaited first!");
2671                 }
2672                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
2673                 return nativeResponseValue;
2674         }
2675         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2676         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
2677                 if(!isWasmInitialized) {
2678                         throw new Error("initializeWasm() must be awaited first!");
2679                 }
2680                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
2681                 return nativeResponseValue;
2682         }
2683         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
2684         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
2685                 if(!isWasmInitialized) {
2686                         throw new Error("initializeWasm() must be awaited first!");
2687                 }
2688                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
2689                 // debug statements here
2690         }
2691         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
2692         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
2693                 if(!isWasmInitialized) {
2694                         throw new Error("initializeWasm() must be awaited first!");
2695                 }
2696                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
2697                 return nativeResponseValue;
2698         }
2699         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2700         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
2701                 if(!isWasmInitialized) {
2702                         throw new Error("initializeWasm() must be awaited first!");
2703                 }
2704                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
2705                 return nativeResponseValue;
2706         }
2707         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
2708         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
2709                 if(!isWasmInitialized) {
2710                         throw new Error("initializeWasm() must be awaited first!");
2711                 }
2712                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
2713                 // debug statements here
2714         }
2715         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
2716         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
2717                 if(!isWasmInitialized) {
2718                         throw new Error("initializeWasm() must be awaited first!");
2719                 }
2720                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
2721                 return nativeResponseValue;
2722         }
2723         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2724         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
2725                 if(!isWasmInitialized) {
2726                         throw new Error("initializeWasm() must be awaited first!");
2727                 }
2728                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
2729                 return nativeResponseValue;
2730         }
2731         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
2732         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
2733                 if(!isWasmInitialized) {
2734                         throw new Error("initializeWasm() must be awaited first!");
2735                 }
2736                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
2737                 // debug statements here
2738         }
2739         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
2740         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
2741                 if(!isWasmInitialized) {
2742                         throw new Error("initializeWasm() must be awaited first!");
2743                 }
2744                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
2745                 return nativeResponseValue;
2746         }
2747         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2748         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
2749                 if(!isWasmInitialized) {
2750                         throw new Error("initializeWasm() must be awaited first!");
2751                 }
2752                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
2753                 return nativeResponseValue;
2754         }
2755         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
2756         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
2757                 if(!isWasmInitialized) {
2758                         throw new Error("initializeWasm() must be awaited first!");
2759                 }
2760                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
2761                 // debug statements here
2762         }
2763         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
2764         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
2765                 if(!isWasmInitialized) {
2766                         throw new Error("initializeWasm() must be awaited first!");
2767                 }
2768                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
2769                 return nativeResponseValue;
2770         }
2771         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2772         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
2773                 if(!isWasmInitialized) {
2774                         throw new Error("initializeWasm() must be awaited first!");
2775                 }
2776                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
2777                 return nativeResponseValue;
2778         }
2779         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
2780         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
2781                 if(!isWasmInitialized) {
2782                         throw new Error("initializeWasm() must be awaited first!");
2783                 }
2784                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
2785                 // debug statements here
2786         }
2787         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2788         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2789                 if(!isWasmInitialized) {
2790                         throw new Error("initializeWasm() must be awaited first!");
2791                 }
2792                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
2793                 return nativeResponseValue;
2794         }
2795         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
2796         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
2797                 if(!isWasmInitialized) {
2798                         throw new Error("initializeWasm() must be awaited first!");
2799                 }
2800                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
2801                 return nativeResponseValue;
2802         }
2803         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2804         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
2805                 if(!isWasmInitialized) {
2806                         throw new Error("initializeWasm() must be awaited first!");
2807                 }
2808                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
2809                 return nativeResponseValue;
2810         }
2811         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
2812         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
2813                 if(!isWasmInitialized) {
2814                         throw new Error("initializeWasm() must be awaited first!");
2815                 }
2816                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
2817                 // debug statements here
2818         }
2819         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2820         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2821                 if(!isWasmInitialized) {
2822                         throw new Error("initializeWasm() must be awaited first!");
2823                 }
2824                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
2825                 return nativeResponseValue;
2826         }
2827         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
2828         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
2829                 if(!isWasmInitialized) {
2830                         throw new Error("initializeWasm() must be awaited first!");
2831                 }
2832                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
2833                 return nativeResponseValue;
2834         }
2835         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2836         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
2837                 if(!isWasmInitialized) {
2838                         throw new Error("initializeWasm() must be awaited first!");
2839                 }
2840                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
2841                 return nativeResponseValue;
2842         }
2843         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
2844         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
2845                 if(!isWasmInitialized) {
2846                         throw new Error("initializeWasm() must be awaited first!");
2847                 }
2848                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
2849                 // debug statements here
2850         }
2851         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2852         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2853                 if(!isWasmInitialized) {
2854                         throw new Error("initializeWasm() must be awaited first!");
2855                 }
2856                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
2857                 return nativeResponseValue;
2858         }
2859         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
2860         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
2861                 if(!isWasmInitialized) {
2862                         throw new Error("initializeWasm() must be awaited first!");
2863                 }
2864                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
2865                 return nativeResponseValue;
2866         }
2867         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
2868         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
2869                 if(!isWasmInitialized) {
2870                         throw new Error("initializeWasm() must be awaited first!");
2871                 }
2872                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
2873                 return nativeResponseValue;
2874         }
2875         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
2876         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
2877                 if(!isWasmInitialized) {
2878                         throw new Error("initializeWasm() must be awaited first!");
2879                 }
2880                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
2881                 // debug statements here
2882         }
2883         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
2884         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
2885                 if(!isWasmInitialized) {
2886                         throw new Error("initializeWasm() must be awaited first!");
2887                 }
2888                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
2889                 return nativeResponseValue;
2890         }
2891         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
2892         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
2893                 if(!isWasmInitialized) {
2894                         throw new Error("initializeWasm() must be awaited first!");
2895                 }
2896                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
2897                 return nativeResponseValue;
2898         }
2899         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
2900         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
2901                 if(!isWasmInitialized) {
2902                         throw new Error("initializeWasm() must be awaited first!");
2903                 }
2904                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
2905                 // debug statements here
2906         }
2907         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
2908         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
2909                 if(!isWasmInitialized) {
2910                         throw new Error("initializeWasm() must be awaited first!");
2911                 }
2912                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
2913                 return nativeResponseValue;
2914         }
2915         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
2916         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
2917                 if(!isWasmInitialized) {
2918                         throw new Error("initializeWasm() must be awaited first!");
2919                 }
2920                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
2921                 return nativeResponseValue;
2922         }
2923         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
2924         export function CResult_SignatureNoneZ_err(): number {
2925                 if(!isWasmInitialized) {
2926                         throw new Error("initializeWasm() must be awaited first!");
2927                 }
2928                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
2929                 return nativeResponseValue;
2930         }
2931         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
2932         export function CResult_SignatureNoneZ_free(_res: number): void {
2933                 if(!isWasmInitialized) {
2934                         throw new Error("initializeWasm() must be awaited first!");
2935                 }
2936                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
2937                 // debug statements here
2938         }
2939         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
2940         export function CResult_SignatureNoneZ_clone(orig: number): number {
2941                 if(!isWasmInitialized) {
2942                         throw new Error("initializeWasm() must be awaited first!");
2943                 }
2944                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
2945                 return nativeResponseValue;
2946         }
2947         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
2948         export function CResult_SignDecodeErrorZ_ok(o: number): number {
2949                 if(!isWasmInitialized) {
2950                         throw new Error("initializeWasm() must be awaited first!");
2951                 }
2952                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
2953                 return nativeResponseValue;
2954         }
2955         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
2956         export function CResult_SignDecodeErrorZ_err(e: number): number {
2957                 if(!isWasmInitialized) {
2958                         throw new Error("initializeWasm() must be awaited first!");
2959                 }
2960                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
2961                 return nativeResponseValue;
2962         }
2963         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
2964         export function CResult_SignDecodeErrorZ_free(_res: number): void {
2965                 if(!isWasmInitialized) {
2966                         throw new Error("initializeWasm() must be awaited first!");
2967                 }
2968                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
2969                 // debug statements here
2970         }
2971         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
2972         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
2973                 if(!isWasmInitialized) {
2974                         throw new Error("initializeWasm() must be awaited first!");
2975                 }
2976                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
2977                 return nativeResponseValue;
2978         }
2979         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
2980         export function CVec_u8Z_free(_res: Uint8Array): void {
2981                 if(!isWasmInitialized) {
2982                         throw new Error("initializeWasm() must be awaited first!");
2983                 }
2984                 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
2985                 // debug statements here
2986         }
2987         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
2988         export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
2989                 if(!isWasmInitialized) {
2990                         throw new Error("initializeWasm() must be awaited first!");
2991                 }
2992                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_ok(encodeArray(arg));
2993                 return nativeResponseValue;
2994         }
2995         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
2996         export function CResult_RecoverableSignatureNoneZ_err(): number {
2997                 if(!isWasmInitialized) {
2998                         throw new Error("initializeWasm() must be awaited first!");
2999                 }
3000                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_err();
3001                 return nativeResponseValue;
3002         }
3003         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
3004         export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
3005                 if(!isWasmInitialized) {
3006                         throw new Error("initializeWasm() must be awaited first!");
3007                 }
3008                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_free(_res);
3009                 // debug statements here
3010         }
3011         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
3012         export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
3013                 if(!isWasmInitialized) {
3014                         throw new Error("initializeWasm() must be awaited first!");
3015                 }
3016                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone(orig);
3017                 return nativeResponseValue;
3018         }
3019         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3020         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3021                 if(!isWasmInitialized) {
3022                         throw new Error("initializeWasm() must be awaited first!");
3023                 }
3024                 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3025                 // debug statements here
3026         }
3027         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3028         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3029                 if(!isWasmInitialized) {
3030                         throw new Error("initializeWasm() must be awaited first!");
3031                 }
3032                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3033                 return nativeResponseValue;
3034         }
3035         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3036         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3037                 if(!isWasmInitialized) {
3038                         throw new Error("initializeWasm() must be awaited first!");
3039                 }
3040                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3041                 return nativeResponseValue;
3042         }
3043         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3044         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3045                 if(!isWasmInitialized) {
3046                         throw new Error("initializeWasm() must be awaited first!");
3047                 }
3048                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3049                 // debug statements here
3050         }
3051         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3052         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3053                 if(!isWasmInitialized) {
3054                         throw new Error("initializeWasm() must be awaited first!");
3055                 }
3056                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3057                 return nativeResponseValue;
3058         }
3059         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3060         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3061                 if(!isWasmInitialized) {
3062                         throw new Error("initializeWasm() must be awaited first!");
3063                 }
3064                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3065                 return nativeResponseValue;
3066         }
3067         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3068         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3069                 if(!isWasmInitialized) {
3070                         throw new Error("initializeWasm() must be awaited first!");
3071                 }
3072                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3073                 return nativeResponseValue;
3074         }
3075         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3076         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3077                 if(!isWasmInitialized) {
3078                         throw new Error("initializeWasm() must be awaited first!");
3079                 }
3080                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3081                 // debug statements here
3082         }
3083         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3084         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3085                 if(!isWasmInitialized) {
3086                         throw new Error("initializeWasm() must be awaited first!");
3087                 }
3088                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3089                 return nativeResponseValue;
3090         }
3091         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3092         export function CVec_TxOutZ_free(_res: number[]): void {
3093                 if(!isWasmInitialized) {
3094                         throw new Error("initializeWasm() must be awaited first!");
3095                 }
3096                 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3097                 // debug statements here
3098         }
3099         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3100         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3101                 if(!isWasmInitialized) {
3102                         throw new Error("initializeWasm() must be awaited first!");
3103                 }
3104                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3105                 return nativeResponseValue;
3106         }
3107         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3108         export function CResult_TransactionNoneZ_err(): number {
3109                 if(!isWasmInitialized) {
3110                         throw new Error("initializeWasm() must be awaited first!");
3111                 }
3112                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3113                 return nativeResponseValue;
3114         }
3115         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3116         export function CResult_TransactionNoneZ_free(_res: number): void {
3117                 if(!isWasmInitialized) {
3118                         throw new Error("initializeWasm() must be awaited first!");
3119                 }
3120                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3121                 // debug statements here
3122         }
3123         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
3124         export function CResult_TransactionNoneZ_clone(orig: number): number {
3125                 if(!isWasmInitialized) {
3126                         throw new Error("initializeWasm() must be awaited first!");
3127                 }
3128                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
3129                 return nativeResponseValue;
3130         }
3131         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
3132         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
3133                 if(!isWasmInitialized) {
3134                         throw new Error("initializeWasm() must be awaited first!");
3135                 }
3136                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
3137                 return nativeResponseValue;
3138         }
3139         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
3140         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
3141                 if(!isWasmInitialized) {
3142                         throw new Error("initializeWasm() must be awaited first!");
3143                 }
3144                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
3145                 // debug statements here
3146         }
3147         // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
3148         export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
3149                 if(!isWasmInitialized) {
3150                         throw new Error("initializeWasm() must be awaited first!");
3151                 }
3152                 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
3153                 // debug statements here
3154         }
3155         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
3156         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
3157                 if(!isWasmInitialized) {
3158                         throw new Error("initializeWasm() must be awaited first!");
3159                 }
3160                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
3161                 return nativeResponseValue;
3162         }
3163         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
3164         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: IOError): number {
3165                 if(!isWasmInitialized) {
3166                         throw new Error("initializeWasm() must be awaited first!");
3167                 }
3168                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
3169                 return nativeResponseValue;
3170         }
3171         // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
3172         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
3173                 if(!isWasmInitialized) {
3174                         throw new Error("initializeWasm() must be awaited first!");
3175                 }
3176                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
3177                 // debug statements here
3178         }
3179         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
3180         export function CResult_NoneAPIErrorZ_ok(): number {
3181                 if(!isWasmInitialized) {
3182                         throw new Error("initializeWasm() must be awaited first!");
3183                 }
3184                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
3185                 return nativeResponseValue;
3186         }
3187         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
3188         export function CResult_NoneAPIErrorZ_err(e: number): number {
3189                 if(!isWasmInitialized) {
3190                         throw new Error("initializeWasm() must be awaited first!");
3191                 }
3192                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
3193                 return nativeResponseValue;
3194         }
3195         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
3196         export function CResult_NoneAPIErrorZ_free(_res: number): void {
3197                 if(!isWasmInitialized) {
3198                         throw new Error("initializeWasm() must be awaited first!");
3199                 }
3200                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
3201                 // debug statements here
3202         }
3203         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
3204         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
3205                 if(!isWasmInitialized) {
3206                         throw new Error("initializeWasm() must be awaited first!");
3207                 }
3208                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
3209                 return nativeResponseValue;
3210         }
3211         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
3212         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
3213                 if(!isWasmInitialized) {
3214                         throw new Error("initializeWasm() must be awaited first!");
3215                 }
3216                 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
3217                 // debug statements here
3218         }
3219         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
3220         export function CVec_APIErrorZ_free(_res: number[]): void {
3221                 if(!isWasmInitialized) {
3222                         throw new Error("initializeWasm() must be awaited first!");
3223                 }
3224                 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
3225                 // debug statements here
3226         }
3227         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
3228         export function CResult_NonePaymentSendFailureZ_ok(): number {
3229                 if(!isWasmInitialized) {
3230                         throw new Error("initializeWasm() must be awaited first!");
3231                 }
3232                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
3233                 return nativeResponseValue;
3234         }
3235         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3236         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
3237                 if(!isWasmInitialized) {
3238                         throw new Error("initializeWasm() must be awaited first!");
3239                 }
3240                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
3241                 return nativeResponseValue;
3242         }
3243         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
3244         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
3245                 if(!isWasmInitialized) {
3246                         throw new Error("initializeWasm() must be awaited first!");
3247                 }
3248                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
3249                 // debug statements here
3250         }
3251         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
3252         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
3253                 if(!isWasmInitialized) {
3254                         throw new Error("initializeWasm() must be awaited first!");
3255                 }
3256                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
3257                 return nativeResponseValue;
3258         }
3259         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
3260         export function CVec_NetAddressZ_free(_res: number[]): void {
3261                 if(!isWasmInitialized) {
3262                         throw new Error("initializeWasm() must be awaited first!");
3263                 }
3264                 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
3265                 // debug statements here
3266         }
3267         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
3268         export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
3269                 if(!isWasmInitialized) {
3270                         throw new Error("initializeWasm() must be awaited first!");
3271                 }
3272                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
3273                 return nativeResponseValue;
3274         }
3275         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
3276         export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
3277                 if(!isWasmInitialized) {
3278                         throw new Error("initializeWasm() must be awaited first!");
3279                 }
3280                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_new(encodeArray(a), encodeArray(b));
3281                 return nativeResponseValue;
3282         }
3283         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
3284         export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
3285                 if(!isWasmInitialized) {
3286                         throw new Error("initializeWasm() must be awaited first!");
3287                 }
3288                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_free(_res);
3289                 // debug statements here
3290         }
3291         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
3292         export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
3293                 if(!isWasmInitialized) {
3294                         throw new Error("initializeWasm() must be awaited first!");
3295                 }
3296                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_ok(encodeArray(o));
3297                 return nativeResponseValue;
3298         }
3299         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
3300         export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
3301                 if(!isWasmInitialized) {
3302                         throw new Error("initializeWasm() must be awaited first!");
3303                 }
3304                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_err(e);
3305                 return nativeResponseValue;
3306         }
3307         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
3308         export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
3309                 if(!isWasmInitialized) {
3310                         throw new Error("initializeWasm() must be awaited first!");
3311                 }
3312                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_free(_res);
3313                 // debug statements here
3314         }
3315         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
3316         export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
3317                 if(!isWasmInitialized) {
3318                         throw new Error("initializeWasm() must be awaited first!");
3319                 }
3320                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone(orig);
3321                 return nativeResponseValue;
3322         }
3323         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
3324         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
3325                 if(!isWasmInitialized) {
3326                         throw new Error("initializeWasm() must be awaited first!");
3327                 }
3328                 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
3329                 // debug statements here
3330         }
3331         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
3332         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
3333                 if(!isWasmInitialized) {
3334                         throw new Error("initializeWasm() must be awaited first!");
3335                 }
3336                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
3337                 return nativeResponseValue;
3338         }
3339         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
3340         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
3341                 if(!isWasmInitialized) {
3342                         throw new Error("initializeWasm() must be awaited first!");
3343                 }
3344                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
3345                 // debug statements here
3346         }
3347         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
3348         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
3349                 if(!isWasmInitialized) {
3350                         throw new Error("initializeWasm() must be awaited first!");
3351                 }
3352                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
3353                 return nativeResponseValue;
3354         }
3355         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
3356         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
3357                 if(!isWasmInitialized) {
3358                         throw new Error("initializeWasm() must be awaited first!");
3359                 }
3360                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
3361                 return nativeResponseValue;
3362         }
3363         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
3364         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
3365                 if(!isWasmInitialized) {
3366                         throw new Error("initializeWasm() must be awaited first!");
3367                 }
3368                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
3369                 // debug statements here
3370         }
3371         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
3372         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
3373                 if(!isWasmInitialized) {
3374                         throw new Error("initializeWasm() must be awaited first!");
3375                 }
3376                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
3377                 return nativeResponseValue;
3378         }
3379         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
3380         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
3381                 if(!isWasmInitialized) {
3382                         throw new Error("initializeWasm() must be awaited first!");
3383                 }
3384                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
3385                 return nativeResponseValue;
3386         }
3387         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
3388         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
3389                 if(!isWasmInitialized) {
3390                         throw new Error("initializeWasm() must be awaited first!");
3391                 }
3392                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
3393                 // debug statements here
3394         }
3395         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
3396         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
3397                 if(!isWasmInitialized) {
3398                         throw new Error("initializeWasm() must be awaited first!");
3399                 }
3400                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
3401                 return nativeResponseValue;
3402         }
3403         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
3404         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
3405                 if(!isWasmInitialized) {
3406                         throw new Error("initializeWasm() must be awaited first!");
3407                 }
3408                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
3409                 return nativeResponseValue;
3410         }
3411         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
3412         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
3413                 if(!isWasmInitialized) {
3414                         throw new Error("initializeWasm() must be awaited first!");
3415                 }
3416                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
3417                 return nativeResponseValue;
3418         }
3419         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
3420         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
3421                 if(!isWasmInitialized) {
3422                         throw new Error("initializeWasm() must be awaited first!");
3423                 }
3424                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
3425                 // debug statements here
3426         }
3427         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
3428         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
3429                 if(!isWasmInitialized) {
3430                         throw new Error("initializeWasm() must be awaited first!");
3431                 }
3432                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
3433                 return nativeResponseValue;
3434         }
3435         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
3436         export function CResult_SiPrefixNoneZ_ok(o: SiPrefix): number {
3437                 if(!isWasmInitialized) {
3438                         throw new Error("initializeWasm() must be awaited first!");
3439                 }
3440                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_ok(o);
3441                 return nativeResponseValue;
3442         }
3443         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
3444         export function CResult_SiPrefixNoneZ_err(): number {
3445                 if(!isWasmInitialized) {
3446                         throw new Error("initializeWasm() must be awaited first!");
3447                 }
3448                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_err();
3449                 return nativeResponseValue;
3450         }
3451         // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
3452         export function CResult_SiPrefixNoneZ_free(_res: number): void {
3453                 if(!isWasmInitialized) {
3454                         throw new Error("initializeWasm() must be awaited first!");
3455                 }
3456                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_free(_res);
3457                 // debug statements here
3458         }
3459         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
3460         export function CResult_SiPrefixNoneZ_clone(orig: number): number {
3461                 if(!isWasmInitialized) {
3462                         throw new Error("initializeWasm() must be awaited first!");
3463                 }
3464                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone(orig);
3465                 return nativeResponseValue;
3466         }
3467         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
3468         export function CResult_InvoiceNoneZ_ok(o: number): number {
3469                 if(!isWasmInitialized) {
3470                         throw new Error("initializeWasm() must be awaited first!");
3471                 }
3472                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_ok(o);
3473                 return nativeResponseValue;
3474         }
3475         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
3476         export function CResult_InvoiceNoneZ_err(): number {
3477                 if(!isWasmInitialized) {
3478                         throw new Error("initializeWasm() must be awaited first!");
3479                 }
3480                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_err();
3481                 return nativeResponseValue;
3482         }
3483         // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
3484         export function CResult_InvoiceNoneZ_free(_res: number): void {
3485                 if(!isWasmInitialized) {
3486                         throw new Error("initializeWasm() must be awaited first!");
3487                 }
3488                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_free(_res);
3489                 // debug statements here
3490         }
3491         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
3492         export function CResult_InvoiceNoneZ_clone(orig: number): number {
3493                 if(!isWasmInitialized) {
3494                         throw new Error("initializeWasm() must be awaited first!");
3495                 }
3496                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone(orig);
3497                 return nativeResponseValue;
3498         }
3499         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
3500         export function CResult_SignedRawInvoiceNoneZ_ok(o: number): number {
3501                 if(!isWasmInitialized) {
3502                         throw new Error("initializeWasm() must be awaited first!");
3503                 }
3504                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_ok(o);
3505                 return nativeResponseValue;
3506         }
3507         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
3508         export function CResult_SignedRawInvoiceNoneZ_err(): number {
3509                 if(!isWasmInitialized) {
3510                         throw new Error("initializeWasm() must be awaited first!");
3511                 }
3512                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_err();
3513                 return nativeResponseValue;
3514         }
3515         // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
3516         export function CResult_SignedRawInvoiceNoneZ_free(_res: number): void {
3517                 if(!isWasmInitialized) {
3518                         throw new Error("initializeWasm() must be awaited first!");
3519                 }
3520                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_free(_res);
3521                 // debug statements here
3522         }
3523         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
3524         export function CResult_SignedRawInvoiceNoneZ_clone(orig: number): number {
3525                 if(!isWasmInitialized) {
3526                         throw new Error("initializeWasm() must be awaited first!");
3527                 }
3528                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone(orig);
3529                 return nativeResponseValue;
3530         }
3531         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
3532         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig: number): number {
3533                 if(!isWasmInitialized) {
3534                         throw new Error("initializeWasm() must be awaited first!");
3535                 }
3536                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig);
3537                 return nativeResponseValue;
3538         }
3539         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
3540         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a: number, b: Uint8Array, c: number): number {
3541                 if(!isWasmInitialized) {
3542                         throw new Error("initializeWasm() must be awaited first!");
3543                 }
3544                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a, encodeArray(b), c);
3545                 return nativeResponseValue;
3546         }
3547         // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
3548         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res: number): void {
3549                 if(!isWasmInitialized) {
3550                         throw new Error("initializeWasm() must be awaited first!");
3551                 }
3552                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res);
3553                 // debug statements here
3554         }
3555         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
3556         export function CResult_PayeePubKeyErrorZ_ok(o: number): number {
3557                 if(!isWasmInitialized) {
3558                         throw new Error("initializeWasm() must be awaited first!");
3559                 }
3560                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_ok(o);
3561                 return nativeResponseValue;
3562         }
3563         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
3564         export function CResult_PayeePubKeyErrorZ_err(e: Secp256k1Error): number {
3565                 if(!isWasmInitialized) {
3566                         throw new Error("initializeWasm() must be awaited first!");
3567                 }
3568                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_err(e);
3569                 return nativeResponseValue;
3570         }
3571         // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
3572         export function CResult_PayeePubKeyErrorZ_free(_res: number): void {
3573                 if(!isWasmInitialized) {
3574                         throw new Error("initializeWasm() must be awaited first!");
3575                 }
3576                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_free(_res);
3577                 // debug statements here
3578         }
3579         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
3580         export function CResult_PayeePubKeyErrorZ_clone(orig: number): number {
3581                 if(!isWasmInitialized) {
3582                         throw new Error("initializeWasm() must be awaited first!");
3583                 }
3584                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone(orig);
3585                 return nativeResponseValue;
3586         }
3587         // void CVec_PrivateRouteZ_free(struct LDKCVec_PrivateRouteZ _res);
3588         export function CVec_PrivateRouteZ_free(_res: number[]): void {
3589                 if(!isWasmInitialized) {
3590                         throw new Error("initializeWasm() must be awaited first!");
3591                 }
3592                 const nativeResponseValue = wasm.CVec_PrivateRouteZ_free(_res);
3593                 // debug statements here
3594         }
3595         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
3596         export function CResult_PositiveTimestampCreationErrorZ_ok(o: number): number {
3597                 if(!isWasmInitialized) {
3598                         throw new Error("initializeWasm() must be awaited first!");
3599                 }
3600                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_ok(o);
3601                 return nativeResponseValue;
3602         }
3603         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
3604         export function CResult_PositiveTimestampCreationErrorZ_err(e: CreationError): number {
3605                 if(!isWasmInitialized) {
3606                         throw new Error("initializeWasm() must be awaited first!");
3607                 }
3608                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_err(e);
3609                 return nativeResponseValue;
3610         }
3611         // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
3612         export function CResult_PositiveTimestampCreationErrorZ_free(_res: number): void {
3613                 if(!isWasmInitialized) {
3614                         throw new Error("initializeWasm() must be awaited first!");
3615                 }
3616                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_free(_res);
3617                 // debug statements here
3618         }
3619         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
3620         export function CResult_PositiveTimestampCreationErrorZ_clone(orig: number): number {
3621                 if(!isWasmInitialized) {
3622                         throw new Error("initializeWasm() must be awaited first!");
3623                 }
3624                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone(orig);
3625                 return nativeResponseValue;
3626         }
3627         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
3628         export function CResult_NoneSemanticErrorZ_ok(): number {
3629                 if(!isWasmInitialized) {
3630                         throw new Error("initializeWasm() must be awaited first!");
3631                 }
3632                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_ok();
3633                 return nativeResponseValue;
3634         }
3635         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
3636         export function CResult_NoneSemanticErrorZ_err(e: SemanticError): number {
3637                 if(!isWasmInitialized) {
3638                         throw new Error("initializeWasm() must be awaited first!");
3639                 }
3640                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_err(e);
3641                 return nativeResponseValue;
3642         }
3643         // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
3644         export function CResult_NoneSemanticErrorZ_free(_res: number): void {
3645                 if(!isWasmInitialized) {
3646                         throw new Error("initializeWasm() must be awaited first!");
3647                 }
3648                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_free(_res);
3649                 // debug statements here
3650         }
3651         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
3652         export function CResult_NoneSemanticErrorZ_clone(orig: number): number {
3653                 if(!isWasmInitialized) {
3654                         throw new Error("initializeWasm() must be awaited first!");
3655                 }
3656                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone(orig);
3657                 return nativeResponseValue;
3658         }
3659         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
3660         export function CResult_InvoiceSemanticErrorZ_ok(o: number): number {
3661                 if(!isWasmInitialized) {
3662                         throw new Error("initializeWasm() must be awaited first!");
3663                 }
3664                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_ok(o);
3665                 return nativeResponseValue;
3666         }
3667         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
3668         export function CResult_InvoiceSemanticErrorZ_err(e: SemanticError): number {
3669                 if(!isWasmInitialized) {
3670                         throw new Error("initializeWasm() must be awaited first!");
3671                 }
3672                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_err(e);
3673                 return nativeResponseValue;
3674         }
3675         // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
3676         export function CResult_InvoiceSemanticErrorZ_free(_res: number): void {
3677                 if(!isWasmInitialized) {
3678                         throw new Error("initializeWasm() must be awaited first!");
3679                 }
3680                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_free(_res);
3681                 // debug statements here
3682         }
3683         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
3684         export function CResult_InvoiceSemanticErrorZ_clone(orig: number): number {
3685                 if(!isWasmInitialized) {
3686                         throw new Error("initializeWasm() must be awaited first!");
3687                 }
3688                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone(orig);
3689                 return nativeResponseValue;
3690         }
3691         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
3692         export function CResult_DescriptionCreationErrorZ_ok(o: number): number {
3693                 if(!isWasmInitialized) {
3694                         throw new Error("initializeWasm() must be awaited first!");
3695                 }
3696                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_ok(o);
3697                 return nativeResponseValue;
3698         }
3699         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
3700         export function CResult_DescriptionCreationErrorZ_err(e: CreationError): number {
3701                 if(!isWasmInitialized) {
3702                         throw new Error("initializeWasm() must be awaited first!");
3703                 }
3704                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_err(e);
3705                 return nativeResponseValue;
3706         }
3707         // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
3708         export function CResult_DescriptionCreationErrorZ_free(_res: number): void {
3709                 if(!isWasmInitialized) {
3710                         throw new Error("initializeWasm() must be awaited first!");
3711                 }
3712                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_free(_res);
3713                 // debug statements here
3714         }
3715         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
3716         export function CResult_DescriptionCreationErrorZ_clone(orig: number): number {
3717                 if(!isWasmInitialized) {
3718                         throw new Error("initializeWasm() must be awaited first!");
3719                 }
3720                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone(orig);
3721                 return nativeResponseValue;
3722         }
3723         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
3724         export function CResult_ExpiryTimeCreationErrorZ_ok(o: number): number {
3725                 if(!isWasmInitialized) {
3726                         throw new Error("initializeWasm() must be awaited first!");
3727                 }
3728                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_ok(o);
3729                 return nativeResponseValue;
3730         }
3731         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
3732         export function CResult_ExpiryTimeCreationErrorZ_err(e: CreationError): number {
3733                 if(!isWasmInitialized) {
3734                         throw new Error("initializeWasm() must be awaited first!");
3735                 }
3736                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_err(e);
3737                 return nativeResponseValue;
3738         }
3739         // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
3740         export function CResult_ExpiryTimeCreationErrorZ_free(_res: number): void {
3741                 if(!isWasmInitialized) {
3742                         throw new Error("initializeWasm() must be awaited first!");
3743                 }
3744                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_free(_res);
3745                 // debug statements here
3746         }
3747         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
3748         export function CResult_ExpiryTimeCreationErrorZ_clone(orig: number): number {
3749                 if(!isWasmInitialized) {
3750                         throw new Error("initializeWasm() must be awaited first!");
3751                 }
3752                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone(orig);
3753                 return nativeResponseValue;
3754         }
3755         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_ok(struct LDKPrivateRoute o);
3756         export function CResult_PrivateRouteCreationErrorZ_ok(o: number): number {
3757                 if(!isWasmInitialized) {
3758                         throw new Error("initializeWasm() must be awaited first!");
3759                 }
3760                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_ok(o);
3761                 return nativeResponseValue;
3762         }
3763         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_err(enum LDKCreationError e);
3764         export function CResult_PrivateRouteCreationErrorZ_err(e: CreationError): number {
3765                 if(!isWasmInitialized) {
3766                         throw new Error("initializeWasm() must be awaited first!");
3767                 }
3768                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_err(e);
3769                 return nativeResponseValue;
3770         }
3771         // void CResult_PrivateRouteCreationErrorZ_free(struct LDKCResult_PrivateRouteCreationErrorZ _res);
3772         export function CResult_PrivateRouteCreationErrorZ_free(_res: number): void {
3773                 if(!isWasmInitialized) {
3774                         throw new Error("initializeWasm() must be awaited first!");
3775                 }
3776                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_free(_res);
3777                 // debug statements here
3778         }
3779         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_clone(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR orig);
3780         export function CResult_PrivateRouteCreationErrorZ_clone(orig: number): number {
3781                 if(!isWasmInitialized) {
3782                         throw new Error("initializeWasm() must be awaited first!");
3783                 }
3784                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_clone(orig);
3785                 return nativeResponseValue;
3786         }
3787         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
3788         export function CResult_StringErrorZ_ok(o: String): number {
3789                 if(!isWasmInitialized) {
3790                         throw new Error("initializeWasm() must be awaited first!");
3791                 }
3792                 const nativeResponseValue = wasm.CResult_StringErrorZ_ok(o);
3793                 return nativeResponseValue;
3794         }
3795         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
3796         export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
3797                 if(!isWasmInitialized) {
3798                         throw new Error("initializeWasm() must be awaited first!");
3799                 }
3800                 const nativeResponseValue = wasm.CResult_StringErrorZ_err(e);
3801                 return nativeResponseValue;
3802         }
3803         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
3804         export function CResult_StringErrorZ_free(_res: number): void {
3805                 if(!isWasmInitialized) {
3806                         throw new Error("initializeWasm() must be awaited first!");
3807                 }
3808                 const nativeResponseValue = wasm.CResult_StringErrorZ_free(_res);
3809                 // debug statements here
3810         }
3811         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
3812         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
3813                 if(!isWasmInitialized) {
3814                         throw new Error("initializeWasm() must be awaited first!");
3815                 }
3816                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
3817                 return nativeResponseValue;
3818         }
3819         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3820         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
3821                 if(!isWasmInitialized) {
3822                         throw new Error("initializeWasm() must be awaited first!");
3823                 }
3824                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
3825                 return nativeResponseValue;
3826         }
3827         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
3828         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
3829                 if(!isWasmInitialized) {
3830                         throw new Error("initializeWasm() must be awaited first!");
3831                 }
3832                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
3833                 // debug statements here
3834         }
3835         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
3836         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
3837                 if(!isWasmInitialized) {
3838                         throw new Error("initializeWasm() must be awaited first!");
3839                 }
3840                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
3841                 return nativeResponseValue;
3842         }
3843         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
3844         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
3845                 if(!isWasmInitialized) {
3846                         throw new Error("initializeWasm() must be awaited first!");
3847                 }
3848                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
3849                 return nativeResponseValue;
3850         }
3851         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3852         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
3853                 if(!isWasmInitialized) {
3854                         throw new Error("initializeWasm() must be awaited first!");
3855                 }
3856                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
3857                 return nativeResponseValue;
3858         }
3859         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
3860         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
3861                 if(!isWasmInitialized) {
3862                         throw new Error("initializeWasm() must be awaited first!");
3863                 }
3864                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
3865                 // debug statements here
3866         }
3867         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
3868         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
3869                 if(!isWasmInitialized) {
3870                         throw new Error("initializeWasm() must be awaited first!");
3871                 }
3872                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
3873                 return nativeResponseValue;
3874         }
3875         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
3876         export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
3877                 if(!isWasmInitialized) {
3878                         throw new Error("initializeWasm() must be awaited first!");
3879                 }
3880                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
3881                 return nativeResponseValue;
3882         }
3883         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
3884         export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
3885                 if(!isWasmInitialized) {
3886                         throw new Error("initializeWasm() must be awaited first!");
3887                 }
3888                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
3889                 return nativeResponseValue;
3890         }
3891         // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
3892         export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
3893                 if(!isWasmInitialized) {
3894                         throw new Error("initializeWasm() must be awaited first!");
3895                 }
3896                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
3897                 // debug statements here
3898         }
3899         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
3900         export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
3901                 if(!isWasmInitialized) {
3902                         throw new Error("initializeWasm() must be awaited first!");
3903                 }
3904                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
3905                 return nativeResponseValue;
3906         }
3907         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
3908         export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
3909                 if(!isWasmInitialized) {
3910                         throw new Error("initializeWasm() must be awaited first!");
3911                 }
3912                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
3913                 return nativeResponseValue;
3914         }
3915         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
3916         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
3917                 if(!isWasmInitialized) {
3918                         throw new Error("initializeWasm() must be awaited first!");
3919                 }
3920                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
3921                 return nativeResponseValue;
3922         }
3923         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
3924         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
3925                 if(!isWasmInitialized) {
3926                         throw new Error("initializeWasm() must be awaited first!");
3927                 }
3928                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
3929                 // debug statements here
3930         }
3931         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
3932         export function C2Tuple_u32ScriptZ_clone(orig: number): number {
3933                 if(!isWasmInitialized) {
3934                         throw new Error("initializeWasm() must be awaited first!");
3935                 }
3936                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
3937                 return nativeResponseValue;
3938         }
3939         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
3940         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
3941                 if(!isWasmInitialized) {
3942                         throw new Error("initializeWasm() must be awaited first!");
3943                 }
3944                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
3945                 return nativeResponseValue;
3946         }
3947         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
3948         export function C2Tuple_u32ScriptZ_free(_res: number): void {
3949                 if(!isWasmInitialized) {
3950                         throw new Error("initializeWasm() must be awaited first!");
3951                 }
3952                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
3953                 // debug statements here
3954         }
3955         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
3956         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
3957                 if(!isWasmInitialized) {
3958                         throw new Error("initializeWasm() must be awaited first!");
3959                 }
3960                 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
3961                 // debug statements here
3962         }
3963         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
3964         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig: number): number {
3965                 if(!isWasmInitialized) {
3966                         throw new Error("initializeWasm() must be awaited first!");
3967                 }
3968                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig);
3969                 return nativeResponseValue;
3970         }
3971         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
3972         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
3973                 if(!isWasmInitialized) {
3974                         throw new Error("initializeWasm() must be awaited first!");
3975                 }
3976                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
3977                 return nativeResponseValue;
3978         }
3979         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
3980         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
3981                 if(!isWasmInitialized) {
3982                         throw new Error("initializeWasm() must be awaited first!");
3983                 }
3984                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
3985                 // debug statements here
3986         }
3987         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
3988         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
3989                 if(!isWasmInitialized) {
3990                         throw new Error("initializeWasm() must be awaited first!");
3991                 }
3992                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
3993                 // debug statements here
3994         }
3995         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
3996         export function CVec_EventZ_free(_res: number[]): void {
3997                 if(!isWasmInitialized) {
3998                         throw new Error("initializeWasm() must be awaited first!");
3999                 }
4000                 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
4001                 // debug statements here
4002         }
4003         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
4004         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
4005                 if(!isWasmInitialized) {
4006                         throw new Error("initializeWasm() must be awaited first!");
4007                 }
4008                 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
4009                 // debug statements here
4010         }
4011         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
4012         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
4013                 if(!isWasmInitialized) {
4014                         throw new Error("initializeWasm() must be awaited first!");
4015                 }
4016                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
4017                 return nativeResponseValue;
4018         }
4019         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
4020         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
4021                 if(!isWasmInitialized) {
4022                         throw new Error("initializeWasm() must be awaited first!");
4023                 }
4024                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
4025                 return nativeResponseValue;
4026         }
4027         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
4028         export function C2Tuple_u32TxOutZ_free(_res: number): void {
4029                 if(!isWasmInitialized) {
4030                         throw new Error("initializeWasm() must be awaited first!");
4031                 }
4032                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
4033                 // debug statements here
4034         }
4035         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
4036         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
4037                 if(!isWasmInitialized) {
4038                         throw new Error("initializeWasm() must be awaited first!");
4039                 }
4040                 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
4041                 // debug statements here
4042         }
4043         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
4044         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
4045                 if(!isWasmInitialized) {
4046                         throw new Error("initializeWasm() must be awaited first!");
4047                 }
4048                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
4049                 return nativeResponseValue;
4050         }
4051         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
4052         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
4053                 if(!isWasmInitialized) {
4054                         throw new Error("initializeWasm() must be awaited first!");
4055                 }
4056                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
4057                 return nativeResponseValue;
4058         }
4059         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
4060         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
4061                 if(!isWasmInitialized) {
4062                         throw new Error("initializeWasm() must be awaited first!");
4063                 }
4064                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
4065                 // debug statements here
4066         }
4067         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
4068         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
4069                 if(!isWasmInitialized) {
4070                         throw new Error("initializeWasm() must be awaited first!");
4071                 }
4072                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
4073                 // debug statements here
4074         }
4075         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
4076         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
4077                 if(!isWasmInitialized) {
4078                         throw new Error("initializeWasm() must be awaited first!");
4079                 }
4080                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
4081                 return nativeResponseValue;
4082         }
4083         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
4084         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
4085                 if(!isWasmInitialized) {
4086                         throw new Error("initializeWasm() must be awaited first!");
4087                 }
4088                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
4089                 return nativeResponseValue;
4090         }
4091         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
4092         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
4093                 if(!isWasmInitialized) {
4094                         throw new Error("initializeWasm() must be awaited first!");
4095                 }
4096                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
4097                 // debug statements here
4098         }
4099         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
4100         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
4101                 if(!isWasmInitialized) {
4102                         throw new Error("initializeWasm() must be awaited first!");
4103                 }
4104                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
4105                 return nativeResponseValue;
4106         }
4107         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
4108         export function CResult_boolLightningErrorZ_err(e: number): number {
4109                 if(!isWasmInitialized) {
4110                         throw new Error("initializeWasm() must be awaited first!");
4111                 }
4112                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
4113                 return nativeResponseValue;
4114         }
4115         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
4116         export function CResult_boolLightningErrorZ_free(_res: number): void {
4117                 if(!isWasmInitialized) {
4118                         throw new Error("initializeWasm() must be awaited first!");
4119                 }
4120                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
4121                 // debug statements here
4122         }
4123         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
4124         export function CResult_boolLightningErrorZ_clone(orig: number): number {
4125                 if(!isWasmInitialized) {
4126                         throw new Error("initializeWasm() must be awaited first!");
4127                 }
4128                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
4129                 return nativeResponseValue;
4130         }
4131         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
4132         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
4133                 if(!isWasmInitialized) {
4134                         throw new Error("initializeWasm() must be awaited first!");
4135                 }
4136                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
4137                 return nativeResponseValue;
4138         }
4139         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
4140         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
4141                 if(!isWasmInitialized) {
4142                         throw new Error("initializeWasm() must be awaited first!");
4143                 }
4144                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
4145                 return nativeResponseValue;
4146         }
4147         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
4148         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
4149                 if(!isWasmInitialized) {
4150                         throw new Error("initializeWasm() must be awaited first!");
4151                 }
4152                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
4153                 // debug statements here
4154         }
4155         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
4156         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
4157                 if(!isWasmInitialized) {
4158                         throw new Error("initializeWasm() must be awaited first!");
4159                 }
4160                 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
4161                 // debug statements here
4162         }
4163         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
4164         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
4165                 if(!isWasmInitialized) {
4166                         throw new Error("initializeWasm() must be awaited first!");
4167                 }
4168                 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
4169                 // debug statements here
4170         }
4171         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
4172         export function CResult_NoneLightningErrorZ_ok(): number {
4173                 if(!isWasmInitialized) {
4174                         throw new Error("initializeWasm() must be awaited first!");
4175                 }
4176                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
4177                 return nativeResponseValue;
4178         }
4179         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
4180         export function CResult_NoneLightningErrorZ_err(e: number): number {
4181                 if(!isWasmInitialized) {
4182                         throw new Error("initializeWasm() must be awaited first!");
4183                 }
4184                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
4185                 return nativeResponseValue;
4186         }
4187         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
4188         export function CResult_NoneLightningErrorZ_free(_res: number): void {
4189                 if(!isWasmInitialized) {
4190                         throw new Error("initializeWasm() must be awaited first!");
4191                 }
4192                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
4193                 // debug statements here
4194         }
4195         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
4196         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
4197                 if(!isWasmInitialized) {
4198                         throw new Error("initializeWasm() must be awaited first!");
4199                 }
4200                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
4201                 return nativeResponseValue;
4202         }
4203         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
4204         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
4205                 if(!isWasmInitialized) {
4206                         throw new Error("initializeWasm() must be awaited first!");
4207                 }
4208                 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
4209                 // debug statements here
4210         }
4211         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
4212         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
4213                 if(!isWasmInitialized) {
4214                         throw new Error("initializeWasm() must be awaited first!");
4215                 }
4216                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
4217                 return nativeResponseValue;
4218         }
4219         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
4220         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
4221                 if(!isWasmInitialized) {
4222                         throw new Error("initializeWasm() must be awaited first!");
4223                 }
4224                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
4225                 return nativeResponseValue;
4226         }
4227         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
4228         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
4229                 if(!isWasmInitialized) {
4230                         throw new Error("initializeWasm() must be awaited first!");
4231                 }
4232                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
4233                 // debug statements here
4234         }
4235         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
4236         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
4237                 if(!isWasmInitialized) {
4238                         throw new Error("initializeWasm() must be awaited first!");
4239                 }
4240                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
4241                 return nativeResponseValue;
4242         }
4243         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
4244         export function CResult_NonePeerHandleErrorZ_ok(): number {
4245                 if(!isWasmInitialized) {
4246                         throw new Error("initializeWasm() must be awaited first!");
4247                 }
4248                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
4249                 return nativeResponseValue;
4250         }
4251         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
4252         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
4253                 if(!isWasmInitialized) {
4254                         throw new Error("initializeWasm() must be awaited first!");
4255                 }
4256                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
4257                 return nativeResponseValue;
4258         }
4259         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
4260         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
4261                 if(!isWasmInitialized) {
4262                         throw new Error("initializeWasm() must be awaited first!");
4263                 }
4264                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
4265                 // debug statements here
4266         }
4267         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
4268         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
4269                 if(!isWasmInitialized) {
4270                         throw new Error("initializeWasm() must be awaited first!");
4271                 }
4272                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
4273                 return nativeResponseValue;
4274         }
4275         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
4276         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
4277                 if(!isWasmInitialized) {
4278                         throw new Error("initializeWasm() must be awaited first!");
4279                 }
4280                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
4281                 return nativeResponseValue;
4282         }
4283         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
4284         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
4285                 if(!isWasmInitialized) {
4286                         throw new Error("initializeWasm() must be awaited first!");
4287                 }
4288                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
4289                 return nativeResponseValue;
4290         }
4291         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
4292         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
4293                 if(!isWasmInitialized) {
4294                         throw new Error("initializeWasm() must be awaited first!");
4295                 }
4296                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
4297                 // debug statements here
4298         }
4299         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
4300         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
4301                 if(!isWasmInitialized) {
4302                         throw new Error("initializeWasm() must be awaited first!");
4303                 }
4304                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
4305                 return nativeResponseValue;
4306         }
4307         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
4308         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
4309                 if(!isWasmInitialized) {
4310                         throw new Error("initializeWasm() must be awaited first!");
4311                 }
4312                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
4313                 return nativeResponseValue;
4314         }
4315         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
4316         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
4317                 if(!isWasmInitialized) {
4318                         throw new Error("initializeWasm() must be awaited first!");
4319                 }
4320                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
4321                 return nativeResponseValue;
4322         }
4323         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
4324         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
4325                 if(!isWasmInitialized) {
4326                         throw new Error("initializeWasm() must be awaited first!");
4327                 }
4328                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
4329                 // debug statements here
4330         }
4331         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
4332         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
4333                 if(!isWasmInitialized) {
4334                         throw new Error("initializeWasm() must be awaited first!");
4335                 }
4336                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
4337                 return nativeResponseValue;
4338         }
4339         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
4340         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
4341                 if(!isWasmInitialized) {
4342                         throw new Error("initializeWasm() must be awaited first!");
4343                 }
4344                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
4345                 return nativeResponseValue;
4346         }
4347         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
4348         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
4349                 if(!isWasmInitialized) {
4350                         throw new Error("initializeWasm() must be awaited first!");
4351                 }
4352                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
4353                 return nativeResponseValue;
4354         }
4355         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
4356         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
4357                 if(!isWasmInitialized) {
4358                         throw new Error("initializeWasm() must be awaited first!");
4359                 }
4360                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
4361                 // debug statements here
4362         }
4363         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
4364         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
4365                 if(!isWasmInitialized) {
4366                         throw new Error("initializeWasm() must be awaited first!");
4367                 }
4368                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
4369                 return nativeResponseValue;
4370         }
4371         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
4372         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
4373                 if(!isWasmInitialized) {
4374                         throw new Error("initializeWasm() must be awaited first!");
4375                 }
4376                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
4377                 return nativeResponseValue;
4378         }
4379         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
4380         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
4381                 if(!isWasmInitialized) {
4382                         throw new Error("initializeWasm() must be awaited first!");
4383                 }
4384                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
4385                 return nativeResponseValue;
4386         }
4387         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
4388         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
4389                 if(!isWasmInitialized) {
4390                         throw new Error("initializeWasm() must be awaited first!");
4391                 }
4392                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
4393                 // debug statements here
4394         }
4395         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
4396         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
4397                 if(!isWasmInitialized) {
4398                         throw new Error("initializeWasm() must be awaited first!");
4399                 }
4400                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
4401                 return nativeResponseValue;
4402         }
4403         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
4404         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
4405                 if(!isWasmInitialized) {
4406                         throw new Error("initializeWasm() must be awaited first!");
4407                 }
4408                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
4409                 return nativeResponseValue;
4410         }
4411         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
4412         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
4413                 if(!isWasmInitialized) {
4414                         throw new Error("initializeWasm() must be awaited first!");
4415                 }
4416                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
4417                 return nativeResponseValue;
4418         }
4419         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
4420         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
4421                 if(!isWasmInitialized) {
4422                         throw new Error("initializeWasm() must be awaited first!");
4423                 }
4424                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
4425                 // debug statements here
4426         }
4427         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
4428         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
4429                 if(!isWasmInitialized) {
4430                         throw new Error("initializeWasm() must be awaited first!");
4431                 }
4432                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
4433                 return nativeResponseValue;
4434         }
4435         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
4436         export function CVec_u64Z_free(_res: number[]): void {
4437                 if(!isWasmInitialized) {
4438                         throw new Error("initializeWasm() must be awaited first!");
4439                 }
4440                 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
4441                 // debug statements here
4442         }
4443         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
4444         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
4445                 if(!isWasmInitialized) {
4446                         throw new Error("initializeWasm() must be awaited first!");
4447                 }
4448                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
4449                 return nativeResponseValue;
4450         }
4451         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
4452         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
4453                 if(!isWasmInitialized) {
4454                         throw new Error("initializeWasm() must be awaited first!");
4455                 }
4456                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
4457                 return nativeResponseValue;
4458         }
4459         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
4460         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
4461                 if(!isWasmInitialized) {
4462                         throw new Error("initializeWasm() must be awaited first!");
4463                 }
4464                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
4465                 // debug statements here
4466         }
4467         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
4468         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
4469                 if(!isWasmInitialized) {
4470                         throw new Error("initializeWasm() must be awaited first!");
4471                 }
4472                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
4473                 return nativeResponseValue;
4474         }
4475         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
4476         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
4477                 if(!isWasmInitialized) {
4478                         throw new Error("initializeWasm() must be awaited first!");
4479                 }
4480                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
4481                 return nativeResponseValue;
4482         }
4483         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
4484         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
4485                 if(!isWasmInitialized) {
4486                         throw new Error("initializeWasm() must be awaited first!");
4487                 }
4488                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
4489                 return nativeResponseValue;
4490         }
4491         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
4492         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
4493                 if(!isWasmInitialized) {
4494                         throw new Error("initializeWasm() must be awaited first!");
4495                 }
4496                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
4497                 // debug statements here
4498         }
4499         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
4500         export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
4501                 if(!isWasmInitialized) {
4502                         throw new Error("initializeWasm() must be awaited first!");
4503                 }
4504                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
4505                 return nativeResponseValue;
4506         }
4507         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
4508         export function CResult_NetAddressu8Z_ok(o: number): number {
4509                 if(!isWasmInitialized) {
4510                         throw new Error("initializeWasm() must be awaited first!");
4511                 }
4512                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
4513                 return nativeResponseValue;
4514         }
4515         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
4516         export function CResult_NetAddressu8Z_err(e: number): number {
4517                 if(!isWasmInitialized) {
4518                         throw new Error("initializeWasm() must be awaited first!");
4519                 }
4520                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
4521                 return nativeResponseValue;
4522         }
4523         // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
4524         export function CResult_NetAddressu8Z_free(_res: number): void {
4525                 if(!isWasmInitialized) {
4526                         throw new Error("initializeWasm() must be awaited first!");
4527                 }
4528                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
4529                 // debug statements here
4530         }
4531         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
4532         export function CResult_NetAddressu8Z_clone(orig: number): number {
4533                 if(!isWasmInitialized) {
4534                         throw new Error("initializeWasm() must be awaited first!");
4535                 }
4536                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
4537                 return nativeResponseValue;
4538         }
4539         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
4540         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
4541                 if(!isWasmInitialized) {
4542                         throw new Error("initializeWasm() must be awaited first!");
4543                 }
4544                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
4545                 return nativeResponseValue;
4546         }
4547         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
4548         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
4549                 if(!isWasmInitialized) {
4550                         throw new Error("initializeWasm() must be awaited first!");
4551                 }
4552                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
4553                 return nativeResponseValue;
4554         }
4555         // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
4556         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
4557                 if(!isWasmInitialized) {
4558                         throw new Error("initializeWasm() must be awaited first!");
4559                 }
4560                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
4561                 // debug statements here
4562         }
4563         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
4564         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
4565                 if(!isWasmInitialized) {
4566                         throw new Error("initializeWasm() must be awaited first!");
4567                 }
4568                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
4569                 return nativeResponseValue;
4570         }
4571         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
4572         export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
4573                 if(!isWasmInitialized) {
4574                         throw new Error("initializeWasm() must be awaited first!");
4575                 }
4576                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_ok(o);
4577                 return nativeResponseValue;
4578         }
4579         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
4580         export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
4581                 if(!isWasmInitialized) {
4582                         throw new Error("initializeWasm() must be awaited first!");
4583                 }
4584                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_err(e);
4585                 return nativeResponseValue;
4586         }
4587         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
4588         export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
4589                 if(!isWasmInitialized) {
4590                         throw new Error("initializeWasm() must be awaited first!");
4591                 }
4592                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_free(_res);
4593                 // debug statements here
4594         }
4595         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
4596         export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
4597                 if(!isWasmInitialized) {
4598                         throw new Error("initializeWasm() must be awaited first!");
4599                 }
4600                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone(orig);
4601                 return nativeResponseValue;
4602         }
4603         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
4604         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
4605                 if(!isWasmInitialized) {
4606                         throw new Error("initializeWasm() must be awaited first!");
4607                 }
4608                 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
4609                 // debug statements here
4610         }
4611         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
4612         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
4613                 if(!isWasmInitialized) {
4614                         throw new Error("initializeWasm() must be awaited first!");
4615                 }
4616                 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
4617                 // debug statements here
4618         }
4619         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
4620         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
4621                 if(!isWasmInitialized) {
4622                         throw new Error("initializeWasm() must be awaited first!");
4623                 }
4624                 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
4625                 // debug statements here
4626         }
4627         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
4628         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
4629                 if(!isWasmInitialized) {
4630                         throw new Error("initializeWasm() must be awaited first!");
4631                 }
4632                 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
4633                 // debug statements here
4634         }
4635         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
4636         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
4637                 if(!isWasmInitialized) {
4638                         throw new Error("initializeWasm() must be awaited first!");
4639                 }
4640                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
4641                 return nativeResponseValue;
4642         }
4643         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
4644         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
4645                 if(!isWasmInitialized) {
4646                         throw new Error("initializeWasm() must be awaited first!");
4647                 }
4648                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
4649                 return nativeResponseValue;
4650         }
4651         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
4652         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
4653                 if(!isWasmInitialized) {
4654                         throw new Error("initializeWasm() must be awaited first!");
4655                 }
4656                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
4657                 // debug statements here
4658         }
4659         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
4660         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
4661                 if(!isWasmInitialized) {
4662                         throw new Error("initializeWasm() must be awaited first!");
4663                 }
4664                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
4665                 return nativeResponseValue;
4666         }
4667         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
4668         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
4669                 if(!isWasmInitialized) {
4670                         throw new Error("initializeWasm() must be awaited first!");
4671                 }
4672                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
4673                 return nativeResponseValue;
4674         }
4675         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
4676         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
4677                 if(!isWasmInitialized) {
4678                         throw new Error("initializeWasm() must be awaited first!");
4679                 }
4680                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
4681                 return nativeResponseValue;
4682         }
4683         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
4684         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
4685                 if(!isWasmInitialized) {
4686                         throw new Error("initializeWasm() must be awaited first!");
4687                 }
4688                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
4689                 // debug statements here
4690         }
4691         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
4692         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
4693                 if(!isWasmInitialized) {
4694                         throw new Error("initializeWasm() must be awaited first!");
4695                 }
4696                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
4697                 return nativeResponseValue;
4698         }
4699         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
4700         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
4701                 if(!isWasmInitialized) {
4702                         throw new Error("initializeWasm() must be awaited first!");
4703                 }
4704                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
4705                 return nativeResponseValue;
4706         }
4707         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
4708         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
4709                 if(!isWasmInitialized) {
4710                         throw new Error("initializeWasm() must be awaited first!");
4711                 }
4712                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
4713                 return nativeResponseValue;
4714         }
4715         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
4716         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
4717                 if(!isWasmInitialized) {
4718                         throw new Error("initializeWasm() must be awaited first!");
4719                 }
4720                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
4721                 // debug statements here
4722         }
4723         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
4724         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
4725                 if(!isWasmInitialized) {
4726                         throw new Error("initializeWasm() must be awaited first!");
4727                 }
4728                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
4729                 return nativeResponseValue;
4730         }
4731         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
4732         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
4733                 if(!isWasmInitialized) {
4734                         throw new Error("initializeWasm() must be awaited first!");
4735                 }
4736                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
4737                 return nativeResponseValue;
4738         }
4739         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
4740         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
4741                 if(!isWasmInitialized) {
4742                         throw new Error("initializeWasm() must be awaited first!");
4743                 }
4744                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
4745                 return nativeResponseValue;
4746         }
4747         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
4748         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
4749                 if(!isWasmInitialized) {
4750                         throw new Error("initializeWasm() must be awaited first!");
4751                 }
4752                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
4753                 // debug statements here
4754         }
4755         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
4756         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
4757                 if(!isWasmInitialized) {
4758                         throw new Error("initializeWasm() must be awaited first!");
4759                 }
4760                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
4761                 return nativeResponseValue;
4762         }
4763         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
4764         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
4765                 if(!isWasmInitialized) {
4766                         throw new Error("initializeWasm() must be awaited first!");
4767                 }
4768                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
4769                 return nativeResponseValue;
4770         }
4771         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
4772         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
4773                 if(!isWasmInitialized) {
4774                         throw new Error("initializeWasm() must be awaited first!");
4775                 }
4776                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
4777                 return nativeResponseValue;
4778         }
4779         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
4780         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
4781                 if(!isWasmInitialized) {
4782                         throw new Error("initializeWasm() must be awaited first!");
4783                 }
4784                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
4785                 // debug statements here
4786         }
4787         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
4788         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
4789                 if(!isWasmInitialized) {
4790                         throw new Error("initializeWasm() must be awaited first!");
4791                 }
4792                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
4793                 return nativeResponseValue;
4794         }
4795         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
4796         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
4797                 if(!isWasmInitialized) {
4798                         throw new Error("initializeWasm() must be awaited first!");
4799                 }
4800                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
4801                 return nativeResponseValue;
4802         }
4803         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
4804         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
4805                 if(!isWasmInitialized) {
4806                         throw new Error("initializeWasm() must be awaited first!");
4807                 }
4808                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
4809                 return nativeResponseValue;
4810         }
4811         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
4812         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
4813                 if(!isWasmInitialized) {
4814                         throw new Error("initializeWasm() must be awaited first!");
4815                 }
4816                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
4817                 // debug statements here
4818         }
4819         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
4820         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
4821                 if(!isWasmInitialized) {
4822                         throw new Error("initializeWasm() must be awaited first!");
4823                 }
4824                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
4825                 return nativeResponseValue;
4826         }
4827         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
4828         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
4829                 if(!isWasmInitialized) {
4830                         throw new Error("initializeWasm() must be awaited first!");
4831                 }
4832                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
4833                 return nativeResponseValue;
4834         }
4835         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
4836         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
4837                 if(!isWasmInitialized) {
4838                         throw new Error("initializeWasm() must be awaited first!");
4839                 }
4840                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
4841                 return nativeResponseValue;
4842         }
4843         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
4844         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
4845                 if(!isWasmInitialized) {
4846                         throw new Error("initializeWasm() must be awaited first!");
4847                 }
4848                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
4849                 // debug statements here
4850         }
4851         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
4852         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
4853                 if(!isWasmInitialized) {
4854                         throw new Error("initializeWasm() must be awaited first!");
4855                 }
4856                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
4857                 return nativeResponseValue;
4858         }
4859         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
4860         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
4861                 if(!isWasmInitialized) {
4862                         throw new Error("initializeWasm() must be awaited first!");
4863                 }
4864                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
4865                 return nativeResponseValue;
4866         }
4867         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
4868         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
4869                 if(!isWasmInitialized) {
4870                         throw new Error("initializeWasm() must be awaited first!");
4871                 }
4872                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
4873                 return nativeResponseValue;
4874         }
4875         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
4876         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
4877                 if(!isWasmInitialized) {
4878                         throw new Error("initializeWasm() must be awaited first!");
4879                 }
4880                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
4881                 // debug statements here
4882         }
4883         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
4884         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
4885                 if(!isWasmInitialized) {
4886                         throw new Error("initializeWasm() must be awaited first!");
4887                 }
4888                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
4889                 return nativeResponseValue;
4890         }
4891         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
4892         export function CResult_InitDecodeErrorZ_ok(o: number): number {
4893                 if(!isWasmInitialized) {
4894                         throw new Error("initializeWasm() must be awaited first!");
4895                 }
4896                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
4897                 return nativeResponseValue;
4898         }
4899         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
4900         export function CResult_InitDecodeErrorZ_err(e: number): number {
4901                 if(!isWasmInitialized) {
4902                         throw new Error("initializeWasm() must be awaited first!");
4903                 }
4904                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
4905                 return nativeResponseValue;
4906         }
4907         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
4908         export function CResult_InitDecodeErrorZ_free(_res: number): void {
4909                 if(!isWasmInitialized) {
4910                         throw new Error("initializeWasm() must be awaited first!");
4911                 }
4912                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
4913                 // debug statements here
4914         }
4915         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
4916         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
4917                 if(!isWasmInitialized) {
4918                         throw new Error("initializeWasm() must be awaited first!");
4919                 }
4920                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
4921                 return nativeResponseValue;
4922         }
4923         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
4924         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
4925                 if(!isWasmInitialized) {
4926                         throw new Error("initializeWasm() must be awaited first!");
4927                 }
4928                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
4929                 return nativeResponseValue;
4930         }
4931         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
4932         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
4933                 if(!isWasmInitialized) {
4934                         throw new Error("initializeWasm() must be awaited first!");
4935                 }
4936                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
4937                 return nativeResponseValue;
4938         }
4939         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
4940         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
4941                 if(!isWasmInitialized) {
4942                         throw new Error("initializeWasm() must be awaited first!");
4943                 }
4944                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
4945                 // debug statements here
4946         }
4947         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
4948         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
4949                 if(!isWasmInitialized) {
4950                         throw new Error("initializeWasm() must be awaited first!");
4951                 }
4952                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
4953                 return nativeResponseValue;
4954         }
4955         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
4956         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
4957                 if(!isWasmInitialized) {
4958                         throw new Error("initializeWasm() must be awaited first!");
4959                 }
4960                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
4961                 return nativeResponseValue;
4962         }
4963         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
4964         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
4965                 if(!isWasmInitialized) {
4966                         throw new Error("initializeWasm() must be awaited first!");
4967                 }
4968                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
4969                 return nativeResponseValue;
4970         }
4971         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
4972         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
4973                 if(!isWasmInitialized) {
4974                         throw new Error("initializeWasm() must be awaited first!");
4975                 }
4976                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
4977                 // debug statements here
4978         }
4979         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
4980         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
4981                 if(!isWasmInitialized) {
4982                         throw new Error("initializeWasm() must be awaited first!");
4983                 }
4984                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
4985                 return nativeResponseValue;
4986         }
4987         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
4988         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
4989                 if(!isWasmInitialized) {
4990                         throw new Error("initializeWasm() must be awaited first!");
4991                 }
4992                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
4993                 return nativeResponseValue;
4994         }
4995         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
4996         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
4997                 if(!isWasmInitialized) {
4998                         throw new Error("initializeWasm() must be awaited first!");
4999                 }
5000                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
5001                 return nativeResponseValue;
5002         }
5003         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
5004         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
5005                 if(!isWasmInitialized) {
5006                         throw new Error("initializeWasm() must be awaited first!");
5007                 }
5008                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
5009                 // debug statements here
5010         }
5011         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
5012         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
5013                 if(!isWasmInitialized) {
5014                         throw new Error("initializeWasm() must be awaited first!");
5015                 }
5016                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
5017                 return nativeResponseValue;
5018         }
5019         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
5020         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
5021                 if(!isWasmInitialized) {
5022                         throw new Error("initializeWasm() must be awaited first!");
5023                 }
5024                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
5025                 return nativeResponseValue;
5026         }
5027         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5028         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
5029                 if(!isWasmInitialized) {
5030                         throw new Error("initializeWasm() must be awaited first!");
5031                 }
5032                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
5033                 return nativeResponseValue;
5034         }
5035         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
5036         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
5037                 if(!isWasmInitialized) {
5038                         throw new Error("initializeWasm() must be awaited first!");
5039                 }
5040                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
5041                 // debug statements here
5042         }
5043         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
5044         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
5045                 if(!isWasmInitialized) {
5046                         throw new Error("initializeWasm() must be awaited first!");
5047                 }
5048                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
5049                 return nativeResponseValue;
5050         }
5051         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
5052         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
5053                 if(!isWasmInitialized) {
5054                         throw new Error("initializeWasm() must be awaited first!");
5055                 }
5056                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
5057                 return nativeResponseValue;
5058         }
5059         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5060         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
5061                 if(!isWasmInitialized) {
5062                         throw new Error("initializeWasm() must be awaited first!");
5063                 }
5064                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
5065                 return nativeResponseValue;
5066         }
5067         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
5068         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
5069                 if(!isWasmInitialized) {
5070                         throw new Error("initializeWasm() must be awaited first!");
5071                 }
5072                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
5073                 // debug statements here
5074         }
5075         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
5076         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
5077                 if(!isWasmInitialized) {
5078                         throw new Error("initializeWasm() must be awaited first!");
5079                 }
5080                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
5081                 return nativeResponseValue;
5082         }
5083         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
5084         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
5085                 if(!isWasmInitialized) {
5086                         throw new Error("initializeWasm() must be awaited first!");
5087                 }
5088                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
5089                 return nativeResponseValue;
5090         }
5091         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
5092         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
5093                 if(!isWasmInitialized) {
5094                         throw new Error("initializeWasm() must be awaited first!");
5095                 }
5096                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
5097                 return nativeResponseValue;
5098         }
5099         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
5100         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
5101                 if(!isWasmInitialized) {
5102                         throw new Error("initializeWasm() must be awaited first!");
5103                 }
5104                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
5105                 // debug statements here
5106         }
5107         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
5108         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
5109                 if(!isWasmInitialized) {
5110                         throw new Error("initializeWasm() must be awaited first!");
5111                 }
5112                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
5113                 return nativeResponseValue;
5114         }
5115         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
5116         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
5117                 if(!isWasmInitialized) {
5118                         throw new Error("initializeWasm() must be awaited first!");
5119                 }
5120                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
5121                 return nativeResponseValue;
5122         }
5123         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5124         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
5125                 if(!isWasmInitialized) {
5126                         throw new Error("initializeWasm() must be awaited first!");
5127                 }
5128                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
5129                 return nativeResponseValue;
5130         }
5131         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
5132         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
5133                 if(!isWasmInitialized) {
5134                         throw new Error("initializeWasm() must be awaited first!");
5135                 }
5136                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
5137                 // debug statements here
5138         }
5139         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
5140         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
5141                 if(!isWasmInitialized) {
5142                         throw new Error("initializeWasm() must be awaited first!");
5143                 }
5144                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
5145                 return nativeResponseValue;
5146         }
5147         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
5148         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
5149                 if(!isWasmInitialized) {
5150                         throw new Error("initializeWasm() must be awaited first!");
5151                 }
5152                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
5153                 return nativeResponseValue;
5154         }
5155         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5156         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
5157                 if(!isWasmInitialized) {
5158                         throw new Error("initializeWasm() must be awaited first!");
5159                 }
5160                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
5161                 return nativeResponseValue;
5162         }
5163         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
5164         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
5165                 if(!isWasmInitialized) {
5166                         throw new Error("initializeWasm() must be awaited first!");
5167                 }
5168                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
5169                 // debug statements here
5170         }
5171         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
5172         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
5173                 if(!isWasmInitialized) {
5174                         throw new Error("initializeWasm() must be awaited first!");
5175                 }
5176                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
5177                 return nativeResponseValue;
5178         }
5179         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
5180         export function CResult_PingDecodeErrorZ_ok(o: number): number {
5181                 if(!isWasmInitialized) {
5182                         throw new Error("initializeWasm() must be awaited first!");
5183                 }
5184                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
5185                 return nativeResponseValue;
5186         }
5187         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
5188         export function CResult_PingDecodeErrorZ_err(e: number): number {
5189                 if(!isWasmInitialized) {
5190                         throw new Error("initializeWasm() must be awaited first!");
5191                 }
5192                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
5193                 return nativeResponseValue;
5194         }
5195         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
5196         export function CResult_PingDecodeErrorZ_free(_res: number): void {
5197                 if(!isWasmInitialized) {
5198                         throw new Error("initializeWasm() must be awaited first!");
5199                 }
5200                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
5201                 // debug statements here
5202         }
5203         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
5204         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
5205                 if(!isWasmInitialized) {
5206                         throw new Error("initializeWasm() must be awaited first!");
5207                 }
5208                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
5209                 return nativeResponseValue;
5210         }
5211         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
5212         export function CResult_PongDecodeErrorZ_ok(o: number): number {
5213                 if(!isWasmInitialized) {
5214                         throw new Error("initializeWasm() must be awaited first!");
5215                 }
5216                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
5217                 return nativeResponseValue;
5218         }
5219         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
5220         export function CResult_PongDecodeErrorZ_err(e: number): number {
5221                 if(!isWasmInitialized) {
5222                         throw new Error("initializeWasm() must be awaited first!");
5223                 }
5224                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
5225                 return nativeResponseValue;
5226         }
5227         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
5228         export function CResult_PongDecodeErrorZ_free(_res: number): void {
5229                 if(!isWasmInitialized) {
5230                         throw new Error("initializeWasm() must be awaited first!");
5231                 }
5232                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
5233                 // debug statements here
5234         }
5235         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
5236         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
5237                 if(!isWasmInitialized) {
5238                         throw new Error("initializeWasm() must be awaited first!");
5239                 }
5240                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
5241                 return nativeResponseValue;
5242         }
5243         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
5244         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
5245                 if(!isWasmInitialized) {
5246                         throw new Error("initializeWasm() must be awaited first!");
5247                 }
5248                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
5249                 return nativeResponseValue;
5250         }
5251         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5252         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
5253                 if(!isWasmInitialized) {
5254                         throw new Error("initializeWasm() must be awaited first!");
5255                 }
5256                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
5257                 return nativeResponseValue;
5258         }
5259         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
5260         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
5261                 if(!isWasmInitialized) {
5262                         throw new Error("initializeWasm() must be awaited first!");
5263                 }
5264                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
5265                 // debug statements here
5266         }
5267         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5268         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
5269                 if(!isWasmInitialized) {
5270                         throw new Error("initializeWasm() must be awaited first!");
5271                 }
5272                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
5273                 return nativeResponseValue;
5274         }
5275         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
5276         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
5277                 if(!isWasmInitialized) {
5278                         throw new Error("initializeWasm() must be awaited first!");
5279                 }
5280                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
5281                 return nativeResponseValue;
5282         }
5283         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5284         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
5285                 if(!isWasmInitialized) {
5286                         throw new Error("initializeWasm() must be awaited first!");
5287                 }
5288                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
5289                 return nativeResponseValue;
5290         }
5291         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
5292         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
5293                 if(!isWasmInitialized) {
5294                         throw new Error("initializeWasm() must be awaited first!");
5295                 }
5296                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
5297                 // debug statements here
5298         }
5299         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5300         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
5301                 if(!isWasmInitialized) {
5302                         throw new Error("initializeWasm() must be awaited first!");
5303                 }
5304                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
5305                 return nativeResponseValue;
5306         }
5307         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
5308         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
5309                 if(!isWasmInitialized) {
5310                         throw new Error("initializeWasm() must be awaited first!");
5311                 }
5312                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
5313                 return nativeResponseValue;
5314         }
5315         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5316         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
5317                 if(!isWasmInitialized) {
5318                         throw new Error("initializeWasm() must be awaited first!");
5319                 }
5320                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
5321                 return nativeResponseValue;
5322         }
5323         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
5324         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
5325                 if(!isWasmInitialized) {
5326                         throw new Error("initializeWasm() must be awaited first!");
5327                 }
5328                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
5329                 // debug statements here
5330         }
5331         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
5332         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
5333                 if(!isWasmInitialized) {
5334                         throw new Error("initializeWasm() must be awaited first!");
5335                 }
5336                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
5337                 return nativeResponseValue;
5338         }
5339         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
5340         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
5341                 if(!isWasmInitialized) {
5342                         throw new Error("initializeWasm() must be awaited first!");
5343                 }
5344                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
5345                 return nativeResponseValue;
5346         }
5347         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5348         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
5349                 if(!isWasmInitialized) {
5350                         throw new Error("initializeWasm() must be awaited first!");
5351                 }
5352                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
5353                 return nativeResponseValue;
5354         }
5355         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
5356         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
5357                 if(!isWasmInitialized) {
5358                         throw new Error("initializeWasm() must be awaited first!");
5359                 }
5360                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
5361                 // debug statements here
5362         }
5363         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
5364         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
5365                 if(!isWasmInitialized) {
5366                         throw new Error("initializeWasm() must be awaited first!");
5367                 }
5368                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
5369                 return nativeResponseValue;
5370         }
5371         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
5372         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
5373                 if(!isWasmInitialized) {
5374                         throw new Error("initializeWasm() must be awaited first!");
5375                 }
5376                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
5377                 return nativeResponseValue;
5378         }
5379         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
5380         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
5381                 if(!isWasmInitialized) {
5382                         throw new Error("initializeWasm() must be awaited first!");
5383                 }
5384                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
5385                 return nativeResponseValue;
5386         }
5387         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
5388         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
5389                 if(!isWasmInitialized) {
5390                         throw new Error("initializeWasm() must be awaited first!");
5391                 }
5392                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
5393                 // debug statements here
5394         }
5395         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
5396         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
5397                 if(!isWasmInitialized) {
5398                         throw new Error("initializeWasm() must be awaited first!");
5399                 }
5400                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
5401                 return nativeResponseValue;
5402         }
5403         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
5404         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
5405                 if(!isWasmInitialized) {
5406                         throw new Error("initializeWasm() must be awaited first!");
5407                 }
5408                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
5409                 return nativeResponseValue;
5410         }
5411         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5412         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
5413                 if(!isWasmInitialized) {
5414                         throw new Error("initializeWasm() must be awaited first!");
5415                 }
5416                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
5417                 return nativeResponseValue;
5418         }
5419         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
5420         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
5421                 if(!isWasmInitialized) {
5422                         throw new Error("initializeWasm() must be awaited first!");
5423                 }
5424                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
5425                 // debug statements here
5426         }
5427         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5428         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
5429                 if(!isWasmInitialized) {
5430                         throw new Error("initializeWasm() must be awaited first!");
5431                 }
5432                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
5433                 return nativeResponseValue;
5434         }
5435         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
5436         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
5437                 if(!isWasmInitialized) {
5438                         throw new Error("initializeWasm() must be awaited first!");
5439                 }
5440                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
5441                 return nativeResponseValue;
5442         }
5443         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5444         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
5445                 if(!isWasmInitialized) {
5446                         throw new Error("initializeWasm() must be awaited first!");
5447                 }
5448                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
5449                 return nativeResponseValue;
5450         }
5451         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
5452         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
5453                 if(!isWasmInitialized) {
5454                         throw new Error("initializeWasm() must be awaited first!");
5455                 }
5456                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
5457                 // debug statements here
5458         }
5459         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5460         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
5461                 if(!isWasmInitialized) {
5462                         throw new Error("initializeWasm() must be awaited first!");
5463                 }
5464                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
5465                 return nativeResponseValue;
5466         }
5467         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
5468         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
5469                 if(!isWasmInitialized) {
5470                         throw new Error("initializeWasm() must be awaited first!");
5471                 }
5472                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
5473                 return nativeResponseValue;
5474         }
5475         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
5476         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
5477                 if(!isWasmInitialized) {
5478                         throw new Error("initializeWasm() must be awaited first!");
5479                 }
5480                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
5481                 return nativeResponseValue;
5482         }
5483         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
5484         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
5485                 if(!isWasmInitialized) {
5486                         throw new Error("initializeWasm() must be awaited first!");
5487                 }
5488                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
5489                 // debug statements here
5490         }
5491         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
5492         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
5493                 if(!isWasmInitialized) {
5494                         throw new Error("initializeWasm() must be awaited first!");
5495                 }
5496                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
5497                 return nativeResponseValue;
5498         }
5499         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
5500         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
5501                 if(!isWasmInitialized) {
5502                         throw new Error("initializeWasm() must be awaited first!");
5503                 }
5504                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
5505                 return nativeResponseValue;
5506         }
5507         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
5508         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
5509                 if(!isWasmInitialized) {
5510                         throw new Error("initializeWasm() must be awaited first!");
5511                 }
5512                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
5513                 return nativeResponseValue;
5514         }
5515         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
5516         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
5517                 if(!isWasmInitialized) {
5518                         throw new Error("initializeWasm() must be awaited first!");
5519                 }
5520                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
5521                 // debug statements here
5522         }
5523         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
5524         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
5525                 if(!isWasmInitialized) {
5526                         throw new Error("initializeWasm() must be awaited first!");
5527                 }
5528                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
5529                 return nativeResponseValue;
5530         }
5531         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
5532         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
5533                 if(!isWasmInitialized) {
5534                         throw new Error("initializeWasm() must be awaited first!");
5535                 }
5536                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
5537                 return nativeResponseValue;
5538         }
5539         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
5540         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
5541                 if(!isWasmInitialized) {
5542                         throw new Error("initializeWasm() must be awaited first!");
5543                 }
5544                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
5545                 return nativeResponseValue;
5546         }
5547         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
5548         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
5549                 if(!isWasmInitialized) {
5550                         throw new Error("initializeWasm() must be awaited first!");
5551                 }
5552                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
5553                 // debug statements here
5554         }
5555         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
5556         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
5557                 if(!isWasmInitialized) {
5558                         throw new Error("initializeWasm() must be awaited first!");
5559                 }
5560                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
5561                 return nativeResponseValue;
5562         }
5563         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
5564         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
5565                 if(!isWasmInitialized) {
5566                         throw new Error("initializeWasm() must be awaited first!");
5567                 }
5568                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
5569                 return nativeResponseValue;
5570         }
5571         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
5572         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
5573                 if(!isWasmInitialized) {
5574                         throw new Error("initializeWasm() must be awaited first!");
5575                 }
5576                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
5577                 return nativeResponseValue;
5578         }
5579         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
5580         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
5581                 if(!isWasmInitialized) {
5582                         throw new Error("initializeWasm() must be awaited first!");
5583                 }
5584                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
5585                 // debug statements here
5586         }
5587         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
5588         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
5589                 if(!isWasmInitialized) {
5590                         throw new Error("initializeWasm() must be awaited first!");
5591                 }
5592                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
5593                 return nativeResponseValue;
5594         }
5595         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
5596         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
5597                 if(!isWasmInitialized) {
5598                         throw new Error("initializeWasm() must be awaited first!");
5599                 }
5600                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
5601                 return nativeResponseValue;
5602         }
5603         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
5604         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
5605                 if(!isWasmInitialized) {
5606                         throw new Error("initializeWasm() must be awaited first!");
5607                 }
5608                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
5609                 return nativeResponseValue;
5610         }
5611         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
5612         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
5613                 if(!isWasmInitialized) {
5614                         throw new Error("initializeWasm() must be awaited first!");
5615                 }
5616                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
5617                 // debug statements here
5618         }
5619         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
5620         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
5621                 if(!isWasmInitialized) {
5622                         throw new Error("initializeWasm() must be awaited first!");
5623                 }
5624                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
5625                 return nativeResponseValue;
5626         }
5627         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
5628         export function CResult_InvoiceSignOrCreationErrorZ_ok(o: number): number {
5629                 if(!isWasmInitialized) {
5630                         throw new Error("initializeWasm() must be awaited first!");
5631                 }
5632                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_ok(o);
5633                 return nativeResponseValue;
5634         }
5635         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
5636         export function CResult_InvoiceSignOrCreationErrorZ_err(e: number): number {
5637                 if(!isWasmInitialized) {
5638                         throw new Error("initializeWasm() must be awaited first!");
5639                 }
5640                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_err(e);
5641                 return nativeResponseValue;
5642         }
5643         // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
5644         export function CResult_InvoiceSignOrCreationErrorZ_free(_res: number): void {
5645                 if(!isWasmInitialized) {
5646                         throw new Error("initializeWasm() must be awaited first!");
5647                 }
5648                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_free(_res);
5649                 // debug statements here
5650         }
5651         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
5652         export function CResult_InvoiceSignOrCreationErrorZ_clone(orig: number): number {
5653                 if(!isWasmInitialized) {
5654                         throw new Error("initializeWasm() must be awaited first!");
5655                 }
5656                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone(orig);
5657                 return nativeResponseValue;
5658         }
5659         // void Event_free(struct LDKEvent this_ptr);
5660         export function Event_free(this_ptr: number): void {
5661                 if(!isWasmInitialized) {
5662                         throw new Error("initializeWasm() must be awaited first!");
5663                 }
5664                 const nativeResponseValue = wasm.Event_free(this_ptr);
5665                 // debug statements here
5666         }
5667         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
5668         export function Event_clone(orig: number): number {
5669                 if(!isWasmInitialized) {
5670                         throw new Error("initializeWasm() must be awaited first!");
5671                 }
5672                 const nativeResponseValue = wasm.Event_clone(orig);
5673                 return nativeResponseValue;
5674         }
5675         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
5676         export function Event_write(obj: number): Uint8Array {
5677                 if(!isWasmInitialized) {
5678                         throw new Error("initializeWasm() must be awaited first!");
5679                 }
5680                 const nativeResponseValue = wasm.Event_write(obj);
5681                 return decodeArray(nativeResponseValue);
5682         }
5683         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
5684         export function MessageSendEvent_free(this_ptr: number): void {
5685                 if(!isWasmInitialized) {
5686                         throw new Error("initializeWasm() must be awaited first!");
5687                 }
5688                 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
5689                 // debug statements here
5690         }
5691         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
5692         export function MessageSendEvent_clone(orig: number): number {
5693                 if(!isWasmInitialized) {
5694                         throw new Error("initializeWasm() must be awaited first!");
5695                 }
5696                 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
5697                 return nativeResponseValue;
5698         }
5699         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
5700         export function MessageSendEventsProvider_free(this_ptr: number): void {
5701                 if(!isWasmInitialized) {
5702                         throw new Error("initializeWasm() must be awaited first!");
5703                 }
5704                 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
5705                 // debug statements here
5706         }
5707         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
5708         export function EventsProvider_free(this_ptr: number): void {
5709                 if(!isWasmInitialized) {
5710                         throw new Error("initializeWasm() must be awaited first!");
5711                 }
5712                 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
5713                 // debug statements here
5714         }
5715         // void EventHandler_free(struct LDKEventHandler this_ptr);
5716         export function EventHandler_free(this_ptr: number): void {
5717                 if(!isWasmInitialized) {
5718                         throw new Error("initializeWasm() must be awaited first!");
5719                 }
5720                 const nativeResponseValue = wasm.EventHandler_free(this_ptr);
5721                 // debug statements here
5722         }
5723         // void APIError_free(struct LDKAPIError this_ptr);
5724         export function APIError_free(this_ptr: number): void {
5725                 if(!isWasmInitialized) {
5726                         throw new Error("initializeWasm() must be awaited first!");
5727                 }
5728                 const nativeResponseValue = wasm.APIError_free(this_ptr);
5729                 // debug statements here
5730         }
5731         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
5732         export function APIError_clone(orig: number): number {
5733                 if(!isWasmInitialized) {
5734                         throw new Error("initializeWasm() must be awaited first!");
5735                 }
5736                 const nativeResponseValue = wasm.APIError_clone(orig);
5737                 return nativeResponseValue;
5738         }
5739         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, struct LDKSecretKey sk);
5740         export function sign(msg: Uint8Array, sk: Uint8Array): number {
5741                 if(!isWasmInitialized) {
5742                         throw new Error("initializeWasm() must be awaited first!");
5743                 }
5744                 const nativeResponseValue = wasm.sign(encodeArray(msg), encodeArray(sk));
5745                 return nativeResponseValue;
5746         }
5747         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
5748         export function recover_pk(msg: Uint8Array, sig: String): number {
5749                 if(!isWasmInitialized) {
5750                         throw new Error("initializeWasm() must be awaited first!");
5751                 }
5752                 const nativeResponseValue = wasm.recover_pk(encodeArray(msg), sig);
5753                 return nativeResponseValue;
5754         }
5755         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
5756         export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
5757                 if(!isWasmInitialized) {
5758                         throw new Error("initializeWasm() must be awaited first!");
5759                 }
5760                 const nativeResponseValue = wasm.verify(encodeArray(msg), sig, encodeArray(pk));
5761                 return nativeResponseValue;
5762         }
5763         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
5764         export function Level_clone(orig: number): Level {
5765                 if(!isWasmInitialized) {
5766                         throw new Error("initializeWasm() must be awaited first!");
5767                 }
5768                 const nativeResponseValue = wasm.Level_clone(orig);
5769                 return nativeResponseValue;
5770         }
5771         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
5772         export function Level_eq(a: number, b: number): boolean {
5773                 if(!isWasmInitialized) {
5774                         throw new Error("initializeWasm() must be awaited first!");
5775                 }
5776                 const nativeResponseValue = wasm.Level_eq(a, b);
5777                 return nativeResponseValue;
5778         }
5779         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
5780         export function Level_hash(o: number): number {
5781                 if(!isWasmInitialized) {
5782                         throw new Error("initializeWasm() must be awaited first!");
5783                 }
5784                 const nativeResponseValue = wasm.Level_hash(o);
5785                 return nativeResponseValue;
5786         }
5787         // MUST_USE_RES enum LDKLevel Level_max(void);
5788         export function Level_max(): Level {
5789                 if(!isWasmInitialized) {
5790                         throw new Error("initializeWasm() must be awaited first!");
5791                 }
5792                 const nativeResponseValue = wasm.Level_max();
5793                 return nativeResponseValue;
5794         }
5795         // void Logger_free(struct LDKLogger this_ptr);
5796         export function Logger_free(this_ptr: number): void {
5797                 if(!isWasmInitialized) {
5798                         throw new Error("initializeWasm() must be awaited first!");
5799                 }
5800                 const nativeResponseValue = wasm.Logger_free(this_ptr);
5801                 // debug statements here
5802         }
5803         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
5804         export function ChannelHandshakeConfig_free(this_obj: number): void {
5805                 if(!isWasmInitialized) {
5806                         throw new Error("initializeWasm() must be awaited first!");
5807                 }
5808                 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
5809                 // debug statements here
5810         }
5811         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
5812         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
5813                 if(!isWasmInitialized) {
5814                         throw new Error("initializeWasm() must be awaited first!");
5815                 }
5816                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
5817                 return nativeResponseValue;
5818         }
5819         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
5820         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
5821                 if(!isWasmInitialized) {
5822                         throw new Error("initializeWasm() must be awaited first!");
5823                 }
5824                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
5825                 // debug statements here
5826         }
5827         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
5828         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
5829                 if(!isWasmInitialized) {
5830                         throw new Error("initializeWasm() must be awaited first!");
5831                 }
5832                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
5833                 return nativeResponseValue;
5834         }
5835         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
5836         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
5837                 if(!isWasmInitialized) {
5838                         throw new Error("initializeWasm() must be awaited first!");
5839                 }
5840                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
5841                 // debug statements here
5842         }
5843         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
5844         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
5845                 if(!isWasmInitialized) {
5846                         throw new Error("initializeWasm() must be awaited first!");
5847                 }
5848                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
5849                 return nativeResponseValue;
5850         }
5851         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
5852         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
5853                 if(!isWasmInitialized) {
5854                         throw new Error("initializeWasm() must be awaited first!");
5855                 }
5856                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
5857                 // debug statements here
5858         }
5859         // 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);
5860         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
5861                 if(!isWasmInitialized) {
5862                         throw new Error("initializeWasm() must be awaited first!");
5863                 }
5864                 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
5865                 return nativeResponseValue;
5866         }
5867         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
5868         export function ChannelHandshakeConfig_clone(orig: number): number {
5869                 if(!isWasmInitialized) {
5870                         throw new Error("initializeWasm() must be awaited first!");
5871                 }
5872                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
5873                 return nativeResponseValue;
5874         }
5875         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
5876         export function ChannelHandshakeConfig_default(): number {
5877                 if(!isWasmInitialized) {
5878                         throw new Error("initializeWasm() must be awaited first!");
5879                 }
5880                 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
5881                 return nativeResponseValue;
5882         }
5883         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
5884         export function ChannelHandshakeLimits_free(this_obj: number): void {
5885                 if(!isWasmInitialized) {
5886                         throw new Error("initializeWasm() must be awaited first!");
5887                 }
5888                 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
5889                 // debug statements here
5890         }
5891         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5892         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
5893                 if(!isWasmInitialized) {
5894                         throw new Error("initializeWasm() must be awaited first!");
5895                 }
5896                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
5897                 return nativeResponseValue;
5898         }
5899         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
5900         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
5901                 if(!isWasmInitialized) {
5902                         throw new Error("initializeWasm() must be awaited first!");
5903                 }
5904                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
5905                 // debug statements here
5906         }
5907         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5908         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
5909                 if(!isWasmInitialized) {
5910                         throw new Error("initializeWasm() must be awaited first!");
5911                 }
5912                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
5913                 return nativeResponseValue;
5914         }
5915         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
5916         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
5917                 if(!isWasmInitialized) {
5918                         throw new Error("initializeWasm() must be awaited first!");
5919                 }
5920                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
5921                 // debug statements here
5922         }
5923         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5924         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
5925                 if(!isWasmInitialized) {
5926                         throw new Error("initializeWasm() must be awaited first!");
5927                 }
5928                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
5929                 return nativeResponseValue;
5930         }
5931         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
5932         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
5933                 if(!isWasmInitialized) {
5934                         throw new Error("initializeWasm() must be awaited first!");
5935                 }
5936                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
5937                 // debug statements here
5938         }
5939         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5940         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
5941                 if(!isWasmInitialized) {
5942                         throw new Error("initializeWasm() must be awaited first!");
5943                 }
5944                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
5945                 return nativeResponseValue;
5946         }
5947         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
5948         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
5949                 if(!isWasmInitialized) {
5950                         throw new Error("initializeWasm() must be awaited first!");
5951                 }
5952                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
5953                 // debug statements here
5954         }
5955         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5956         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
5957                 if(!isWasmInitialized) {
5958                         throw new Error("initializeWasm() must be awaited first!");
5959                 }
5960                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
5961                 return nativeResponseValue;
5962         }
5963         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
5964         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
5965                 if(!isWasmInitialized) {
5966                         throw new Error("initializeWasm() must be awaited first!");
5967                 }
5968                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
5969                 // debug statements here
5970         }
5971         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5972         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
5973                 if(!isWasmInitialized) {
5974                         throw new Error("initializeWasm() must be awaited first!");
5975                 }
5976                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
5977                 return nativeResponseValue;
5978         }
5979         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
5980         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
5981                 if(!isWasmInitialized) {
5982                         throw new Error("initializeWasm() must be awaited first!");
5983                 }
5984                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
5985                 // debug statements here
5986         }
5987         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5988         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
5989                 if(!isWasmInitialized) {
5990                         throw new Error("initializeWasm() must be awaited first!");
5991                 }
5992                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
5993                 return nativeResponseValue;
5994         }
5995         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
5996         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
5997                 if(!isWasmInitialized) {
5998                         throw new Error("initializeWasm() must be awaited first!");
5999                 }
6000                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
6001                 // debug statements here
6002         }
6003         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6004         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
6005                 if(!isWasmInitialized) {
6006                         throw new Error("initializeWasm() must be awaited first!");
6007                 }
6008                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
6009                 return nativeResponseValue;
6010         }
6011         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
6012         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
6013                 if(!isWasmInitialized) {
6014                         throw new Error("initializeWasm() must be awaited first!");
6015                 }
6016                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
6017                 // debug statements here
6018         }
6019         // 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);
6020         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 {
6021                 if(!isWasmInitialized) {
6022                         throw new Error("initializeWasm() must be awaited first!");
6023                 }
6024                 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);
6025                 return nativeResponseValue;
6026         }
6027         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
6028         export function ChannelHandshakeLimits_clone(orig: number): number {
6029                 if(!isWasmInitialized) {
6030                         throw new Error("initializeWasm() must be awaited first!");
6031                 }
6032                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
6033                 return nativeResponseValue;
6034         }
6035         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
6036         export function ChannelHandshakeLimits_default(): number {
6037                 if(!isWasmInitialized) {
6038                         throw new Error("initializeWasm() must be awaited first!");
6039                 }
6040                 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
6041                 return nativeResponseValue;
6042         }
6043         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
6044         export function ChannelConfig_free(this_obj: number): void {
6045                 if(!isWasmInitialized) {
6046                         throw new Error("initializeWasm() must be awaited first!");
6047                 }
6048                 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
6049                 // debug statements here
6050         }
6051         // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6052         export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
6053                 if(!isWasmInitialized) {
6054                         throw new Error("initializeWasm() must be awaited first!");
6055                 }
6056                 const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
6057                 return nativeResponseValue;
6058         }
6059         // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
6060         export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
6061                 if(!isWasmInitialized) {
6062                         throw new Error("initializeWasm() must be awaited first!");
6063                 }
6064                 const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
6065                 // debug statements here
6066         }
6067         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6068         export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
6069                 if(!isWasmInitialized) {
6070                         throw new Error("initializeWasm() must be awaited first!");
6071                 }
6072                 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
6073                 return nativeResponseValue;
6074         }
6075         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
6076         export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
6077                 if(!isWasmInitialized) {
6078                         throw new Error("initializeWasm() must be awaited first!");
6079                 }
6080                 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
6081                 // debug statements here
6082         }
6083         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6084         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
6085                 if(!isWasmInitialized) {
6086                         throw new Error("initializeWasm() must be awaited first!");
6087                 }
6088                 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
6089                 return nativeResponseValue;
6090         }
6091         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
6092         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
6093                 if(!isWasmInitialized) {
6094                         throw new Error("initializeWasm() must be awaited first!");
6095                 }
6096                 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
6097                 // debug statements here
6098         }
6099         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6100         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
6101                 if(!isWasmInitialized) {
6102                         throw new Error("initializeWasm() must be awaited first!");
6103                 }
6104                 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
6105                 return nativeResponseValue;
6106         }
6107         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
6108         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
6109                 if(!isWasmInitialized) {
6110                         throw new Error("initializeWasm() must be awaited first!");
6111                 }
6112                 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
6113                 // debug statements here
6114         }
6115         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
6116         export function ChannelConfig_new(fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
6117                 if(!isWasmInitialized) {
6118                         throw new Error("initializeWasm() must be awaited first!");
6119                 }
6120                 const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
6121                 return nativeResponseValue;
6122         }
6123         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
6124         export function ChannelConfig_clone(orig: number): number {
6125                 if(!isWasmInitialized) {
6126                         throw new Error("initializeWasm() must be awaited first!");
6127                 }
6128                 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
6129                 return nativeResponseValue;
6130         }
6131         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
6132         export function ChannelConfig_default(): number {
6133                 if(!isWasmInitialized) {
6134                         throw new Error("initializeWasm() must be awaited first!");
6135                 }
6136                 const nativeResponseValue = wasm.ChannelConfig_default();
6137                 return nativeResponseValue;
6138         }
6139         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
6140         export function ChannelConfig_write(obj: number): Uint8Array {
6141                 if(!isWasmInitialized) {
6142                         throw new Error("initializeWasm() must be awaited first!");
6143                 }
6144                 const nativeResponseValue = wasm.ChannelConfig_write(obj);
6145                 return decodeArray(nativeResponseValue);
6146         }
6147         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
6148         export function ChannelConfig_read(ser: Uint8Array): number {
6149                 if(!isWasmInitialized) {
6150                         throw new Error("initializeWasm() must be awaited first!");
6151                 }
6152                 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
6153                 return nativeResponseValue;
6154         }
6155         // void UserConfig_free(struct LDKUserConfig this_obj);
6156         export function UserConfig_free(this_obj: number): void {
6157                 if(!isWasmInitialized) {
6158                         throw new Error("initializeWasm() must be awaited first!");
6159                 }
6160                 const nativeResponseValue = wasm.UserConfig_free(this_obj);
6161                 // debug statements here
6162         }
6163         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6164         export function UserConfig_get_own_channel_config(this_ptr: number): number {
6165                 if(!isWasmInitialized) {
6166                         throw new Error("initializeWasm() must be awaited first!");
6167                 }
6168                 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
6169                 return nativeResponseValue;
6170         }
6171         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
6172         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
6173                 if(!isWasmInitialized) {
6174                         throw new Error("initializeWasm() must be awaited first!");
6175                 }
6176                 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
6177                 // debug statements here
6178         }
6179         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6180         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
6181                 if(!isWasmInitialized) {
6182                         throw new Error("initializeWasm() must be awaited first!");
6183                 }
6184                 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
6185                 return nativeResponseValue;
6186         }
6187         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
6188         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
6189                 if(!isWasmInitialized) {
6190                         throw new Error("initializeWasm() must be awaited first!");
6191                 }
6192                 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
6193                 // debug statements here
6194         }
6195         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6196         export function UserConfig_get_channel_options(this_ptr: number): number {
6197                 if(!isWasmInitialized) {
6198                         throw new Error("initializeWasm() must be awaited first!");
6199                 }
6200                 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
6201                 return nativeResponseValue;
6202         }
6203         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
6204         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
6205                 if(!isWasmInitialized) {
6206                         throw new Error("initializeWasm() must be awaited first!");
6207                 }
6208                 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
6209                 // debug statements here
6210         }
6211         // 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);
6212         export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
6213                 if(!isWasmInitialized) {
6214                         throw new Error("initializeWasm() must be awaited first!");
6215                 }
6216                 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
6217                 return nativeResponseValue;
6218         }
6219         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
6220         export function UserConfig_clone(orig: number): number {
6221                 if(!isWasmInitialized) {
6222                         throw new Error("initializeWasm() must be awaited first!");
6223                 }
6224                 const nativeResponseValue = wasm.UserConfig_clone(orig);
6225                 return nativeResponseValue;
6226         }
6227         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
6228         export function UserConfig_default(): number {
6229                 if(!isWasmInitialized) {
6230                         throw new Error("initializeWasm() must be awaited first!");
6231                 }
6232                 const nativeResponseValue = wasm.UserConfig_default();
6233                 return nativeResponseValue;
6234         }
6235         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
6236         export function AccessError_clone(orig: number): AccessError {
6237                 if(!isWasmInitialized) {
6238                         throw new Error("initializeWasm() must be awaited first!");
6239                 }
6240                 const nativeResponseValue = wasm.AccessError_clone(orig);
6241                 return nativeResponseValue;
6242         }
6243         // void Access_free(struct LDKAccess this_ptr);
6244         export function Access_free(this_ptr: number): void {
6245                 if(!isWasmInitialized) {
6246                         throw new Error("initializeWasm() must be awaited first!");
6247                 }
6248                 const nativeResponseValue = wasm.Access_free(this_ptr);
6249                 // debug statements here
6250         }
6251         // void Listen_free(struct LDKListen this_ptr);
6252         export function Listen_free(this_ptr: number): void {
6253                 if(!isWasmInitialized) {
6254                         throw new Error("initializeWasm() must be awaited first!");
6255                 }
6256                 const nativeResponseValue = wasm.Listen_free(this_ptr);
6257                 // debug statements here
6258         }
6259         // void Confirm_free(struct LDKConfirm this_ptr);
6260         export function Confirm_free(this_ptr: number): void {
6261                 if(!isWasmInitialized) {
6262                         throw new Error("initializeWasm() must be awaited first!");
6263                 }
6264                 const nativeResponseValue = wasm.Confirm_free(this_ptr);
6265                 // debug statements here
6266         }
6267         // void Watch_free(struct LDKWatch this_ptr);
6268         export function Watch_free(this_ptr: number): void {
6269                 if(!isWasmInitialized) {
6270                         throw new Error("initializeWasm() must be awaited first!");
6271                 }
6272                 const nativeResponseValue = wasm.Watch_free(this_ptr);
6273                 // debug statements here
6274         }
6275         // void Filter_free(struct LDKFilter this_ptr);
6276         export function Filter_free(this_ptr: number): void {
6277                 if(!isWasmInitialized) {
6278                         throw new Error("initializeWasm() must be awaited first!");
6279                 }
6280                 const nativeResponseValue = wasm.Filter_free(this_ptr);
6281                 // debug statements here
6282         }
6283         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
6284         export function WatchedOutput_free(this_obj: number): void {
6285                 if(!isWasmInitialized) {
6286                         throw new Error("initializeWasm() must be awaited first!");
6287                 }
6288                 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
6289                 // debug statements here
6290         }
6291         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
6292         export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
6293                 if(!isWasmInitialized) {
6294                         throw new Error("initializeWasm() must be awaited first!");
6295                 }
6296                 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
6297                 return decodeArray(nativeResponseValue);
6298         }
6299         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6300         export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
6301                 if(!isWasmInitialized) {
6302                         throw new Error("initializeWasm() must be awaited first!");
6303                 }
6304                 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
6305                 // debug statements here
6306         }
6307         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
6308         export function WatchedOutput_get_outpoint(this_ptr: number): number {
6309                 if(!isWasmInitialized) {
6310                         throw new Error("initializeWasm() must be awaited first!");
6311                 }
6312                 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
6313                 return nativeResponseValue;
6314         }
6315         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
6316         export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
6317                 if(!isWasmInitialized) {
6318                         throw new Error("initializeWasm() must be awaited first!");
6319                 }
6320                 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
6321                 // debug statements here
6322         }
6323         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
6324         export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
6325                 if(!isWasmInitialized) {
6326                         throw new Error("initializeWasm() must be awaited first!");
6327                 }
6328                 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
6329                 return decodeArray(nativeResponseValue);
6330         }
6331         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
6332         export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
6333                 if(!isWasmInitialized) {
6334                         throw new Error("initializeWasm() must be awaited first!");
6335                 }
6336                 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
6337                 // debug statements here
6338         }
6339         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
6340         export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
6341                 if(!isWasmInitialized) {
6342                         throw new Error("initializeWasm() must be awaited first!");
6343                 }
6344                 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
6345                 return nativeResponseValue;
6346         }
6347         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
6348         export function WatchedOutput_clone(orig: number): number {
6349                 if(!isWasmInitialized) {
6350                         throw new Error("initializeWasm() must be awaited first!");
6351                 }
6352                 const nativeResponseValue = wasm.WatchedOutput_clone(orig);
6353                 return nativeResponseValue;
6354         }
6355         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
6356         export function WatchedOutput_hash(o: number): number {
6357                 if(!isWasmInitialized) {
6358                         throw new Error("initializeWasm() must be awaited first!");
6359                 }
6360                 const nativeResponseValue = wasm.WatchedOutput_hash(o);
6361                 return nativeResponseValue;
6362         }
6363         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
6364         export function BroadcasterInterface_free(this_ptr: number): void {
6365                 if(!isWasmInitialized) {
6366                         throw new Error("initializeWasm() must be awaited first!");
6367                 }
6368                 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
6369                 // debug statements here
6370         }
6371         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
6372         export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
6373                 if(!isWasmInitialized) {
6374                         throw new Error("initializeWasm() must be awaited first!");
6375                 }
6376                 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
6377                 return nativeResponseValue;
6378         }
6379         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
6380         export function FeeEstimator_free(this_ptr: number): void {
6381                 if(!isWasmInitialized) {
6382                         throw new Error("initializeWasm() must be awaited first!");
6383                 }
6384                 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
6385                 // debug statements here
6386         }
6387         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
6388         export function ChainMonitor_free(this_obj: number): void {
6389                 if(!isWasmInitialized) {
6390                         throw new Error("initializeWasm() must be awaited first!");
6391                 }
6392                 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
6393                 // debug statements here
6394         }
6395         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
6396         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
6397                 if(!isWasmInitialized) {
6398                         throw new Error("initializeWasm() must be awaited first!");
6399                 }
6400                 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
6401                 return nativeResponseValue;
6402         }
6403         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6404         export function ChainMonitor_as_Listen(this_arg: number): number {
6405                 if(!isWasmInitialized) {
6406                         throw new Error("initializeWasm() must be awaited first!");
6407                 }
6408                 const nativeResponseValue = wasm.ChainMonitor_as_Listen(this_arg);
6409                 return nativeResponseValue;
6410         }
6411         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6412         export function ChainMonitor_as_Confirm(this_arg: number): number {
6413                 if(!isWasmInitialized) {
6414                         throw new Error("initializeWasm() must be awaited first!");
6415                 }
6416                 const nativeResponseValue = wasm.ChainMonitor_as_Confirm(this_arg);
6417                 return nativeResponseValue;
6418         }
6419         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6420         export function ChainMonitor_as_Watch(this_arg: number): number {
6421                 if(!isWasmInitialized) {
6422                         throw new Error("initializeWasm() must be awaited first!");
6423                 }
6424                 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
6425                 return nativeResponseValue;
6426         }
6427         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6428         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
6429                 if(!isWasmInitialized) {
6430                         throw new Error("initializeWasm() must be awaited first!");
6431                 }
6432                 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
6433                 return nativeResponseValue;
6434         }
6435         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
6436         export function ChannelMonitorUpdate_free(this_obj: number): void {
6437                 if(!isWasmInitialized) {
6438                         throw new Error("initializeWasm() must be awaited first!");
6439                 }
6440                 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
6441                 // debug statements here
6442         }
6443         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
6444         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
6445                 if(!isWasmInitialized) {
6446                         throw new Error("initializeWasm() must be awaited first!");
6447                 }
6448                 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
6449                 return nativeResponseValue;
6450         }
6451         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
6452         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
6453                 if(!isWasmInitialized) {
6454                         throw new Error("initializeWasm() must be awaited first!");
6455                 }
6456                 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
6457                 // debug statements here
6458         }
6459         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
6460         export function ChannelMonitorUpdate_clone(orig: number): number {
6461                 if(!isWasmInitialized) {
6462                         throw new Error("initializeWasm() must be awaited first!");
6463                 }
6464                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
6465                 return nativeResponseValue;
6466         }
6467         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
6468         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
6469                 if(!isWasmInitialized) {
6470                         throw new Error("initializeWasm() must be awaited first!");
6471                 }
6472                 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
6473                 return decodeArray(nativeResponseValue);
6474         }
6475         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
6476         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
6477                 if(!isWasmInitialized) {
6478                         throw new Error("initializeWasm() must be awaited first!");
6479                 }
6480                 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
6481                 return nativeResponseValue;
6482         }
6483         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
6484         export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
6485                 if(!isWasmInitialized) {
6486                         throw new Error("initializeWasm() must be awaited first!");
6487                 }
6488                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
6489                 return nativeResponseValue;
6490         }
6491         // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
6492         export function MonitorUpdateError_free(this_obj: number): void {
6493                 if(!isWasmInitialized) {
6494                         throw new Error("initializeWasm() must be awaited first!");
6495                 }
6496                 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
6497                 // debug statements here
6498         }
6499         // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
6500         export function MonitorUpdateError_clone(orig: number): number {
6501                 if(!isWasmInitialized) {
6502                         throw new Error("initializeWasm() must be awaited first!");
6503                 }
6504                 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
6505                 return nativeResponseValue;
6506         }
6507         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
6508         export function MonitorEvent_free(this_ptr: number): void {
6509                 if(!isWasmInitialized) {
6510                         throw new Error("initializeWasm() must be awaited first!");
6511                 }
6512                 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
6513                 // debug statements here
6514         }
6515         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
6516         export function MonitorEvent_clone(orig: number): number {
6517                 if(!isWasmInitialized) {
6518                         throw new Error("initializeWasm() must be awaited first!");
6519                 }
6520                 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
6521                 return nativeResponseValue;
6522         }
6523         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
6524         export function HTLCUpdate_free(this_obj: number): void {
6525                 if(!isWasmInitialized) {
6526                         throw new Error("initializeWasm() must be awaited first!");
6527                 }
6528                 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
6529                 // debug statements here
6530         }
6531         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
6532         export function HTLCUpdate_clone(orig: number): number {
6533                 if(!isWasmInitialized) {
6534                         throw new Error("initializeWasm() must be awaited first!");
6535                 }
6536                 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
6537                 return nativeResponseValue;
6538         }
6539         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
6540         export function HTLCUpdate_write(obj: number): Uint8Array {
6541                 if(!isWasmInitialized) {
6542                         throw new Error("initializeWasm() must be awaited first!");
6543                 }
6544                 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
6545                 return decodeArray(nativeResponseValue);
6546         }
6547         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
6548         export function HTLCUpdate_read(ser: Uint8Array): number {
6549                 if(!isWasmInitialized) {
6550                         throw new Error("initializeWasm() must be awaited first!");
6551                 }
6552                 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
6553                 return nativeResponseValue;
6554         }
6555         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
6556         export function ChannelMonitor_free(this_obj: number): void {
6557                 if(!isWasmInitialized) {
6558                         throw new Error("initializeWasm() must be awaited first!");
6559                 }
6560                 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
6561                 // debug statements here
6562         }
6563         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
6564         export function ChannelMonitor_clone(orig: number): number {
6565                 if(!isWasmInitialized) {
6566                         throw new Error("initializeWasm() must be awaited first!");
6567                 }
6568                 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
6569                 return nativeResponseValue;
6570         }
6571         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
6572         export function ChannelMonitor_write(obj: number): Uint8Array {
6573                 if(!isWasmInitialized) {
6574                         throw new Error("initializeWasm() must be awaited first!");
6575                 }
6576                 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
6577                 return decodeArray(nativeResponseValue);
6578         }
6579         // 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);
6580         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
6581                 if(!isWasmInitialized) {
6582                         throw new Error("initializeWasm() must be awaited first!");
6583                 }
6584                 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
6585                 return nativeResponseValue;
6586         }
6587         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6588         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
6589                 if(!isWasmInitialized) {
6590                         throw new Error("initializeWasm() must be awaited first!");
6591                 }
6592                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
6593                 return nativeResponseValue;
6594         }
6595         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6596         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
6597                 if(!isWasmInitialized) {
6598                         throw new Error("initializeWasm() must be awaited first!");
6599                 }
6600                 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
6601                 return nativeResponseValue;
6602         }
6603         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6604         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
6605                 if(!isWasmInitialized) {
6606                         throw new Error("initializeWasm() must be awaited first!");
6607                 }
6608                 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
6609                 return nativeResponseValue;
6610         }
6611         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
6612         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
6613                 if(!isWasmInitialized) {
6614                         throw new Error("initializeWasm() must be awaited first!");
6615                 }
6616                 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
6617                 // debug statements here
6618         }
6619         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6620         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
6621                 if(!isWasmInitialized) {
6622                         throw new Error("initializeWasm() must be awaited first!");
6623                 }
6624                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
6625                 return nativeResponseValue;
6626         }
6627         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6628         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
6629                 if(!isWasmInitialized) {
6630                         throw new Error("initializeWasm() must be awaited first!");
6631                 }
6632                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
6633                 return nativeResponseValue;
6634         }
6635         // 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);
6636         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
6637                 if(!isWasmInitialized) {
6638                         throw new Error("initializeWasm() must be awaited first!");
6639                 }
6640                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
6641                 return nativeResponseValue;
6642         }
6643         // 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);
6644         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
6645                 if(!isWasmInitialized) {
6646                         throw new Error("initializeWasm() must be awaited first!");
6647                 }
6648                 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
6649                 return nativeResponseValue;
6650         }
6651         // 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);
6652         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
6653                 if(!isWasmInitialized) {
6654                         throw new Error("initializeWasm() must be awaited first!");
6655                 }
6656                 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
6657                 // debug statements here
6658         }
6659         // 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);
6660         export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
6661                 if(!isWasmInitialized) {
6662                         throw new Error("initializeWasm() must be awaited first!");
6663                 }
6664                 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
6665                 return nativeResponseValue;
6666         }
6667         // 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);
6668         export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
6669                 if(!isWasmInitialized) {
6670                         throw new Error("initializeWasm() must be awaited first!");
6671                 }
6672                 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
6673                 // debug statements here
6674         }
6675         // 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);
6676         export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
6677                 if(!isWasmInitialized) {
6678                         throw new Error("initializeWasm() must be awaited first!");
6679                 }
6680                 const nativeResponseValue = wasm.ChannelMonitor_best_block_updated(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
6681                 return nativeResponseValue;
6682         }
6683         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6684         export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
6685                 if(!isWasmInitialized) {
6686                         throw new Error("initializeWasm() must be awaited first!");
6687                 }
6688                 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
6689                 return nativeResponseValue;
6690         }
6691         // void Persist_free(struct LDKPersist this_ptr);
6692         export function Persist_free(this_ptr: number): void {
6693                 if(!isWasmInitialized) {
6694                         throw new Error("initializeWasm() must be awaited first!");
6695                 }
6696                 const nativeResponseValue = wasm.Persist_free(this_ptr);
6697                 // debug statements here
6698         }
6699         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
6700         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
6701                 if(!isWasmInitialized) {
6702                         throw new Error("initializeWasm() must be awaited first!");
6703                 }
6704                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
6705                 return nativeResponseValue;
6706         }
6707         // void OutPoint_free(struct LDKOutPoint this_obj);
6708         export function OutPoint_free(this_obj: number): void {
6709                 if(!isWasmInitialized) {
6710                         throw new Error("initializeWasm() must be awaited first!");
6711                 }
6712                 const nativeResponseValue = wasm.OutPoint_free(this_obj);
6713                 // debug statements here
6714         }
6715         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
6716         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
6717                 if(!isWasmInitialized) {
6718                         throw new Error("initializeWasm() must be awaited first!");
6719                 }
6720                 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
6721                 return decodeArray(nativeResponseValue);
6722         }
6723         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6724         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
6725                 if(!isWasmInitialized) {
6726                         throw new Error("initializeWasm() must be awaited first!");
6727                 }
6728                 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
6729                 // debug statements here
6730         }
6731         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
6732         export function OutPoint_get_index(this_ptr: number): number {
6733                 if(!isWasmInitialized) {
6734                         throw new Error("initializeWasm() must be awaited first!");
6735                 }
6736                 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
6737                 return nativeResponseValue;
6738         }
6739         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
6740         export function OutPoint_set_index(this_ptr: number, val: number): void {
6741                 if(!isWasmInitialized) {
6742                         throw new Error("initializeWasm() must be awaited first!");
6743                 }
6744                 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
6745                 // debug statements here
6746         }
6747         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
6748         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
6749                 if(!isWasmInitialized) {
6750                         throw new Error("initializeWasm() must be awaited first!");
6751                 }
6752                 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
6753                 return nativeResponseValue;
6754         }
6755         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
6756         export function OutPoint_clone(orig: number): number {
6757                 if(!isWasmInitialized) {
6758                         throw new Error("initializeWasm() must be awaited first!");
6759                 }
6760                 const nativeResponseValue = wasm.OutPoint_clone(orig);
6761                 return nativeResponseValue;
6762         }
6763         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
6764         export function OutPoint_eq(a: number, b: number): boolean {
6765                 if(!isWasmInitialized) {
6766                         throw new Error("initializeWasm() must be awaited first!");
6767                 }
6768                 const nativeResponseValue = wasm.OutPoint_eq(a, b);
6769                 return nativeResponseValue;
6770         }
6771         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
6772         export function OutPoint_hash(o: number): number {
6773                 if(!isWasmInitialized) {
6774                         throw new Error("initializeWasm() must be awaited first!");
6775                 }
6776                 const nativeResponseValue = wasm.OutPoint_hash(o);
6777                 return nativeResponseValue;
6778         }
6779         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
6780         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
6781                 if(!isWasmInitialized) {
6782                         throw new Error("initializeWasm() must be awaited first!");
6783                 }
6784                 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
6785                 return decodeArray(nativeResponseValue);
6786         }
6787         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
6788         export function OutPoint_write(obj: number): Uint8Array {
6789                 if(!isWasmInitialized) {
6790                         throw new Error("initializeWasm() must be awaited first!");
6791                 }
6792                 const nativeResponseValue = wasm.OutPoint_write(obj);
6793                 return decodeArray(nativeResponseValue);
6794         }
6795         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
6796         export function OutPoint_read(ser: Uint8Array): number {
6797                 if(!isWasmInitialized) {
6798                         throw new Error("initializeWasm() must be awaited first!");
6799                 }
6800                 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
6801                 return nativeResponseValue;
6802         }
6803         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
6804         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
6805                 if(!isWasmInitialized) {
6806                         throw new Error("initializeWasm() must be awaited first!");
6807                 }
6808                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
6809                 // debug statements here
6810         }
6811         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6812         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
6813                 if(!isWasmInitialized) {
6814                         throw new Error("initializeWasm() must be awaited first!");
6815                 }
6816                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
6817                 return nativeResponseValue;
6818         }
6819         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
6820         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
6821                 if(!isWasmInitialized) {
6822                         throw new Error("initializeWasm() must be awaited first!");
6823                 }
6824                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
6825                 // debug statements here
6826         }
6827         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6828         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
6829                 if(!isWasmInitialized) {
6830                         throw new Error("initializeWasm() must be awaited first!");
6831                 }
6832                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
6833                 return decodeArray(nativeResponseValue);
6834         }
6835         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6836         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
6837                 if(!isWasmInitialized) {
6838                         throw new Error("initializeWasm() must be awaited first!");
6839                 }
6840                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
6841                 // debug statements here
6842         }
6843         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6844         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
6845                 if(!isWasmInitialized) {
6846                         throw new Error("initializeWasm() must be awaited first!");
6847                 }
6848                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
6849                 return nativeResponseValue;
6850         }
6851         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
6852         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
6853                 if(!isWasmInitialized) {
6854                         throw new Error("initializeWasm() must be awaited first!");
6855                 }
6856                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
6857                 // debug statements here
6858         }
6859         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
6860         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
6861                 if(!isWasmInitialized) {
6862                         throw new Error("initializeWasm() must be awaited first!");
6863                 }
6864                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
6865                 // debug statements here
6866         }
6867         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6868         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
6869                 if(!isWasmInitialized) {
6870                         throw new Error("initializeWasm() must be awaited first!");
6871                 }
6872                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
6873                 return decodeArray(nativeResponseValue);
6874         }
6875         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6876         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
6877                 if(!isWasmInitialized) {
6878                         throw new Error("initializeWasm() must be awaited first!");
6879                 }
6880                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
6881                 // debug statements here
6882         }
6883         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
6884         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
6885                 if(!isWasmInitialized) {
6886                         throw new Error("initializeWasm() must be awaited first!");
6887                 }
6888                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
6889                 return decodeArray(nativeResponseValue);
6890         }
6891         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6892         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
6893                 if(!isWasmInitialized) {
6894                         throw new Error("initializeWasm() must be awaited first!");
6895                 }
6896                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
6897                 // debug statements here
6898         }
6899         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6900         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
6901                 if(!isWasmInitialized) {
6902                         throw new Error("initializeWasm() must be awaited first!");
6903                 }
6904                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
6905                 return nativeResponseValue;
6906         }
6907         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
6908         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
6909                 if(!isWasmInitialized) {
6910                         throw new Error("initializeWasm() must be awaited first!");
6911                 }
6912                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
6913                 // debug statements here
6914         }
6915         // 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);
6916         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 {
6917                 if(!isWasmInitialized) {
6918                         throw new Error("initializeWasm() must be awaited first!");
6919                 }
6920                 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);
6921                 return nativeResponseValue;
6922         }
6923         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
6924         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
6925                 if(!isWasmInitialized) {
6926                         throw new Error("initializeWasm() must be awaited first!");
6927                 }
6928                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
6929                 return nativeResponseValue;
6930         }
6931         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
6932         export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
6933                 if(!isWasmInitialized) {
6934                         throw new Error("initializeWasm() must be awaited first!");
6935                 }
6936                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_write(obj);
6937                 return decodeArray(nativeResponseValue);
6938         }
6939         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
6940         export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
6941                 if(!isWasmInitialized) {
6942                         throw new Error("initializeWasm() must be awaited first!");
6943                 }
6944                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_read(encodeArray(ser));
6945                 return nativeResponseValue;
6946         }
6947         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
6948         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
6949                 if(!isWasmInitialized) {
6950                         throw new Error("initializeWasm() must be awaited first!");
6951                 }
6952                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
6953                 // debug statements here
6954         }
6955         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6956         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
6957                 if(!isWasmInitialized) {
6958                         throw new Error("initializeWasm() must be awaited first!");
6959                 }
6960                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
6961                 return nativeResponseValue;
6962         }
6963         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
6964         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
6965                 if(!isWasmInitialized) {
6966                         throw new Error("initializeWasm() must be awaited first!");
6967                 }
6968                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
6969                 // debug statements here
6970         }
6971         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
6972         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
6973                 if(!isWasmInitialized) {
6974                         throw new Error("initializeWasm() must be awaited first!");
6975                 }
6976                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
6977                 // debug statements here
6978         }
6979         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
6980         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
6981                 if(!isWasmInitialized) {
6982                         throw new Error("initializeWasm() must be awaited first!");
6983                 }
6984                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
6985                 return decodeArray(nativeResponseValue);
6986         }
6987         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6988         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
6989                 if(!isWasmInitialized) {
6990                         throw new Error("initializeWasm() must be awaited first!");
6991                 }
6992                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
6993                 // debug statements here
6994         }
6995         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6996         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
6997                 if(!isWasmInitialized) {
6998                         throw new Error("initializeWasm() must be awaited first!");
6999                 }
7000                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
7001                 return nativeResponseValue;
7002         }
7003         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
7004         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
7005                 if(!isWasmInitialized) {
7006                         throw new Error("initializeWasm() must be awaited first!");
7007                 }
7008                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
7009                 // debug statements here
7010         }
7011         // 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);
7012         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
7013                 if(!isWasmInitialized) {
7014                         throw new Error("initializeWasm() must be awaited first!");
7015                 }
7016                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
7017                 return nativeResponseValue;
7018         }
7019         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
7020         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
7021                 if(!isWasmInitialized) {
7022                         throw new Error("initializeWasm() must be awaited first!");
7023                 }
7024                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
7025                 return nativeResponseValue;
7026         }
7027         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
7028         export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
7029                 if(!isWasmInitialized) {
7030                         throw new Error("initializeWasm() must be awaited first!");
7031                 }
7032                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_write(obj);
7033                 return decodeArray(nativeResponseValue);
7034         }
7035         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
7036         export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
7037                 if(!isWasmInitialized) {
7038                         throw new Error("initializeWasm() must be awaited first!");
7039                 }
7040                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_read(encodeArray(ser));
7041                 return nativeResponseValue;
7042         }
7043         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
7044         export function SpendableOutputDescriptor_free(this_ptr: number): void {
7045                 if(!isWasmInitialized) {
7046                         throw new Error("initializeWasm() must be awaited first!");
7047                 }
7048                 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
7049                 // debug statements here
7050         }
7051         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
7052         export function SpendableOutputDescriptor_clone(orig: number): number {
7053                 if(!isWasmInitialized) {
7054                         throw new Error("initializeWasm() must be awaited first!");
7055                 }
7056                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
7057                 return nativeResponseValue;
7058         }
7059         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
7060         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
7061                 if(!isWasmInitialized) {
7062                         throw new Error("initializeWasm() must be awaited first!");
7063                 }
7064                 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
7065                 return decodeArray(nativeResponseValue);
7066         }
7067         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
7068         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
7069                 if(!isWasmInitialized) {
7070                         throw new Error("initializeWasm() must be awaited first!");
7071                 }
7072                 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
7073                 return nativeResponseValue;
7074         }
7075         // void BaseSign_free(struct LDKBaseSign this_ptr);
7076         export function BaseSign_free(this_ptr: number): void {
7077                 if(!isWasmInitialized) {
7078                         throw new Error("initializeWasm() must be awaited first!");
7079                 }
7080                 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
7081                 // debug statements here
7082         }
7083         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
7084         export function Sign_clone(orig: number): number {
7085                 if(!isWasmInitialized) {
7086                         throw new Error("initializeWasm() must be awaited first!");
7087                 }
7088                 const nativeResponseValue = wasm.Sign_clone(orig);
7089                 return nativeResponseValue;
7090         }
7091         // void Sign_free(struct LDKSign this_ptr);
7092         export function Sign_free(this_ptr: number): void {
7093                 if(!isWasmInitialized) {
7094                         throw new Error("initializeWasm() must be awaited first!");
7095                 }
7096                 const nativeResponseValue = wasm.Sign_free(this_ptr);
7097                 // debug statements here
7098         }
7099         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
7100         export function KeysInterface_free(this_ptr: number): void {
7101                 if(!isWasmInitialized) {
7102                         throw new Error("initializeWasm() must be awaited first!");
7103                 }
7104                 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
7105                 // debug statements here
7106         }
7107         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
7108         export function InMemorySigner_free(this_obj: number): void {
7109                 if(!isWasmInitialized) {
7110                         throw new Error("initializeWasm() must be awaited first!");
7111                 }
7112                 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
7113                 // debug statements here
7114         }
7115         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7116         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
7117                 if(!isWasmInitialized) {
7118                         throw new Error("initializeWasm() must be awaited first!");
7119                 }
7120                 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
7121                 return decodeArray(nativeResponseValue);
7122         }
7123         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7124         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
7125                 if(!isWasmInitialized) {
7126                         throw new Error("initializeWasm() must be awaited first!");
7127                 }
7128                 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
7129                 // debug statements here
7130         }
7131         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7132         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
7133                 if(!isWasmInitialized) {
7134                         throw new Error("initializeWasm() must be awaited first!");
7135                 }
7136                 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
7137                 return decodeArray(nativeResponseValue);
7138         }
7139         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7140         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
7141                 if(!isWasmInitialized) {
7142                         throw new Error("initializeWasm() must be awaited first!");
7143                 }
7144                 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
7145                 // debug statements here
7146         }
7147         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7148         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
7149                 if(!isWasmInitialized) {
7150                         throw new Error("initializeWasm() must be awaited first!");
7151                 }
7152                 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
7153                 return decodeArray(nativeResponseValue);
7154         }
7155         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7156         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
7157                 if(!isWasmInitialized) {
7158                         throw new Error("initializeWasm() must be awaited first!");
7159                 }
7160                 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
7161                 // debug statements here
7162         }
7163         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7164         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
7165                 if(!isWasmInitialized) {
7166                         throw new Error("initializeWasm() must be awaited first!");
7167                 }
7168                 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
7169                 return decodeArray(nativeResponseValue);
7170         }
7171         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7172         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
7173                 if(!isWasmInitialized) {
7174                         throw new Error("initializeWasm() must be awaited first!");
7175                 }
7176                 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
7177                 // debug statements here
7178         }
7179         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7180         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
7181                 if(!isWasmInitialized) {
7182                         throw new Error("initializeWasm() must be awaited first!");
7183                 }
7184                 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
7185                 return decodeArray(nativeResponseValue);
7186         }
7187         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7188         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
7189                 if(!isWasmInitialized) {
7190                         throw new Error("initializeWasm() must be awaited first!");
7191                 }
7192                 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
7193                 // debug statements here
7194         }
7195         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7196         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
7197                 if(!isWasmInitialized) {
7198                         throw new Error("initializeWasm() must be awaited first!");
7199                 }
7200                 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
7201                 return decodeArray(nativeResponseValue);
7202         }
7203         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7204         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
7205                 if(!isWasmInitialized) {
7206                         throw new Error("initializeWasm() must be awaited first!");
7207                 }
7208                 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
7209                 // debug statements here
7210         }
7211         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
7212         export function InMemorySigner_clone(orig: number): number {
7213                 if(!isWasmInitialized) {
7214                         throw new Error("initializeWasm() must be awaited first!");
7215                 }
7216                 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
7217                 return nativeResponseValue;
7218         }
7219         // 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);
7220         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 {
7221                 if(!isWasmInitialized) {
7222                         throw new Error("initializeWasm() must be awaited first!");
7223                 }
7224                 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));
7225                 return nativeResponseValue;
7226         }
7227         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7228         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
7229                 if(!isWasmInitialized) {
7230                         throw new Error("initializeWasm() must be awaited first!");
7231                 }
7232                 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
7233                 return nativeResponseValue;
7234         }
7235         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7236         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
7237                 if(!isWasmInitialized) {
7238                         throw new Error("initializeWasm() must be awaited first!");
7239                 }
7240                 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
7241                 return nativeResponseValue;
7242         }
7243         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7244         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
7245                 if(!isWasmInitialized) {
7246                         throw new Error("initializeWasm() must be awaited first!");
7247                 }
7248                 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
7249                 return nativeResponseValue;
7250         }
7251         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7252         export function InMemorySigner_is_outbound(this_arg: number): boolean {
7253                 if(!isWasmInitialized) {
7254                         throw new Error("initializeWasm() must be awaited first!");
7255                 }
7256                 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
7257                 return nativeResponseValue;
7258         }
7259         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7260         export function InMemorySigner_funding_outpoint(this_arg: number): number {
7261                 if(!isWasmInitialized) {
7262                         throw new Error("initializeWasm() must be awaited first!");
7263                 }
7264                 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
7265                 return nativeResponseValue;
7266         }
7267         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7268         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
7269                 if(!isWasmInitialized) {
7270                         throw new Error("initializeWasm() must be awaited first!");
7271                 }
7272                 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
7273                 return nativeResponseValue;
7274         }
7275         // 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);
7276         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
7277                 if(!isWasmInitialized) {
7278                         throw new Error("initializeWasm() must be awaited first!");
7279                 }
7280                 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
7281                 return nativeResponseValue;
7282         }
7283         // 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);
7284         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
7285                 if(!isWasmInitialized) {
7286                         throw new Error("initializeWasm() must be awaited first!");
7287                 }
7288                 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
7289                 return nativeResponseValue;
7290         }
7291         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7292         export function InMemorySigner_as_BaseSign(this_arg: number): number {
7293                 if(!isWasmInitialized) {
7294                         throw new Error("initializeWasm() must be awaited first!");
7295                 }
7296                 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
7297                 return nativeResponseValue;
7298         }
7299         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7300         export function InMemorySigner_as_Sign(this_arg: number): number {
7301                 if(!isWasmInitialized) {
7302                         throw new Error("initializeWasm() must be awaited first!");
7303                 }
7304                 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
7305                 return nativeResponseValue;
7306         }
7307         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
7308         export function InMemorySigner_write(obj: number): Uint8Array {
7309                 if(!isWasmInitialized) {
7310                         throw new Error("initializeWasm() must be awaited first!");
7311                 }
7312                 const nativeResponseValue = wasm.InMemorySigner_write(obj);
7313                 return decodeArray(nativeResponseValue);
7314         }
7315         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
7316         export function InMemorySigner_read(ser: Uint8Array): number {
7317                 if(!isWasmInitialized) {
7318                         throw new Error("initializeWasm() must be awaited first!");
7319                 }
7320                 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
7321                 return nativeResponseValue;
7322         }
7323         // void KeysManager_free(struct LDKKeysManager this_obj);
7324         export function KeysManager_free(this_obj: number): void {
7325                 if(!isWasmInitialized) {
7326                         throw new Error("initializeWasm() must be awaited first!");
7327                 }
7328                 const nativeResponseValue = wasm.KeysManager_free(this_obj);
7329                 // debug statements here
7330         }
7331         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
7332         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
7333                 if(!isWasmInitialized) {
7334                         throw new Error("initializeWasm() must be awaited first!");
7335                 }
7336                 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
7337                 return nativeResponseValue;
7338         }
7339         // 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]);
7340         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
7341                 if(!isWasmInitialized) {
7342                         throw new Error("initializeWasm() must be awaited first!");
7343                 }
7344                 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
7345                 return nativeResponseValue;
7346         }
7347         // 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);
7348         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
7349                 if(!isWasmInitialized) {
7350                         throw new Error("initializeWasm() must be awaited first!");
7351                 }
7352                 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
7353                 return nativeResponseValue;
7354         }
7355         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
7356         export function KeysManager_as_KeysInterface(this_arg: number): number {
7357                 if(!isWasmInitialized) {
7358                         throw new Error("initializeWasm() must be awaited first!");
7359                 }
7360                 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
7361                 return nativeResponseValue;
7362         }
7363         // void ChannelManager_free(struct LDKChannelManager this_obj);
7364         export function ChannelManager_free(this_obj: number): void {
7365                 if(!isWasmInitialized) {
7366                         throw new Error("initializeWasm() must be awaited first!");
7367                 }
7368                 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
7369                 // debug statements here
7370         }
7371         // void ChainParameters_free(struct LDKChainParameters this_obj);
7372         export function ChainParameters_free(this_obj: number): void {
7373                 if(!isWasmInitialized) {
7374                         throw new Error("initializeWasm() must be awaited first!");
7375                 }
7376                 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
7377                 // debug statements here
7378         }
7379         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
7380         export function ChainParameters_get_network(this_ptr: number): Network {
7381                 if(!isWasmInitialized) {
7382                         throw new Error("initializeWasm() must be awaited first!");
7383                 }
7384                 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
7385                 return nativeResponseValue;
7386         }
7387         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
7388         export function ChainParameters_set_network(this_ptr: number, val: Network): void {
7389                 if(!isWasmInitialized) {
7390                         throw new Error("initializeWasm() must be awaited first!");
7391                 }
7392                 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
7393                 // debug statements here
7394         }
7395         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
7396         export function ChainParameters_get_best_block(this_ptr: number): number {
7397                 if(!isWasmInitialized) {
7398                         throw new Error("initializeWasm() must be awaited first!");
7399                 }
7400                 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
7401                 return nativeResponseValue;
7402         }
7403         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
7404         export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
7405                 if(!isWasmInitialized) {
7406                         throw new Error("initializeWasm() must be awaited first!");
7407                 }
7408                 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
7409                 // debug statements here
7410         }
7411         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
7412         export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
7413                 if(!isWasmInitialized) {
7414                         throw new Error("initializeWasm() must be awaited first!");
7415                 }
7416                 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
7417                 return nativeResponseValue;
7418         }
7419         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
7420         export function ChainParameters_clone(orig: number): number {
7421                 if(!isWasmInitialized) {
7422                         throw new Error("initializeWasm() must be awaited first!");
7423                 }
7424                 const nativeResponseValue = wasm.ChainParameters_clone(orig);
7425                 return nativeResponseValue;
7426         }
7427         // void BestBlock_free(struct LDKBestBlock this_obj);
7428         export function BestBlock_free(this_obj: number): void {
7429                 if(!isWasmInitialized) {
7430                         throw new Error("initializeWasm() must be awaited first!");
7431                 }
7432                 const nativeResponseValue = wasm.BestBlock_free(this_obj);
7433                 // debug statements here
7434         }
7435         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
7436         export function BestBlock_clone(orig: number): number {
7437                 if(!isWasmInitialized) {
7438                         throw new Error("initializeWasm() must be awaited first!");
7439                 }
7440                 const nativeResponseValue = wasm.BestBlock_clone(orig);
7441                 return nativeResponseValue;
7442         }
7443         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
7444         export function BestBlock_from_genesis(network: Network): number {
7445                 if(!isWasmInitialized) {
7446                         throw new Error("initializeWasm() must be awaited first!");
7447                 }
7448                 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
7449                 return nativeResponseValue;
7450         }
7451         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
7452         export function BestBlock_new(block_hash: Uint8Array, height: number): number {
7453                 if(!isWasmInitialized) {
7454                         throw new Error("initializeWasm() must be awaited first!");
7455                 }
7456                 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
7457                 return nativeResponseValue;
7458         }
7459         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
7460         export function BestBlock_block_hash(this_arg: number): Uint8Array {
7461                 if(!isWasmInitialized) {
7462                         throw new Error("initializeWasm() must be awaited first!");
7463                 }
7464                 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
7465                 return decodeArray(nativeResponseValue);
7466         }
7467         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
7468         export function BestBlock_height(this_arg: number): number {
7469                 if(!isWasmInitialized) {
7470                         throw new Error("initializeWasm() must be awaited first!");
7471                 }
7472                 const nativeResponseValue = wasm.BestBlock_height(this_arg);
7473                 return nativeResponseValue;
7474         }
7475         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
7476         export function ChannelDetails_free(this_obj: number): void {
7477                 if(!isWasmInitialized) {
7478                         throw new Error("initializeWasm() must be awaited first!");
7479                 }
7480                 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
7481                 // debug statements here
7482         }
7483         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
7484         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
7485                 if(!isWasmInitialized) {
7486                         throw new Error("initializeWasm() must be awaited first!");
7487                 }
7488                 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
7489                 return decodeArray(nativeResponseValue);
7490         }
7491         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7492         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
7493                 if(!isWasmInitialized) {
7494                         throw new Error("initializeWasm() must be awaited first!");
7495                 }
7496                 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
7497                 // debug statements here
7498         }
7499         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7500         export function ChannelDetails_get_funding_txo(this_ptr: number): number {
7501                 if(!isWasmInitialized) {
7502                         throw new Error("initializeWasm() must be awaited first!");
7503                 }
7504                 const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
7505                 return nativeResponseValue;
7506         }
7507         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
7508         export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
7509                 if(!isWasmInitialized) {
7510                         throw new Error("initializeWasm() must be awaited first!");
7511                 }
7512                 const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
7513                 // debug statements here
7514         }
7515         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7516         export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
7517                 if(!isWasmInitialized) {
7518                         throw new Error("initializeWasm() must be awaited first!");
7519                 }
7520                 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
7521                 return nativeResponseValue;
7522         }
7523         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
7524         export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
7525                 if(!isWasmInitialized) {
7526                         throw new Error("initializeWasm() must be awaited first!");
7527                 }
7528                 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
7529                 // debug statements here
7530         }
7531         // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7532         export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
7533                 if(!isWasmInitialized) {
7534                         throw new Error("initializeWasm() must be awaited first!");
7535                 }
7536                 const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
7537                 return decodeArray(nativeResponseValue);
7538         }
7539         // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7540         export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
7541                 if(!isWasmInitialized) {
7542                         throw new Error("initializeWasm() must be awaited first!");
7543                 }
7544                 const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
7545                 // debug statements here
7546         }
7547         // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7548         export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
7549                 if(!isWasmInitialized) {
7550                         throw new Error("initializeWasm() must be awaited first!");
7551                 }
7552                 const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
7553                 return nativeResponseValue;
7554         }
7555         // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
7556         export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
7557                 if(!isWasmInitialized) {
7558                         throw new Error("initializeWasm() must be awaited first!");
7559                 }
7560                 const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
7561                 // debug statements here
7562         }
7563         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7564         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
7565                 if(!isWasmInitialized) {
7566                         throw new Error("initializeWasm() must be awaited first!");
7567                 }
7568                 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
7569                 return nativeResponseValue;
7570         }
7571         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
7572         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
7573                 if(!isWasmInitialized) {
7574                         throw new Error("initializeWasm() must be awaited first!");
7575                 }
7576                 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
7577                 // debug statements here
7578         }
7579         // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7580         export function ChannelDetails_get_user_id(this_ptr: number): number {
7581                 if(!isWasmInitialized) {
7582                         throw new Error("initializeWasm() must be awaited first!");
7583                 }
7584                 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
7585                 return nativeResponseValue;
7586         }
7587         // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
7588         export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
7589                 if(!isWasmInitialized) {
7590                         throw new Error("initializeWasm() must be awaited first!");
7591                 }
7592                 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
7593                 // debug statements here
7594         }
7595         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7596         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
7597                 if(!isWasmInitialized) {
7598                         throw new Error("initializeWasm() must be awaited first!");
7599                 }
7600                 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
7601                 return nativeResponseValue;
7602         }
7603         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
7604         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
7605                 if(!isWasmInitialized) {
7606                         throw new Error("initializeWasm() must be awaited first!");
7607                 }
7608                 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
7609                 // debug statements here
7610         }
7611         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7612         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
7613                 if(!isWasmInitialized) {
7614                         throw new Error("initializeWasm() must be awaited first!");
7615                 }
7616                 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
7617                 return nativeResponseValue;
7618         }
7619         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
7620         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
7621                 if(!isWasmInitialized) {
7622                         throw new Error("initializeWasm() must be awaited first!");
7623                 }
7624                 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
7625                 // debug statements here
7626         }
7627         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7628         export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
7629                 if(!isWasmInitialized) {
7630                         throw new Error("initializeWasm() must be awaited first!");
7631                 }
7632                 const nativeResponseValue = wasm.ChannelDetails_get_is_outbound(this_ptr);
7633                 return nativeResponseValue;
7634         }
7635         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
7636         export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
7637                 if(!isWasmInitialized) {
7638                         throw new Error("initializeWasm() must be awaited first!");
7639                 }
7640                 const nativeResponseValue = wasm.ChannelDetails_set_is_outbound(this_ptr, val);
7641                 // debug statements here
7642         }
7643         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7644         export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
7645                 if(!isWasmInitialized) {
7646                         throw new Error("initializeWasm() must be awaited first!");
7647                 }
7648                 const nativeResponseValue = wasm.ChannelDetails_get_is_funding_locked(this_ptr);
7649                 return nativeResponseValue;
7650         }
7651         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
7652         export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
7653                 if(!isWasmInitialized) {
7654                         throw new Error("initializeWasm() must be awaited first!");
7655                 }
7656                 const nativeResponseValue = wasm.ChannelDetails_set_is_funding_locked(this_ptr, val);
7657                 // debug statements here
7658         }
7659         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7660         export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
7661                 if(!isWasmInitialized) {
7662                         throw new Error("initializeWasm() must be awaited first!");
7663                 }
7664                 const nativeResponseValue = wasm.ChannelDetails_get_is_usable(this_ptr);
7665                 return nativeResponseValue;
7666         }
7667         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
7668         export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
7669                 if(!isWasmInitialized) {
7670                         throw new Error("initializeWasm() must be awaited first!");
7671                 }
7672                 const nativeResponseValue = wasm.ChannelDetails_set_is_usable(this_ptr, val);
7673                 // debug statements here
7674         }
7675         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7676         export function ChannelDetails_get_is_public(this_ptr: number): boolean {
7677                 if(!isWasmInitialized) {
7678                         throw new Error("initializeWasm() must be awaited first!");
7679                 }
7680                 const nativeResponseValue = wasm.ChannelDetails_get_is_public(this_ptr);
7681                 return nativeResponseValue;
7682         }
7683         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
7684         export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
7685                 if(!isWasmInitialized) {
7686                         throw new Error("initializeWasm() must be awaited first!");
7687                 }
7688                 const nativeResponseValue = wasm.ChannelDetails_set_is_public(this_ptr, val);
7689                 // debug statements here
7690         }
7691         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
7692         export function ChannelDetails_clone(orig: number): number {
7693                 if(!isWasmInitialized) {
7694                         throw new Error("initializeWasm() must be awaited first!");
7695                 }
7696                 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
7697                 return nativeResponseValue;
7698         }
7699         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
7700         export function PaymentSendFailure_free(this_ptr: number): void {
7701                 if(!isWasmInitialized) {
7702                         throw new Error("initializeWasm() must be awaited first!");
7703                 }
7704                 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
7705                 // debug statements here
7706         }
7707         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
7708         export function PaymentSendFailure_clone(orig: number): number {
7709                 if(!isWasmInitialized) {
7710                         throw new Error("initializeWasm() must be awaited first!");
7711                 }
7712                 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
7713                 return nativeResponseValue;
7714         }
7715         // 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);
7716         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
7717                 if(!isWasmInitialized) {
7718                         throw new Error("initializeWasm() must be awaited first!");
7719                 }
7720                 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
7721                 return nativeResponseValue;
7722         }
7723         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
7724         export function ChannelManager_get_current_default_configuration(this_arg: number): number {
7725                 if(!isWasmInitialized) {
7726                         throw new Error("initializeWasm() must be awaited first!");
7727                 }
7728                 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
7729                 return nativeResponseValue;
7730         }
7731         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, uint64_t user_id, struct LDKUserConfig override_config);
7732         export function ChannelManager_create_channel(this_arg: number, their_network_key: Uint8Array, channel_value_satoshis: number, push_msat: number, user_id: number, override_config: number): number {
7733                 if(!isWasmInitialized) {
7734                         throw new Error("initializeWasm() must be awaited first!");
7735                 }
7736                 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
7737                 return nativeResponseValue;
7738         }
7739         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
7740         export function ChannelManager_list_channels(this_arg: number): number[] {
7741                 if(!isWasmInitialized) {
7742                         throw new Error("initializeWasm() must be awaited first!");
7743                 }
7744                 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
7745                 return nativeResponseValue;
7746         }
7747         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
7748         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
7749                 if(!isWasmInitialized) {
7750                         throw new Error("initializeWasm() must be awaited first!");
7751                 }
7752                 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
7753                 return nativeResponseValue;
7754         }
7755         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
7756         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
7757                 if(!isWasmInitialized) {
7758                         throw new Error("initializeWasm() must be awaited first!");
7759                 }
7760                 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
7761                 return nativeResponseValue;
7762         }
7763         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
7764         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
7765                 if(!isWasmInitialized) {
7766                         throw new Error("initializeWasm() must be awaited first!");
7767                 }
7768                 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
7769                 return nativeResponseValue;
7770         }
7771         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
7772         export function ChannelManager_force_close_all_channels(this_arg: number): void {
7773                 if(!isWasmInitialized) {
7774                         throw new Error("initializeWasm() must be awaited first!");
7775                 }
7776                 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
7777                 // debug statements here
7778         }
7779         // MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
7780         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
7781                 if(!isWasmInitialized) {
7782                         throw new Error("initializeWasm() must be awaited first!");
7783                 }
7784                 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
7785                 return nativeResponseValue;
7786         }
7787         // 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);
7788         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
7789                 if(!isWasmInitialized) {
7790                         throw new Error("initializeWasm() must be awaited first!");
7791                 }
7792                 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
7793                 return nativeResponseValue;
7794         }
7795         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
7796         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
7797                 if(!isWasmInitialized) {
7798                         throw new Error("initializeWasm() must be awaited first!");
7799                 }
7800                 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
7801                 // debug statements here
7802         }
7803         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
7804         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
7805                 if(!isWasmInitialized) {
7806                         throw new Error("initializeWasm() must be awaited first!");
7807                 }
7808                 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
7809                 // debug statements here
7810         }
7811         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
7812         export function ChannelManager_timer_tick_occurred(this_arg: number): void {
7813                 if(!isWasmInitialized) {
7814                         throw new Error("initializeWasm() must be awaited first!");
7815                 }
7816                 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
7817                 // debug statements here
7818         }
7819         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
7820         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
7821                 if(!isWasmInitialized) {
7822                         throw new Error("initializeWasm() must be awaited first!");
7823                 }
7824                 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash));
7825                 return nativeResponseValue;
7826         }
7827         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
7828         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
7829                 if(!isWasmInitialized) {
7830                         throw new Error("initializeWasm() must be awaited first!");
7831                 }
7832                 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage));
7833                 return nativeResponseValue;
7834         }
7835         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
7836         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
7837                 if(!isWasmInitialized) {
7838                         throw new Error("initializeWasm() must be awaited first!");
7839                 }
7840                 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
7841                 return decodeArray(nativeResponseValue);
7842         }
7843         // void ChannelManager_channel_monitor_updated(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR funding_txo, uint64_t highest_applied_update_id);
7844         export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
7845                 if(!isWasmInitialized) {
7846                         throw new Error("initializeWasm() must be awaited first!");
7847                 }
7848                 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
7849                 // debug statements here
7850         }
7851         // 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);
7852         export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
7853                 if(!isWasmInitialized) {
7854                         throw new Error("initializeWasm() must be awaited first!");
7855                 }
7856                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs, user_payment_id);
7857                 return nativeResponseValue;
7858         }
7859         // 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);
7860         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 {
7861                 if(!isWasmInitialized) {
7862                         throw new Error("initializeWasm() must be awaited first!");
7863                 }
7864                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_for_hash(this_arg, encodeArray(payment_hash), min_value_msat, invoice_expiry_delta_secs, user_payment_id);
7865                 return nativeResponseValue;
7866         }
7867         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
7868         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
7869                 if(!isWasmInitialized) {
7870                         throw new Error("initializeWasm() must be awaited first!");
7871                 }
7872                 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
7873                 return nativeResponseValue;
7874         }
7875         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
7876         export function ChannelManager_as_EventsProvider(this_arg: number): number {
7877                 if(!isWasmInitialized) {
7878                         throw new Error("initializeWasm() must be awaited first!");
7879                 }
7880                 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
7881                 return nativeResponseValue;
7882         }
7883         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
7884         export function ChannelManager_as_Listen(this_arg: number): number {
7885                 if(!isWasmInitialized) {
7886                         throw new Error("initializeWasm() must be awaited first!");
7887                 }
7888                 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
7889                 return nativeResponseValue;
7890         }
7891         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
7892         export function ChannelManager_as_Confirm(this_arg: number): number {
7893                 if(!isWasmInitialized) {
7894                         throw new Error("initializeWasm() must be awaited first!");
7895                 }
7896                 const nativeResponseValue = wasm.ChannelManager_as_Confirm(this_arg);
7897                 return nativeResponseValue;
7898         }
7899         // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
7900         export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
7901                 if(!isWasmInitialized) {
7902                         throw new Error("initializeWasm() must be awaited first!");
7903                 }
7904                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
7905                 return nativeResponseValue;
7906         }
7907         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
7908         export function ChannelManager_await_persistable_update(this_arg: number): void {
7909                 if(!isWasmInitialized) {
7910                         throw new Error("initializeWasm() must be awaited first!");
7911                 }
7912                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
7913                 // debug statements here
7914         }
7915         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
7916         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
7917                 if(!isWasmInitialized) {
7918                         throw new Error("initializeWasm() must be awaited first!");
7919                 }
7920                 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
7921                 return nativeResponseValue;
7922         }
7923         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
7924         export function ChannelManager_write(obj: number): Uint8Array {
7925                 if(!isWasmInitialized) {
7926                         throw new Error("initializeWasm() must be awaited first!");
7927                 }
7928                 const nativeResponseValue = wasm.ChannelManager_write(obj);
7929                 return decodeArray(nativeResponseValue);
7930         }
7931         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
7932         export function ChannelManagerReadArgs_free(this_obj: number): void {
7933                 if(!isWasmInitialized) {
7934                         throw new Error("initializeWasm() must be awaited first!");
7935                 }
7936                 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
7937                 // debug statements here
7938         }
7939         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
7940         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
7941                 if(!isWasmInitialized) {
7942                         throw new Error("initializeWasm() must be awaited first!");
7943                 }
7944                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
7945                 return nativeResponseValue;
7946         }
7947         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
7948         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
7949                 if(!isWasmInitialized) {
7950                         throw new Error("initializeWasm() must be awaited first!");
7951                 }
7952                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
7953                 // debug statements here
7954         }
7955         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
7956         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
7957                 if(!isWasmInitialized) {
7958                         throw new Error("initializeWasm() must be awaited first!");
7959                 }
7960                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
7961                 return nativeResponseValue;
7962         }
7963         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
7964         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
7965                 if(!isWasmInitialized) {
7966                         throw new Error("initializeWasm() must be awaited first!");
7967                 }
7968                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
7969                 // debug statements here
7970         }
7971         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
7972         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
7973                 if(!isWasmInitialized) {
7974                         throw new Error("initializeWasm() must be awaited first!");
7975                 }
7976                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
7977                 return nativeResponseValue;
7978         }
7979         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
7980         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
7981                 if(!isWasmInitialized) {
7982                         throw new Error("initializeWasm() must be awaited first!");
7983                 }
7984                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
7985                 // debug statements here
7986         }
7987         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
7988         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
7989                 if(!isWasmInitialized) {
7990                         throw new Error("initializeWasm() must be awaited first!");
7991                 }
7992                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
7993                 return nativeResponseValue;
7994         }
7995         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
7996         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
7997                 if(!isWasmInitialized) {
7998                         throw new Error("initializeWasm() must be awaited first!");
7999                 }
8000                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
8001                 // debug statements here
8002         }
8003         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8004         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
8005                 if(!isWasmInitialized) {
8006                         throw new Error("initializeWasm() must be awaited first!");
8007                 }
8008                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
8009                 return nativeResponseValue;
8010         }
8011         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
8012         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
8013                 if(!isWasmInitialized) {
8014                         throw new Error("initializeWasm() must be awaited first!");
8015                 }
8016                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
8017                 // debug statements here
8018         }
8019         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8020         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
8021                 if(!isWasmInitialized) {
8022                         throw new Error("initializeWasm() must be awaited first!");
8023                 }
8024                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
8025                 return nativeResponseValue;
8026         }
8027         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
8028         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
8029                 if(!isWasmInitialized) {
8030                         throw new Error("initializeWasm() must be awaited first!");
8031                 }
8032                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
8033                 // debug statements here
8034         }
8035         // 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);
8036         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 {
8037                 if(!isWasmInitialized) {
8038                         throw new Error("initializeWasm() must be awaited first!");
8039                 }
8040                 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
8041                 return nativeResponseValue;
8042         }
8043         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
8044         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
8045                 if(!isWasmInitialized) {
8046                         throw new Error("initializeWasm() must be awaited first!");
8047                 }
8048                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
8049                 return nativeResponseValue;
8050         }
8051         // void DecodeError_free(struct LDKDecodeError this_obj);
8052         export function DecodeError_free(this_obj: number): void {
8053                 if(!isWasmInitialized) {
8054                         throw new Error("initializeWasm() must be awaited first!");
8055                 }
8056                 const nativeResponseValue = wasm.DecodeError_free(this_obj);
8057                 // debug statements here
8058         }
8059         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
8060         export function DecodeError_clone(orig: number): number {
8061                 if(!isWasmInitialized) {
8062                         throw new Error("initializeWasm() must be awaited first!");
8063                 }
8064                 const nativeResponseValue = wasm.DecodeError_clone(orig);
8065                 return nativeResponseValue;
8066         }
8067         // void Init_free(struct LDKInit this_obj);
8068         export function Init_free(this_obj: number): void {
8069                 if(!isWasmInitialized) {
8070                         throw new Error("initializeWasm() must be awaited first!");
8071                 }
8072                 const nativeResponseValue = wasm.Init_free(this_obj);
8073                 // debug statements here
8074         }
8075         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
8076         export function Init_get_features(this_ptr: number): number {
8077                 if(!isWasmInitialized) {
8078                         throw new Error("initializeWasm() must be awaited first!");
8079                 }
8080                 const nativeResponseValue = wasm.Init_get_features(this_ptr);
8081                 return nativeResponseValue;
8082         }
8083         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
8084         export function Init_set_features(this_ptr: number, val: number): void {
8085                 if(!isWasmInitialized) {
8086                         throw new Error("initializeWasm() must be awaited first!");
8087                 }
8088                 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
8089                 // debug statements here
8090         }
8091         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
8092         export function Init_new(features_arg: number): number {
8093                 if(!isWasmInitialized) {
8094                         throw new Error("initializeWasm() must be awaited first!");
8095                 }
8096                 const nativeResponseValue = wasm.Init_new(features_arg);
8097                 return nativeResponseValue;
8098         }
8099         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
8100         export function Init_clone(orig: number): number {
8101                 if(!isWasmInitialized) {
8102                         throw new Error("initializeWasm() must be awaited first!");
8103                 }
8104                 const nativeResponseValue = wasm.Init_clone(orig);
8105                 return nativeResponseValue;
8106         }
8107         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
8108         export function ErrorMessage_free(this_obj: number): void {
8109                 if(!isWasmInitialized) {
8110                         throw new Error("initializeWasm() must be awaited first!");
8111                 }
8112                 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
8113                 // debug statements here
8114         }
8115         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
8116         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
8117                 if(!isWasmInitialized) {
8118                         throw new Error("initializeWasm() must be awaited first!");
8119                 }
8120                 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
8121                 return decodeArray(nativeResponseValue);
8122         }
8123         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8124         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
8125                 if(!isWasmInitialized) {
8126                         throw new Error("initializeWasm() must be awaited first!");
8127                 }
8128                 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
8129                 // debug statements here
8130         }
8131         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
8132         export function ErrorMessage_get_data(this_ptr: number): String {
8133                 if(!isWasmInitialized) {
8134                         throw new Error("initializeWasm() must be awaited first!");
8135                 }
8136                 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
8137                 return nativeResponseValue;
8138         }
8139         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
8140         export function ErrorMessage_set_data(this_ptr: number, val: String): void {
8141                 if(!isWasmInitialized) {
8142                         throw new Error("initializeWasm() must be awaited first!");
8143                 }
8144                 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, val);
8145                 // debug statements here
8146         }
8147         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
8148         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
8149                 if(!isWasmInitialized) {
8150                         throw new Error("initializeWasm() must be awaited first!");
8151                 }
8152                 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), data_arg);
8153                 return nativeResponseValue;
8154         }
8155         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
8156         export function ErrorMessage_clone(orig: number): number {
8157                 if(!isWasmInitialized) {
8158                         throw new Error("initializeWasm() must be awaited first!");
8159                 }
8160                 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
8161                 return nativeResponseValue;
8162         }
8163         // void Ping_free(struct LDKPing this_obj);
8164         export function Ping_free(this_obj: number): void {
8165                 if(!isWasmInitialized) {
8166                         throw new Error("initializeWasm() must be awaited first!");
8167                 }
8168                 const nativeResponseValue = wasm.Ping_free(this_obj);
8169                 // debug statements here
8170         }
8171         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
8172         export function Ping_get_ponglen(this_ptr: number): number {
8173                 if(!isWasmInitialized) {
8174                         throw new Error("initializeWasm() must be awaited first!");
8175                 }
8176                 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
8177                 return nativeResponseValue;
8178         }
8179         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
8180         export function Ping_set_ponglen(this_ptr: number, val: number): void {
8181                 if(!isWasmInitialized) {
8182                         throw new Error("initializeWasm() must be awaited first!");
8183                 }
8184                 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
8185                 // debug statements here
8186         }
8187         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
8188         export function Ping_get_byteslen(this_ptr: number): number {
8189                 if(!isWasmInitialized) {
8190                         throw new Error("initializeWasm() must be awaited first!");
8191                 }
8192                 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
8193                 return nativeResponseValue;
8194         }
8195         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
8196         export function Ping_set_byteslen(this_ptr: number, val: number): void {
8197                 if(!isWasmInitialized) {
8198                         throw new Error("initializeWasm() must be awaited first!");
8199                 }
8200                 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
8201                 // debug statements here
8202         }
8203         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
8204         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
8205                 if(!isWasmInitialized) {
8206                         throw new Error("initializeWasm() must be awaited first!");
8207                 }
8208                 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
8209                 return nativeResponseValue;
8210         }
8211         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
8212         export function Ping_clone(orig: number): number {
8213                 if(!isWasmInitialized) {
8214                         throw new Error("initializeWasm() must be awaited first!");
8215                 }
8216                 const nativeResponseValue = wasm.Ping_clone(orig);
8217                 return nativeResponseValue;
8218         }
8219         // void Pong_free(struct LDKPong this_obj);
8220         export function Pong_free(this_obj: number): void {
8221                 if(!isWasmInitialized) {
8222                         throw new Error("initializeWasm() must be awaited first!");
8223                 }
8224                 const nativeResponseValue = wasm.Pong_free(this_obj);
8225                 // debug statements here
8226         }
8227         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
8228         export function Pong_get_byteslen(this_ptr: number): number {
8229                 if(!isWasmInitialized) {
8230                         throw new Error("initializeWasm() must be awaited first!");
8231                 }
8232                 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
8233                 return nativeResponseValue;
8234         }
8235         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
8236         export function Pong_set_byteslen(this_ptr: number, val: number): void {
8237                 if(!isWasmInitialized) {
8238                         throw new Error("initializeWasm() must be awaited first!");
8239                 }
8240                 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
8241                 // debug statements here
8242         }
8243         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
8244         export function Pong_new(byteslen_arg: number): number {
8245                 if(!isWasmInitialized) {
8246                         throw new Error("initializeWasm() must be awaited first!");
8247                 }
8248                 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
8249                 return nativeResponseValue;
8250         }
8251         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
8252         export function Pong_clone(orig: number): number {
8253                 if(!isWasmInitialized) {
8254                         throw new Error("initializeWasm() must be awaited first!");
8255                 }
8256                 const nativeResponseValue = wasm.Pong_clone(orig);
8257                 return nativeResponseValue;
8258         }
8259         // void OpenChannel_free(struct LDKOpenChannel this_obj);
8260         export function OpenChannel_free(this_obj: number): void {
8261                 if(!isWasmInitialized) {
8262                         throw new Error("initializeWasm() must be awaited first!");
8263                 }
8264                 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
8265                 // debug statements here
8266         }
8267         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
8268         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
8269                 if(!isWasmInitialized) {
8270                         throw new Error("initializeWasm() must be awaited first!");
8271                 }
8272                 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
8273                 return decodeArray(nativeResponseValue);
8274         }
8275         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8276         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8277                 if(!isWasmInitialized) {
8278                         throw new Error("initializeWasm() must be awaited first!");
8279                 }
8280                 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
8281                 // debug statements here
8282         }
8283         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
8284         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
8285                 if(!isWasmInitialized) {
8286                         throw new Error("initializeWasm() must be awaited first!");
8287                 }
8288                 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
8289                 return decodeArray(nativeResponseValue);
8290         }
8291         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8292         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
8293                 if(!isWasmInitialized) {
8294                         throw new Error("initializeWasm() must be awaited first!");
8295                 }
8296                 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
8297                 // debug statements here
8298         }
8299         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8300         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
8301                 if(!isWasmInitialized) {
8302                         throw new Error("initializeWasm() must be awaited first!");
8303                 }
8304                 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
8305                 return nativeResponseValue;
8306         }
8307         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8308         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
8309                 if(!isWasmInitialized) {
8310                         throw new Error("initializeWasm() must be awaited first!");
8311                 }
8312                 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
8313                 // debug statements here
8314         }
8315         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8316         export function OpenChannel_get_push_msat(this_ptr: number): number {
8317                 if(!isWasmInitialized) {
8318                         throw new Error("initializeWasm() must be awaited first!");
8319                 }
8320                 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
8321                 return nativeResponseValue;
8322         }
8323         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8324         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
8325                 if(!isWasmInitialized) {
8326                         throw new Error("initializeWasm() must be awaited first!");
8327                 }
8328                 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
8329                 // debug statements here
8330         }
8331         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8332         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
8333                 if(!isWasmInitialized) {
8334                         throw new Error("initializeWasm() must be awaited first!");
8335                 }
8336                 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
8337                 return nativeResponseValue;
8338         }
8339         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8340         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
8341                 if(!isWasmInitialized) {
8342                         throw new Error("initializeWasm() must be awaited first!");
8343                 }
8344                 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
8345                 // debug statements here
8346         }
8347         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8348         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
8349                 if(!isWasmInitialized) {
8350                         throw new Error("initializeWasm() must be awaited first!");
8351                 }
8352                 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
8353                 return nativeResponseValue;
8354         }
8355         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8356         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
8357                 if(!isWasmInitialized) {
8358                         throw new Error("initializeWasm() must be awaited first!");
8359                 }
8360                 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
8361                 // debug statements here
8362         }
8363         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8364         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
8365                 if(!isWasmInitialized) {
8366                         throw new Error("initializeWasm() must be awaited first!");
8367                 }
8368                 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
8369                 return nativeResponseValue;
8370         }
8371         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8372         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
8373                 if(!isWasmInitialized) {
8374                         throw new Error("initializeWasm() must be awaited first!");
8375                 }
8376                 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
8377                 // debug statements here
8378         }
8379         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8380         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
8381                 if(!isWasmInitialized) {
8382                         throw new Error("initializeWasm() must be awaited first!");
8383                 }
8384                 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
8385                 return nativeResponseValue;
8386         }
8387         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8388         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
8389                 if(!isWasmInitialized) {
8390                         throw new Error("initializeWasm() must be awaited first!");
8391                 }
8392                 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
8393                 // debug statements here
8394         }
8395         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8396         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
8397                 if(!isWasmInitialized) {
8398                         throw new Error("initializeWasm() must be awaited first!");
8399                 }
8400                 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
8401                 return nativeResponseValue;
8402         }
8403         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
8404         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
8405                 if(!isWasmInitialized) {
8406                         throw new Error("initializeWasm() must be awaited first!");
8407                 }
8408                 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
8409                 // debug statements here
8410         }
8411         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8412         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
8413                 if(!isWasmInitialized) {
8414                         throw new Error("initializeWasm() must be awaited first!");
8415                 }
8416                 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
8417                 return nativeResponseValue;
8418         }
8419         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
8420         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
8421                 if(!isWasmInitialized) {
8422                         throw new Error("initializeWasm() must be awaited first!");
8423                 }
8424                 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
8425                 // debug statements here
8426         }
8427         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8428         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
8429                 if(!isWasmInitialized) {
8430                         throw new Error("initializeWasm() must be awaited first!");
8431                 }
8432                 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
8433                 return nativeResponseValue;
8434         }
8435         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
8436         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
8437                 if(!isWasmInitialized) {
8438                         throw new Error("initializeWasm() must be awaited first!");
8439                 }
8440                 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
8441                 // debug statements here
8442         }
8443         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8444         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
8445                 if(!isWasmInitialized) {
8446                         throw new Error("initializeWasm() must be awaited first!");
8447                 }
8448                 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
8449                 return decodeArray(nativeResponseValue);
8450         }
8451         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8452         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
8453                 if(!isWasmInitialized) {
8454                         throw new Error("initializeWasm() must be awaited first!");
8455                 }
8456                 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
8457                 // debug statements here
8458         }
8459         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8460         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
8461                 if(!isWasmInitialized) {
8462                         throw new Error("initializeWasm() must be awaited first!");
8463                 }
8464                 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
8465                 return decodeArray(nativeResponseValue);
8466         }
8467         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8468         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
8469                 if(!isWasmInitialized) {
8470                         throw new Error("initializeWasm() must be awaited first!");
8471                 }
8472                 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
8473                 // debug statements here
8474         }
8475         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8476         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
8477                 if(!isWasmInitialized) {
8478                         throw new Error("initializeWasm() must be awaited first!");
8479                 }
8480                 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
8481                 return decodeArray(nativeResponseValue);
8482         }
8483         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8484         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
8485                 if(!isWasmInitialized) {
8486                         throw new Error("initializeWasm() must be awaited first!");
8487                 }
8488                 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
8489                 // debug statements here
8490         }
8491         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8492         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
8493                 if(!isWasmInitialized) {
8494                         throw new Error("initializeWasm() must be awaited first!");
8495                 }
8496                 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
8497                 return decodeArray(nativeResponseValue);
8498         }
8499         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8500         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
8501                 if(!isWasmInitialized) {
8502                         throw new Error("initializeWasm() must be awaited first!");
8503                 }
8504                 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
8505                 // debug statements here
8506         }
8507         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8508         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
8509                 if(!isWasmInitialized) {
8510                         throw new Error("initializeWasm() must be awaited first!");
8511                 }
8512                 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
8513                 return decodeArray(nativeResponseValue);
8514         }
8515         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8516         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
8517                 if(!isWasmInitialized) {
8518                         throw new Error("initializeWasm() must be awaited first!");
8519                 }
8520                 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
8521                 // debug statements here
8522         }
8523         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8524         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
8525                 if(!isWasmInitialized) {
8526                         throw new Error("initializeWasm() must be awaited first!");
8527                 }
8528                 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
8529                 return decodeArray(nativeResponseValue);
8530         }
8531         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8532         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8533                 if(!isWasmInitialized) {
8534                         throw new Error("initializeWasm() must be awaited first!");
8535                 }
8536                 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
8537                 // debug statements here
8538         }
8539         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8540         export function OpenChannel_get_channel_flags(this_ptr: number): number {
8541                 if(!isWasmInitialized) {
8542                         throw new Error("initializeWasm() must be awaited first!");
8543                 }
8544                 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
8545                 return nativeResponseValue;
8546         }
8547         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
8548         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
8549                 if(!isWasmInitialized) {
8550                         throw new Error("initializeWasm() must be awaited first!");
8551                 }
8552                 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
8553                 // debug statements here
8554         }
8555         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
8556         export function OpenChannel_clone(orig: number): number {
8557                 if(!isWasmInitialized) {
8558                         throw new Error("initializeWasm() must be awaited first!");
8559                 }
8560                 const nativeResponseValue = wasm.OpenChannel_clone(orig);
8561                 return nativeResponseValue;
8562         }
8563         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
8564         export function AcceptChannel_free(this_obj: number): void {
8565                 if(!isWasmInitialized) {
8566                         throw new Error("initializeWasm() must be awaited first!");
8567                 }
8568                 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
8569                 // debug statements here
8570         }
8571         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
8572         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
8573                 if(!isWasmInitialized) {
8574                         throw new Error("initializeWasm() must be awaited first!");
8575                 }
8576                 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
8577                 return decodeArray(nativeResponseValue);
8578         }
8579         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8580         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
8581                 if(!isWasmInitialized) {
8582                         throw new Error("initializeWasm() must be awaited first!");
8583                 }
8584                 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
8585                 // debug statements here
8586         }
8587         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8588         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
8589                 if(!isWasmInitialized) {
8590                         throw new Error("initializeWasm() must be awaited first!");
8591                 }
8592                 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
8593                 return nativeResponseValue;
8594         }
8595         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
8596         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
8597                 if(!isWasmInitialized) {
8598                         throw new Error("initializeWasm() must be awaited first!");
8599                 }
8600                 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
8601                 // debug statements here
8602         }
8603         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8604         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
8605                 if(!isWasmInitialized) {
8606                         throw new Error("initializeWasm() must be awaited first!");
8607                 }
8608                 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
8609                 return nativeResponseValue;
8610         }
8611         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
8612         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
8613                 if(!isWasmInitialized) {
8614                         throw new Error("initializeWasm() must be awaited first!");
8615                 }
8616                 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
8617                 // debug statements here
8618         }
8619         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8620         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
8621                 if(!isWasmInitialized) {
8622                         throw new Error("initializeWasm() must be awaited first!");
8623                 }
8624                 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
8625                 return nativeResponseValue;
8626         }
8627         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
8628         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
8629                 if(!isWasmInitialized) {
8630                         throw new Error("initializeWasm() must be awaited first!");
8631                 }
8632                 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
8633                 // debug statements here
8634         }
8635         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8636         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
8637                 if(!isWasmInitialized) {
8638                         throw new Error("initializeWasm() must be awaited first!");
8639                 }
8640                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
8641                 return nativeResponseValue;
8642         }
8643         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
8644         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
8645                 if(!isWasmInitialized) {
8646                         throw new Error("initializeWasm() must be awaited first!");
8647                 }
8648                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
8649                 // debug statements here
8650         }
8651         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8652         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
8653                 if(!isWasmInitialized) {
8654                         throw new Error("initializeWasm() must be awaited first!");
8655                 }
8656                 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
8657                 return nativeResponseValue;
8658         }
8659         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
8660         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
8661                 if(!isWasmInitialized) {
8662                         throw new Error("initializeWasm() must be awaited first!");
8663                 }
8664                 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
8665                 // debug statements here
8666         }
8667         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8668         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
8669                 if(!isWasmInitialized) {
8670                         throw new Error("initializeWasm() must be awaited first!");
8671                 }
8672                 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
8673                 return nativeResponseValue;
8674         }
8675         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
8676         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
8677                 if(!isWasmInitialized) {
8678                         throw new Error("initializeWasm() must be awaited first!");
8679                 }
8680                 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
8681                 // debug statements here
8682         }
8683         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8684         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
8685                 if(!isWasmInitialized) {
8686                         throw new Error("initializeWasm() must be awaited first!");
8687                 }
8688                 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
8689                 return nativeResponseValue;
8690         }
8691         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
8692         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
8693                 if(!isWasmInitialized) {
8694                         throw new Error("initializeWasm() must be awaited first!");
8695                 }
8696                 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
8697                 // debug statements here
8698         }
8699         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8700         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
8701                 if(!isWasmInitialized) {
8702                         throw new Error("initializeWasm() must be awaited first!");
8703                 }
8704                 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
8705                 return decodeArray(nativeResponseValue);
8706         }
8707         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8708         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
8709                 if(!isWasmInitialized) {
8710                         throw new Error("initializeWasm() must be awaited first!");
8711                 }
8712                 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
8713                 // debug statements here
8714         }
8715         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8716         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
8717                 if(!isWasmInitialized) {
8718                         throw new Error("initializeWasm() must be awaited first!");
8719                 }
8720                 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
8721                 return decodeArray(nativeResponseValue);
8722         }
8723         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8724         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
8725                 if(!isWasmInitialized) {
8726                         throw new Error("initializeWasm() must be awaited first!");
8727                 }
8728                 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
8729                 // debug statements here
8730         }
8731         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8732         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
8733                 if(!isWasmInitialized) {
8734                         throw new Error("initializeWasm() must be awaited first!");
8735                 }
8736                 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
8737                 return decodeArray(nativeResponseValue);
8738         }
8739         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8740         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
8741                 if(!isWasmInitialized) {
8742                         throw new Error("initializeWasm() must be awaited first!");
8743                 }
8744                 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
8745                 // debug statements here
8746         }
8747         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8748         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
8749                 if(!isWasmInitialized) {
8750                         throw new Error("initializeWasm() must be awaited first!");
8751                 }
8752                 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
8753                 return decodeArray(nativeResponseValue);
8754         }
8755         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8756         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
8757                 if(!isWasmInitialized) {
8758                         throw new Error("initializeWasm() must be awaited first!");
8759                 }
8760                 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
8761                 // debug statements here
8762         }
8763         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8764         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
8765                 if(!isWasmInitialized) {
8766                         throw new Error("initializeWasm() must be awaited first!");
8767                 }
8768                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
8769                 return decodeArray(nativeResponseValue);
8770         }
8771         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8772         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
8773                 if(!isWasmInitialized) {
8774                         throw new Error("initializeWasm() must be awaited first!");
8775                 }
8776                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
8777                 // debug statements here
8778         }
8779         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8780         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
8781                 if(!isWasmInitialized) {
8782                         throw new Error("initializeWasm() must be awaited first!");
8783                 }
8784                 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
8785                 return decodeArray(nativeResponseValue);
8786         }
8787         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8788         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8789                 if(!isWasmInitialized) {
8790                         throw new Error("initializeWasm() must be awaited first!");
8791                 }
8792                 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
8793                 // debug statements here
8794         }
8795         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
8796         export function AcceptChannel_clone(orig: number): number {
8797                 if(!isWasmInitialized) {
8798                         throw new Error("initializeWasm() must be awaited first!");
8799                 }
8800                 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
8801                 return nativeResponseValue;
8802         }
8803         // void FundingCreated_free(struct LDKFundingCreated this_obj);
8804         export function FundingCreated_free(this_obj: number): void {
8805                 if(!isWasmInitialized) {
8806                         throw new Error("initializeWasm() must be awaited first!");
8807                 }
8808                 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
8809                 // debug statements here
8810         }
8811         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
8812         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
8813                 if(!isWasmInitialized) {
8814                         throw new Error("initializeWasm() must be awaited first!");
8815                 }
8816                 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
8817                 return decodeArray(nativeResponseValue);
8818         }
8819         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8820         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
8821                 if(!isWasmInitialized) {
8822                         throw new Error("initializeWasm() must be awaited first!");
8823                 }
8824                 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
8825                 // debug statements here
8826         }
8827         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
8828         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
8829                 if(!isWasmInitialized) {
8830                         throw new Error("initializeWasm() must be awaited first!");
8831                 }
8832                 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
8833                 return decodeArray(nativeResponseValue);
8834         }
8835         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8836         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
8837                 if(!isWasmInitialized) {
8838                         throw new Error("initializeWasm() must be awaited first!");
8839                 }
8840                 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
8841                 // debug statements here
8842         }
8843         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
8844         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
8845                 if(!isWasmInitialized) {
8846                         throw new Error("initializeWasm() must be awaited first!");
8847                 }
8848                 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
8849                 return nativeResponseValue;
8850         }
8851         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
8852         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
8853                 if(!isWasmInitialized) {
8854                         throw new Error("initializeWasm() must be awaited first!");
8855                 }
8856                 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
8857                 // debug statements here
8858         }
8859         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
8860         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
8861                 if(!isWasmInitialized) {
8862                         throw new Error("initializeWasm() must be awaited first!");
8863                 }
8864                 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
8865                 return decodeArray(nativeResponseValue);
8866         }
8867         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
8868         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
8869                 if(!isWasmInitialized) {
8870                         throw new Error("initializeWasm() must be awaited first!");
8871                 }
8872                 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
8873                 // debug statements here
8874         }
8875         // 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);
8876         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
8877                 if(!isWasmInitialized) {
8878                         throw new Error("initializeWasm() must be awaited first!");
8879                 }
8880                 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
8881                 return nativeResponseValue;
8882         }
8883         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
8884         export function FundingCreated_clone(orig: number): number {
8885                 if(!isWasmInitialized) {
8886                         throw new Error("initializeWasm() must be awaited first!");
8887                 }
8888                 const nativeResponseValue = wasm.FundingCreated_clone(orig);
8889                 return nativeResponseValue;
8890         }
8891         // void FundingSigned_free(struct LDKFundingSigned this_obj);
8892         export function FundingSigned_free(this_obj: number): void {
8893                 if(!isWasmInitialized) {
8894                         throw new Error("initializeWasm() must be awaited first!");
8895                 }
8896                 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
8897                 // debug statements here
8898         }
8899         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
8900         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
8901                 if(!isWasmInitialized) {
8902                         throw new Error("initializeWasm() must be awaited first!");
8903                 }
8904                 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
8905                 return decodeArray(nativeResponseValue);
8906         }
8907         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8908         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
8909                 if(!isWasmInitialized) {
8910                         throw new Error("initializeWasm() must be awaited first!");
8911                 }
8912                 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
8913                 // debug statements here
8914         }
8915         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
8916         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
8917                 if(!isWasmInitialized) {
8918                         throw new Error("initializeWasm() must be awaited first!");
8919                 }
8920                 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
8921                 return decodeArray(nativeResponseValue);
8922         }
8923         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
8924         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
8925                 if(!isWasmInitialized) {
8926                         throw new Error("initializeWasm() must be awaited first!");
8927                 }
8928                 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
8929                 // debug statements here
8930         }
8931         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
8932         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
8933                 if(!isWasmInitialized) {
8934                         throw new Error("initializeWasm() must be awaited first!");
8935                 }
8936                 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
8937                 return nativeResponseValue;
8938         }
8939         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
8940         export function FundingSigned_clone(orig: number): number {
8941                 if(!isWasmInitialized) {
8942                         throw new Error("initializeWasm() must be awaited first!");
8943                 }
8944                 const nativeResponseValue = wasm.FundingSigned_clone(orig);
8945                 return nativeResponseValue;
8946         }
8947         // void FundingLocked_free(struct LDKFundingLocked this_obj);
8948         export function FundingLocked_free(this_obj: number): void {
8949                 if(!isWasmInitialized) {
8950                         throw new Error("initializeWasm() must be awaited first!");
8951                 }
8952                 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
8953                 // debug statements here
8954         }
8955         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
8956         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
8957                 if(!isWasmInitialized) {
8958                         throw new Error("initializeWasm() must be awaited first!");
8959                 }
8960                 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
8961                 return decodeArray(nativeResponseValue);
8962         }
8963         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8964         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
8965                 if(!isWasmInitialized) {
8966                         throw new Error("initializeWasm() must be awaited first!");
8967                 }
8968                 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
8969                 // debug statements here
8970         }
8971         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
8972         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
8973                 if(!isWasmInitialized) {
8974                         throw new Error("initializeWasm() must be awaited first!");
8975                 }
8976                 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
8977                 return decodeArray(nativeResponseValue);
8978         }
8979         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8980         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8981                 if(!isWasmInitialized) {
8982                         throw new Error("initializeWasm() must be awaited first!");
8983                 }
8984                 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
8985                 // debug statements here
8986         }
8987         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
8988         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
8989                 if(!isWasmInitialized) {
8990                         throw new Error("initializeWasm() must be awaited first!");
8991                 }
8992                 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
8993                 return nativeResponseValue;
8994         }
8995         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
8996         export function FundingLocked_clone(orig: number): number {
8997                 if(!isWasmInitialized) {
8998                         throw new Error("initializeWasm() must be awaited first!");
8999                 }
9000                 const nativeResponseValue = wasm.FundingLocked_clone(orig);
9001                 return nativeResponseValue;
9002         }
9003         // void Shutdown_free(struct LDKShutdown this_obj);
9004         export function Shutdown_free(this_obj: number): void {
9005                 if(!isWasmInitialized) {
9006                         throw new Error("initializeWasm() must be awaited first!");
9007                 }
9008                 const nativeResponseValue = wasm.Shutdown_free(this_obj);
9009                 // debug statements here
9010         }
9011         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
9012         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
9013                 if(!isWasmInitialized) {
9014                         throw new Error("initializeWasm() must be awaited first!");
9015                 }
9016                 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
9017                 return decodeArray(nativeResponseValue);
9018         }
9019         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9020         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
9021                 if(!isWasmInitialized) {
9022                         throw new Error("initializeWasm() must be awaited first!");
9023                 }
9024                 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
9025                 // debug statements here
9026         }
9027         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
9028         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
9029                 if(!isWasmInitialized) {
9030                         throw new Error("initializeWasm() must be awaited first!");
9031                 }
9032                 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
9033                 return decodeArray(nativeResponseValue);
9034         }
9035         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
9036         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
9037                 if(!isWasmInitialized) {
9038                         throw new Error("initializeWasm() must be awaited first!");
9039                 }
9040                 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
9041                 // debug statements here
9042         }
9043         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
9044         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
9045                 if(!isWasmInitialized) {
9046                         throw new Error("initializeWasm() must be awaited first!");
9047                 }
9048                 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
9049                 return nativeResponseValue;
9050         }
9051         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
9052         export function Shutdown_clone(orig: number): number {
9053                 if(!isWasmInitialized) {
9054                         throw new Error("initializeWasm() must be awaited first!");
9055                 }
9056                 const nativeResponseValue = wasm.Shutdown_clone(orig);
9057                 return nativeResponseValue;
9058         }
9059         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
9060         export function ClosingSigned_free(this_obj: number): void {
9061                 if(!isWasmInitialized) {
9062                         throw new Error("initializeWasm() must be awaited first!");
9063                 }
9064                 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
9065                 // debug statements here
9066         }
9067         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
9068         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
9069                 if(!isWasmInitialized) {
9070                         throw new Error("initializeWasm() must be awaited first!");
9071                 }
9072                 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
9073                 return decodeArray(nativeResponseValue);
9074         }
9075         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9076         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
9077                 if(!isWasmInitialized) {
9078                         throw new Error("initializeWasm() must be awaited first!");
9079                 }
9080                 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
9081                 // debug statements here
9082         }
9083         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
9084         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
9085                 if(!isWasmInitialized) {
9086                         throw new Error("initializeWasm() must be awaited first!");
9087                 }
9088                 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
9089                 return nativeResponseValue;
9090         }
9091         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
9092         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
9093                 if(!isWasmInitialized) {
9094                         throw new Error("initializeWasm() must be awaited first!");
9095                 }
9096                 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
9097                 // debug statements here
9098         }
9099         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
9100         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
9101                 if(!isWasmInitialized) {
9102                         throw new Error("initializeWasm() must be awaited first!");
9103                 }
9104                 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
9105                 return decodeArray(nativeResponseValue);
9106         }
9107         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
9108         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
9109                 if(!isWasmInitialized) {
9110                         throw new Error("initializeWasm() must be awaited first!");
9111                 }
9112                 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
9113                 // debug statements here
9114         }
9115         // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
9116         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
9117                 if(!isWasmInitialized) {
9118                         throw new Error("initializeWasm() must be awaited first!");
9119                 }
9120                 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
9121                 return nativeResponseValue;
9122         }
9123         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
9124         export function ClosingSigned_clone(orig: number): number {
9125                 if(!isWasmInitialized) {
9126                         throw new Error("initializeWasm() must be awaited first!");
9127                 }
9128                 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
9129                 return nativeResponseValue;
9130         }
9131         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
9132         export function UpdateAddHTLC_free(this_obj: number): void {
9133                 if(!isWasmInitialized) {
9134                         throw new Error("initializeWasm() must be awaited first!");
9135                 }
9136                 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
9137                 // debug statements here
9138         }
9139         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
9140         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
9141                 if(!isWasmInitialized) {
9142                         throw new Error("initializeWasm() must be awaited first!");
9143                 }
9144                 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
9145                 return decodeArray(nativeResponseValue);
9146         }
9147         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9148         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9149                 if(!isWasmInitialized) {
9150                         throw new Error("initializeWasm() must be awaited first!");
9151                 }
9152                 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
9153                 // debug statements here
9154         }
9155         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
9156         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
9157                 if(!isWasmInitialized) {
9158                         throw new Error("initializeWasm() must be awaited first!");
9159                 }
9160                 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
9161                 return nativeResponseValue;
9162         }
9163         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
9164         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
9165                 if(!isWasmInitialized) {
9166                         throw new Error("initializeWasm() must be awaited first!");
9167                 }
9168                 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
9169                 // debug statements here
9170         }
9171         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
9172         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
9173                 if(!isWasmInitialized) {
9174                         throw new Error("initializeWasm() must be awaited first!");
9175                 }
9176                 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
9177                 return nativeResponseValue;
9178         }
9179         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
9180         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
9181                 if(!isWasmInitialized) {
9182                         throw new Error("initializeWasm() must be awaited first!");
9183                 }
9184                 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
9185                 // debug statements here
9186         }
9187         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
9188         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
9189                 if(!isWasmInitialized) {
9190                         throw new Error("initializeWasm() must be awaited first!");
9191                 }
9192                 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
9193                 return decodeArray(nativeResponseValue);
9194         }
9195         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9196         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
9197                 if(!isWasmInitialized) {
9198                         throw new Error("initializeWasm() must be awaited first!");
9199                 }
9200                 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
9201                 // debug statements here
9202         }
9203         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
9204         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
9205                 if(!isWasmInitialized) {
9206                         throw new Error("initializeWasm() must be awaited first!");
9207                 }
9208                 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
9209                 return nativeResponseValue;
9210         }
9211         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
9212         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
9213                 if(!isWasmInitialized) {
9214                         throw new Error("initializeWasm() must be awaited first!");
9215                 }
9216                 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
9217                 // debug statements here
9218         }
9219         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
9220         export function UpdateAddHTLC_clone(orig: number): number {
9221                 if(!isWasmInitialized) {
9222                         throw new Error("initializeWasm() must be awaited first!");
9223                 }
9224                 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
9225                 return nativeResponseValue;
9226         }
9227         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
9228         export function UpdateFulfillHTLC_free(this_obj: number): void {
9229                 if(!isWasmInitialized) {
9230                         throw new Error("initializeWasm() must be awaited first!");
9231                 }
9232                 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
9233                 // debug statements here
9234         }
9235         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
9236         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
9237                 if(!isWasmInitialized) {
9238                         throw new Error("initializeWasm() must be awaited first!");
9239                 }
9240                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
9241                 return decodeArray(nativeResponseValue);
9242         }
9243         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9244         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9245                 if(!isWasmInitialized) {
9246                         throw new Error("initializeWasm() must be awaited first!");
9247                 }
9248                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
9249                 // debug statements here
9250         }
9251         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
9252         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
9253                 if(!isWasmInitialized) {
9254                         throw new Error("initializeWasm() must be awaited first!");
9255                 }
9256                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
9257                 return nativeResponseValue;
9258         }
9259         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
9260         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
9261                 if(!isWasmInitialized) {
9262                         throw new Error("initializeWasm() must be awaited first!");
9263                 }
9264                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
9265                 // debug statements here
9266         }
9267         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
9268         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
9269                 if(!isWasmInitialized) {
9270                         throw new Error("initializeWasm() must be awaited first!");
9271                 }
9272                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
9273                 return decodeArray(nativeResponseValue);
9274         }
9275         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9276         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
9277                 if(!isWasmInitialized) {
9278                         throw new Error("initializeWasm() must be awaited first!");
9279                 }
9280                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
9281                 // debug statements here
9282         }
9283         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
9284         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
9285                 if(!isWasmInitialized) {
9286                         throw new Error("initializeWasm() must be awaited first!");
9287                 }
9288                 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
9289                 return nativeResponseValue;
9290         }
9291         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
9292         export function UpdateFulfillHTLC_clone(orig: number): number {
9293                 if(!isWasmInitialized) {
9294                         throw new Error("initializeWasm() must be awaited first!");
9295                 }
9296                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
9297                 return nativeResponseValue;
9298         }
9299         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
9300         export function UpdateFailHTLC_free(this_obj: number): void {
9301                 if(!isWasmInitialized) {
9302                         throw new Error("initializeWasm() must be awaited first!");
9303                 }
9304                 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
9305                 // debug statements here
9306         }
9307         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
9308         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
9309                 if(!isWasmInitialized) {
9310                         throw new Error("initializeWasm() must be awaited first!");
9311                 }
9312                 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
9313                 return decodeArray(nativeResponseValue);
9314         }
9315         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9316         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9317                 if(!isWasmInitialized) {
9318                         throw new Error("initializeWasm() must be awaited first!");
9319                 }
9320                 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
9321                 // debug statements here
9322         }
9323         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
9324         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
9325                 if(!isWasmInitialized) {
9326                         throw new Error("initializeWasm() must be awaited first!");
9327                 }
9328                 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
9329                 return nativeResponseValue;
9330         }
9331         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
9332         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
9333                 if(!isWasmInitialized) {
9334                         throw new Error("initializeWasm() must be awaited first!");
9335                 }
9336                 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
9337                 // debug statements here
9338         }
9339         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
9340         export function UpdateFailHTLC_clone(orig: number): number {
9341                 if(!isWasmInitialized) {
9342                         throw new Error("initializeWasm() must be awaited first!");
9343                 }
9344                 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
9345                 return nativeResponseValue;
9346         }
9347         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
9348         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
9349                 if(!isWasmInitialized) {
9350                         throw new Error("initializeWasm() must be awaited first!");
9351                 }
9352                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
9353                 // debug statements here
9354         }
9355         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
9356         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
9357                 if(!isWasmInitialized) {
9358                         throw new Error("initializeWasm() must be awaited first!");
9359                 }
9360                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
9361                 return decodeArray(nativeResponseValue);
9362         }
9363         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9364         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9365                 if(!isWasmInitialized) {
9366                         throw new Error("initializeWasm() must be awaited first!");
9367                 }
9368                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
9369                 // debug statements here
9370         }
9371         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
9372         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
9373                 if(!isWasmInitialized) {
9374                         throw new Error("initializeWasm() must be awaited first!");
9375                 }
9376                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
9377                 return nativeResponseValue;
9378         }
9379         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
9380         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
9381                 if(!isWasmInitialized) {
9382                         throw new Error("initializeWasm() must be awaited first!");
9383                 }
9384                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
9385                 // debug statements here
9386         }
9387         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
9388         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
9389                 if(!isWasmInitialized) {
9390                         throw new Error("initializeWasm() must be awaited first!");
9391                 }
9392                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
9393                 return nativeResponseValue;
9394         }
9395         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
9396         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
9397                 if(!isWasmInitialized) {
9398                         throw new Error("initializeWasm() must be awaited first!");
9399                 }
9400                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
9401                 // debug statements here
9402         }
9403         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
9404         export function UpdateFailMalformedHTLC_clone(orig: number): number {
9405                 if(!isWasmInitialized) {
9406                         throw new Error("initializeWasm() must be awaited first!");
9407                 }
9408                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
9409                 return nativeResponseValue;
9410         }
9411         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
9412         export function CommitmentSigned_free(this_obj: number): void {
9413                 if(!isWasmInitialized) {
9414                         throw new Error("initializeWasm() must be awaited first!");
9415                 }
9416                 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
9417                 // debug statements here
9418         }
9419         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
9420         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
9421                 if(!isWasmInitialized) {
9422                         throw new Error("initializeWasm() must be awaited first!");
9423                 }
9424                 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
9425                 return decodeArray(nativeResponseValue);
9426         }
9427         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9428         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
9429                 if(!isWasmInitialized) {
9430                         throw new Error("initializeWasm() must be awaited first!");
9431                 }
9432                 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
9433                 // debug statements here
9434         }
9435         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
9436         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
9437                 if(!isWasmInitialized) {
9438                         throw new Error("initializeWasm() must be awaited first!");
9439                 }
9440                 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
9441                 return decodeArray(nativeResponseValue);
9442         }
9443         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
9444         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
9445                 if(!isWasmInitialized) {
9446                         throw new Error("initializeWasm() must be awaited first!");
9447                 }
9448                 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
9449                 // debug statements here
9450         }
9451         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
9452         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
9453                 if(!isWasmInitialized) {
9454                         throw new Error("initializeWasm() must be awaited first!");
9455                 }
9456                 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
9457                 // debug statements here
9458         }
9459         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
9460         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
9461                 if(!isWasmInitialized) {
9462                         throw new Error("initializeWasm() must be awaited first!");
9463                 }
9464                 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
9465                 return nativeResponseValue;
9466         }
9467         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
9468         export function CommitmentSigned_clone(orig: number): number {
9469                 if(!isWasmInitialized) {
9470                         throw new Error("initializeWasm() must be awaited first!");
9471                 }
9472                 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
9473                 return nativeResponseValue;
9474         }
9475         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
9476         export function RevokeAndACK_free(this_obj: number): void {
9477                 if(!isWasmInitialized) {
9478                         throw new Error("initializeWasm() must be awaited first!");
9479                 }
9480                 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
9481                 // debug statements here
9482         }
9483         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
9484         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
9485                 if(!isWasmInitialized) {
9486                         throw new Error("initializeWasm() must be awaited first!");
9487                 }
9488                 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
9489                 return decodeArray(nativeResponseValue);
9490         }
9491         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9492         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
9493                 if(!isWasmInitialized) {
9494                         throw new Error("initializeWasm() must be awaited first!");
9495                 }
9496                 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
9497                 // debug statements here
9498         }
9499         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
9500         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
9501                 if(!isWasmInitialized) {
9502                         throw new Error("initializeWasm() must be awaited first!");
9503                 }
9504                 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
9505                 return decodeArray(nativeResponseValue);
9506         }
9507         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9508         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
9509                 if(!isWasmInitialized) {
9510                         throw new Error("initializeWasm() must be awaited first!");
9511                 }
9512                 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
9513                 // debug statements here
9514         }
9515         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
9516         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
9517                 if(!isWasmInitialized) {
9518                         throw new Error("initializeWasm() must be awaited first!");
9519                 }
9520                 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
9521                 return decodeArray(nativeResponseValue);
9522         }
9523         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9524         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9525                 if(!isWasmInitialized) {
9526                         throw new Error("initializeWasm() must be awaited first!");
9527                 }
9528                 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
9529                 // debug statements here
9530         }
9531         // 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);
9532         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
9533                 if(!isWasmInitialized) {
9534                         throw new Error("initializeWasm() must be awaited first!");
9535                 }
9536                 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
9537                 return nativeResponseValue;
9538         }
9539         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
9540         export function RevokeAndACK_clone(orig: number): number {
9541                 if(!isWasmInitialized) {
9542                         throw new Error("initializeWasm() must be awaited first!");
9543                 }
9544                 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
9545                 return nativeResponseValue;
9546         }
9547         // void UpdateFee_free(struct LDKUpdateFee this_obj);
9548         export function UpdateFee_free(this_obj: number): void {
9549                 if(!isWasmInitialized) {
9550                         throw new Error("initializeWasm() must be awaited first!");
9551                 }
9552                 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
9553                 // debug statements here
9554         }
9555         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
9556         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
9557                 if(!isWasmInitialized) {
9558                         throw new Error("initializeWasm() must be awaited first!");
9559                 }
9560                 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
9561                 return decodeArray(nativeResponseValue);
9562         }
9563         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9564         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
9565                 if(!isWasmInitialized) {
9566                         throw new Error("initializeWasm() must be awaited first!");
9567                 }
9568                 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
9569                 // debug statements here
9570         }
9571         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
9572         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
9573                 if(!isWasmInitialized) {
9574                         throw new Error("initializeWasm() must be awaited first!");
9575                 }
9576                 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
9577                 return nativeResponseValue;
9578         }
9579         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
9580         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
9581                 if(!isWasmInitialized) {
9582                         throw new Error("initializeWasm() must be awaited first!");
9583                 }
9584                 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
9585                 // debug statements here
9586         }
9587         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
9588         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
9589                 if(!isWasmInitialized) {
9590                         throw new Error("initializeWasm() must be awaited first!");
9591                 }
9592                 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
9593                 return nativeResponseValue;
9594         }
9595         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
9596         export function UpdateFee_clone(orig: number): number {
9597                 if(!isWasmInitialized) {
9598                         throw new Error("initializeWasm() must be awaited first!");
9599                 }
9600                 const nativeResponseValue = wasm.UpdateFee_clone(orig);
9601                 return nativeResponseValue;
9602         }
9603         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
9604         export function DataLossProtect_free(this_obj: number): void {
9605                 if(!isWasmInitialized) {
9606                         throw new Error("initializeWasm() must be awaited first!");
9607                 }
9608                 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
9609                 // debug statements here
9610         }
9611         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
9612         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
9613                 if(!isWasmInitialized) {
9614                         throw new Error("initializeWasm() must be awaited first!");
9615                 }
9616                 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
9617                 return decodeArray(nativeResponseValue);
9618         }
9619         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9620         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
9621                 if(!isWasmInitialized) {
9622                         throw new Error("initializeWasm() must be awaited first!");
9623                 }
9624                 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
9625                 // debug statements here
9626         }
9627         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
9628         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
9629                 if(!isWasmInitialized) {
9630                         throw new Error("initializeWasm() must be awaited first!");
9631                 }
9632                 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
9633                 return decodeArray(nativeResponseValue);
9634         }
9635         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9636         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9637                 if(!isWasmInitialized) {
9638                         throw new Error("initializeWasm() must be awaited first!");
9639                 }
9640                 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
9641                 // debug statements here
9642         }
9643         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
9644         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
9645                 if(!isWasmInitialized) {
9646                         throw new Error("initializeWasm() must be awaited first!");
9647                 }
9648                 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
9649                 return nativeResponseValue;
9650         }
9651         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
9652         export function DataLossProtect_clone(orig: number): number {
9653                 if(!isWasmInitialized) {
9654                         throw new Error("initializeWasm() must be awaited first!");
9655                 }
9656                 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
9657                 return nativeResponseValue;
9658         }
9659         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
9660         export function ChannelReestablish_free(this_obj: number): void {
9661                 if(!isWasmInitialized) {
9662                         throw new Error("initializeWasm() must be awaited first!");
9663                 }
9664                 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
9665                 // debug statements here
9666         }
9667         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
9668         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
9669                 if(!isWasmInitialized) {
9670                         throw new Error("initializeWasm() must be awaited first!");
9671                 }
9672                 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
9673                 return decodeArray(nativeResponseValue);
9674         }
9675         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9676         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
9677                 if(!isWasmInitialized) {
9678                         throw new Error("initializeWasm() must be awaited first!");
9679                 }
9680                 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
9681                 // debug statements here
9682         }
9683         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
9684         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
9685                 if(!isWasmInitialized) {
9686                         throw new Error("initializeWasm() must be awaited first!");
9687                 }
9688                 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
9689                 return nativeResponseValue;
9690         }
9691         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
9692         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
9693                 if(!isWasmInitialized) {
9694                         throw new Error("initializeWasm() must be awaited first!");
9695                 }
9696                 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
9697                 // debug statements here
9698         }
9699         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
9700         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
9701                 if(!isWasmInitialized) {
9702                         throw new Error("initializeWasm() must be awaited first!");
9703                 }
9704                 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
9705                 return nativeResponseValue;
9706         }
9707         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
9708         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
9709                 if(!isWasmInitialized) {
9710                         throw new Error("initializeWasm() must be awaited first!");
9711                 }
9712                 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
9713                 // debug statements here
9714         }
9715         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
9716         export function ChannelReestablish_clone(orig: number): number {
9717                 if(!isWasmInitialized) {
9718                         throw new Error("initializeWasm() must be awaited first!");
9719                 }
9720                 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
9721                 return nativeResponseValue;
9722         }
9723         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
9724         export function AnnouncementSignatures_free(this_obj: number): void {
9725                 if(!isWasmInitialized) {
9726                         throw new Error("initializeWasm() must be awaited first!");
9727                 }
9728                 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
9729                 // debug statements here
9730         }
9731         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
9732         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
9733                 if(!isWasmInitialized) {
9734                         throw new Error("initializeWasm() must be awaited first!");
9735                 }
9736                 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
9737                 return decodeArray(nativeResponseValue);
9738         }
9739         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9740         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
9741                 if(!isWasmInitialized) {
9742                         throw new Error("initializeWasm() must be awaited first!");
9743                 }
9744                 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
9745                 // debug statements here
9746         }
9747         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
9748         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
9749                 if(!isWasmInitialized) {
9750                         throw new Error("initializeWasm() must be awaited first!");
9751                 }
9752                 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
9753                 return nativeResponseValue;
9754         }
9755         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
9756         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
9757                 if(!isWasmInitialized) {
9758                         throw new Error("initializeWasm() must be awaited first!");
9759                 }
9760                 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
9761                 // debug statements here
9762         }
9763         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
9764         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
9765                 if(!isWasmInitialized) {
9766                         throw new Error("initializeWasm() must be awaited first!");
9767                 }
9768                 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
9769                 return decodeArray(nativeResponseValue);
9770         }
9771         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
9772         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
9773                 if(!isWasmInitialized) {
9774                         throw new Error("initializeWasm() must be awaited first!");
9775                 }
9776                 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
9777                 // debug statements here
9778         }
9779         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
9780         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
9781                 if(!isWasmInitialized) {
9782                         throw new Error("initializeWasm() must be awaited first!");
9783                 }
9784                 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
9785                 return decodeArray(nativeResponseValue);
9786         }
9787         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
9788         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
9789                 if(!isWasmInitialized) {
9790                         throw new Error("initializeWasm() must be awaited first!");
9791                 }
9792                 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
9793                 // debug statements here
9794         }
9795         // 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);
9796         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
9797                 if(!isWasmInitialized) {
9798                         throw new Error("initializeWasm() must be awaited first!");
9799                 }
9800                 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
9801                 return nativeResponseValue;
9802         }
9803         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
9804         export function AnnouncementSignatures_clone(orig: number): number {
9805                 if(!isWasmInitialized) {
9806                         throw new Error("initializeWasm() must be awaited first!");
9807                 }
9808                 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
9809                 return nativeResponseValue;
9810         }
9811         // void NetAddress_free(struct LDKNetAddress this_ptr);
9812         export function NetAddress_free(this_ptr: number): void {
9813                 if(!isWasmInitialized) {
9814                         throw new Error("initializeWasm() must be awaited first!");
9815                 }
9816                 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
9817                 // debug statements here
9818         }
9819         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
9820         export function NetAddress_clone(orig: number): number {
9821                 if(!isWasmInitialized) {
9822                         throw new Error("initializeWasm() must be awaited first!");
9823                 }
9824                 const nativeResponseValue = wasm.NetAddress_clone(orig);
9825                 return nativeResponseValue;
9826         }
9827         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
9828         export function NetAddress_write(obj: number): Uint8Array {
9829                 if(!isWasmInitialized) {
9830                         throw new Error("initializeWasm() must be awaited first!");
9831                 }
9832                 const nativeResponseValue = wasm.NetAddress_write(obj);
9833                 return decodeArray(nativeResponseValue);
9834         }
9835         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
9836         export function Result_read(ser: Uint8Array): number {
9837                 if(!isWasmInitialized) {
9838                         throw new Error("initializeWasm() must be awaited first!");
9839                 }
9840                 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
9841                 return nativeResponseValue;
9842         }
9843         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
9844         export function NetAddress_read(ser: Uint8Array): number {
9845                 if(!isWasmInitialized) {
9846                         throw new Error("initializeWasm() must be awaited first!");
9847                 }
9848                 const nativeResponseValue = wasm.NetAddress_read(encodeArray(ser));
9849                 return nativeResponseValue;
9850         }
9851         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
9852         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
9853                 if(!isWasmInitialized) {
9854                         throw new Error("initializeWasm() must be awaited first!");
9855                 }
9856                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
9857                 // debug statements here
9858         }
9859         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
9860         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
9861                 if(!isWasmInitialized) {
9862                         throw new Error("initializeWasm() must be awaited first!");
9863                 }
9864                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
9865                 return nativeResponseValue;
9866         }
9867         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
9868         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
9869                 if(!isWasmInitialized) {
9870                         throw new Error("initializeWasm() must be awaited first!");
9871                 }
9872                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
9873                 // debug statements here
9874         }
9875         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
9876         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
9877                 if(!isWasmInitialized) {
9878                         throw new Error("initializeWasm() must be awaited first!");
9879                 }
9880                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
9881                 return nativeResponseValue;
9882         }
9883         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
9884         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
9885                 if(!isWasmInitialized) {
9886                         throw new Error("initializeWasm() must be awaited first!");
9887                 }
9888                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
9889                 // debug statements here
9890         }
9891         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
9892         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
9893                 if(!isWasmInitialized) {
9894                         throw new Error("initializeWasm() must be awaited first!");
9895                 }
9896                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
9897                 return decodeArray(nativeResponseValue);
9898         }
9899         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9900         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
9901                 if(!isWasmInitialized) {
9902                         throw new Error("initializeWasm() must be awaited first!");
9903                 }
9904                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
9905                 // debug statements here
9906         }
9907         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
9908         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
9909                 if(!isWasmInitialized) {
9910                         throw new Error("initializeWasm() must be awaited first!");
9911                 }
9912                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
9913                 return decodeArray(nativeResponseValue);
9914         }
9915         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
9916         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
9917                 if(!isWasmInitialized) {
9918                         throw new Error("initializeWasm() must be awaited first!");
9919                 }
9920                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
9921                 // debug statements here
9922         }
9923         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
9924         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
9925                 if(!isWasmInitialized) {
9926                         throw new Error("initializeWasm() must be awaited first!");
9927                 }
9928                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
9929                 return decodeArray(nativeResponseValue);
9930         }
9931         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9932         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
9933                 if(!isWasmInitialized) {
9934                         throw new Error("initializeWasm() must be awaited first!");
9935                 }
9936                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
9937                 // debug statements here
9938         }
9939         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
9940         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
9941                 if(!isWasmInitialized) {
9942                         throw new Error("initializeWasm() must be awaited first!");
9943                 }
9944                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
9945                 // debug statements here
9946         }
9947         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
9948         export function UnsignedNodeAnnouncement_clone(orig: number): number {
9949                 if(!isWasmInitialized) {
9950                         throw new Error("initializeWasm() must be awaited first!");
9951                 }
9952                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
9953                 return nativeResponseValue;
9954         }
9955         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
9956         export function NodeAnnouncement_free(this_obj: number): void {
9957                 if(!isWasmInitialized) {
9958                         throw new Error("initializeWasm() must be awaited first!");
9959                 }
9960                 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
9961                 // debug statements here
9962         }
9963         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
9964         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
9965                 if(!isWasmInitialized) {
9966                         throw new Error("initializeWasm() must be awaited first!");
9967                 }
9968                 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
9969                 return decodeArray(nativeResponseValue);
9970         }
9971         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
9972         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
9973                 if(!isWasmInitialized) {
9974                         throw new Error("initializeWasm() must be awaited first!");
9975                 }
9976                 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
9977                 // debug statements here
9978         }
9979         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
9980         export function NodeAnnouncement_get_contents(this_ptr: number): number {
9981                 if(!isWasmInitialized) {
9982                         throw new Error("initializeWasm() must be awaited first!");
9983                 }
9984                 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
9985                 return nativeResponseValue;
9986         }
9987         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
9988         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
9989                 if(!isWasmInitialized) {
9990                         throw new Error("initializeWasm() must be awaited first!");
9991                 }
9992                 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
9993                 // debug statements here
9994         }
9995         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
9996         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
9997                 if(!isWasmInitialized) {
9998                         throw new Error("initializeWasm() must be awaited first!");
9999                 }
10000                 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
10001                 return nativeResponseValue;
10002         }
10003         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
10004         export function NodeAnnouncement_clone(orig: number): number {
10005                 if(!isWasmInitialized) {
10006                         throw new Error("initializeWasm() must be awaited first!");
10007                 }
10008                 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
10009                 return nativeResponseValue;
10010         }
10011         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
10012         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
10013                 if(!isWasmInitialized) {
10014                         throw new Error("initializeWasm() must be awaited first!");
10015                 }
10016                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
10017                 // debug statements here
10018         }
10019         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10020         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
10021                 if(!isWasmInitialized) {
10022                         throw new Error("initializeWasm() must be awaited first!");
10023                 }
10024                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
10025                 return nativeResponseValue;
10026         }
10027         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
10028         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
10029                 if(!isWasmInitialized) {
10030                         throw new Error("initializeWasm() must be awaited first!");
10031                 }
10032                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
10033                 // debug statements here
10034         }
10035         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
10036         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
10037                 if(!isWasmInitialized) {
10038                         throw new Error("initializeWasm() must be awaited first!");
10039                 }
10040                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
10041                 return decodeArray(nativeResponseValue);
10042         }
10043         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10044         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10045                 if(!isWasmInitialized) {
10046                         throw new Error("initializeWasm() must be awaited first!");
10047                 }
10048                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
10049                 // debug statements here
10050         }
10051         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10052         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
10053                 if(!isWasmInitialized) {
10054                         throw new Error("initializeWasm() must be awaited first!");
10055                 }
10056                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
10057                 return nativeResponseValue;
10058         }
10059         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
10060         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
10061                 if(!isWasmInitialized) {
10062                         throw new Error("initializeWasm() must be awaited first!");
10063                 }
10064                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
10065                 // debug statements here
10066         }
10067         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10068         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
10069                 if(!isWasmInitialized) {
10070                         throw new Error("initializeWasm() must be awaited first!");
10071                 }
10072                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
10073                 return decodeArray(nativeResponseValue);
10074         }
10075         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10076         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
10077                 if(!isWasmInitialized) {
10078                         throw new Error("initializeWasm() must be awaited first!");
10079                 }
10080                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
10081                 // debug statements here
10082         }
10083         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10084         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
10085                 if(!isWasmInitialized) {
10086                         throw new Error("initializeWasm() must be awaited first!");
10087                 }
10088                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
10089                 return decodeArray(nativeResponseValue);
10090         }
10091         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10092         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
10093                 if(!isWasmInitialized) {
10094                         throw new Error("initializeWasm() must be awaited first!");
10095                 }
10096                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
10097                 // debug statements here
10098         }
10099         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10100         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
10101                 if(!isWasmInitialized) {
10102                         throw new Error("initializeWasm() must be awaited first!");
10103                 }
10104                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
10105                 return decodeArray(nativeResponseValue);
10106         }
10107         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10108         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
10109                 if(!isWasmInitialized) {
10110                         throw new Error("initializeWasm() must be awaited first!");
10111                 }
10112                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
10113                 // debug statements here
10114         }
10115         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10116         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
10117                 if(!isWasmInitialized) {
10118                         throw new Error("initializeWasm() must be awaited first!");
10119                 }
10120                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
10121                 return decodeArray(nativeResponseValue);
10122         }
10123         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10124         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
10125                 if(!isWasmInitialized) {
10126                         throw new Error("initializeWasm() must be awaited first!");
10127                 }
10128                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
10129                 // debug statements here
10130         }
10131         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
10132         export function UnsignedChannelAnnouncement_clone(orig: number): number {
10133                 if(!isWasmInitialized) {
10134                         throw new Error("initializeWasm() must be awaited first!");
10135                 }
10136                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
10137                 return nativeResponseValue;
10138         }
10139         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
10140         export function ChannelAnnouncement_free(this_obj: number): void {
10141                 if(!isWasmInitialized) {
10142                         throw new Error("initializeWasm() must be awaited first!");
10143                 }
10144                 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
10145                 // debug statements here
10146         }
10147         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10148         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
10149                 if(!isWasmInitialized) {
10150                         throw new Error("initializeWasm() must be awaited first!");
10151                 }
10152                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
10153                 return decodeArray(nativeResponseValue);
10154         }
10155         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10156         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
10157                 if(!isWasmInitialized) {
10158                         throw new Error("initializeWasm() must be awaited first!");
10159                 }
10160                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
10161                 // debug statements here
10162         }
10163         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10164         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
10165                 if(!isWasmInitialized) {
10166                         throw new Error("initializeWasm() must be awaited first!");
10167                 }
10168                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
10169                 return decodeArray(nativeResponseValue);
10170         }
10171         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10172         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
10173                 if(!isWasmInitialized) {
10174                         throw new Error("initializeWasm() must be awaited first!");
10175                 }
10176                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
10177                 // debug statements here
10178         }
10179         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10180         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
10181                 if(!isWasmInitialized) {
10182                         throw new Error("initializeWasm() must be awaited first!");
10183                 }
10184                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
10185                 return decodeArray(nativeResponseValue);
10186         }
10187         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10188         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
10189                 if(!isWasmInitialized) {
10190                         throw new Error("initializeWasm() must be awaited first!");
10191                 }
10192                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
10193                 // debug statements here
10194         }
10195         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10196         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
10197                 if(!isWasmInitialized) {
10198                         throw new Error("initializeWasm() must be awaited first!");
10199                 }
10200                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
10201                 return decodeArray(nativeResponseValue);
10202         }
10203         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10204         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
10205                 if(!isWasmInitialized) {
10206                         throw new Error("initializeWasm() must be awaited first!");
10207                 }
10208                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
10209                 // debug statements here
10210         }
10211         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10212         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
10213                 if(!isWasmInitialized) {
10214                         throw new Error("initializeWasm() must be awaited first!");
10215                 }
10216                 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
10217                 return nativeResponseValue;
10218         }
10219         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
10220         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
10221                 if(!isWasmInitialized) {
10222                         throw new Error("initializeWasm() must be awaited first!");
10223                 }
10224                 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
10225                 // debug statements here
10226         }
10227         // 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);
10228         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 {
10229                 if(!isWasmInitialized) {
10230                         throw new Error("initializeWasm() must be awaited first!");
10231                 }
10232                 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);
10233                 return nativeResponseValue;
10234         }
10235         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
10236         export function ChannelAnnouncement_clone(orig: number): number {
10237                 if(!isWasmInitialized) {
10238                         throw new Error("initializeWasm() must be awaited first!");
10239                 }
10240                 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
10241                 return nativeResponseValue;
10242         }
10243         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
10244         export function UnsignedChannelUpdate_free(this_obj: number): void {
10245                 if(!isWasmInitialized) {
10246                         throw new Error("initializeWasm() must be awaited first!");
10247                 }
10248                 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
10249                 // debug statements here
10250         }
10251         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
10252         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
10253                 if(!isWasmInitialized) {
10254                         throw new Error("initializeWasm() must be awaited first!");
10255                 }
10256                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
10257                 return decodeArray(nativeResponseValue);
10258         }
10259         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10260         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10261                 if(!isWasmInitialized) {
10262                         throw new Error("initializeWasm() must be awaited first!");
10263                 }
10264                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
10265                 // debug statements here
10266         }
10267         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10268         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
10269                 if(!isWasmInitialized) {
10270                         throw new Error("initializeWasm() must be awaited first!");
10271                 }
10272                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
10273                 return nativeResponseValue;
10274         }
10275         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
10276         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
10277                 if(!isWasmInitialized) {
10278                         throw new Error("initializeWasm() must be awaited first!");
10279                 }
10280                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
10281                 // debug statements here
10282         }
10283         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10284         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
10285                 if(!isWasmInitialized) {
10286                         throw new Error("initializeWasm() must be awaited first!");
10287                 }
10288                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
10289                 return nativeResponseValue;
10290         }
10291         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
10292         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
10293                 if(!isWasmInitialized) {
10294                         throw new Error("initializeWasm() must be awaited first!");
10295                 }
10296                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
10297                 // debug statements here
10298         }
10299         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10300         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
10301                 if(!isWasmInitialized) {
10302                         throw new Error("initializeWasm() must be awaited first!");
10303                 }
10304                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
10305                 return nativeResponseValue;
10306         }
10307         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
10308         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
10309                 if(!isWasmInitialized) {
10310                         throw new Error("initializeWasm() must be awaited first!");
10311                 }
10312                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
10313                 // debug statements here
10314         }
10315         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10316         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
10317                 if(!isWasmInitialized) {
10318                         throw new Error("initializeWasm() must be awaited first!");
10319                 }
10320                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
10321                 return nativeResponseValue;
10322         }
10323         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
10324         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
10325                 if(!isWasmInitialized) {
10326                         throw new Error("initializeWasm() must be awaited first!");
10327                 }
10328                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
10329                 // debug statements here
10330         }
10331         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10332         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
10333                 if(!isWasmInitialized) {
10334                         throw new Error("initializeWasm() must be awaited first!");
10335                 }
10336                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
10337                 return nativeResponseValue;
10338         }
10339         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
10340         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
10341                 if(!isWasmInitialized) {
10342                         throw new Error("initializeWasm() must be awaited first!");
10343                 }
10344                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
10345                 // debug statements here
10346         }
10347         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10348         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
10349                 if(!isWasmInitialized) {
10350                         throw new Error("initializeWasm() must be awaited first!");
10351                 }
10352                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
10353                 return nativeResponseValue;
10354         }
10355         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
10356         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
10357                 if(!isWasmInitialized) {
10358                         throw new Error("initializeWasm() must be awaited first!");
10359                 }
10360                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
10361                 // debug statements here
10362         }
10363         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10364         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
10365                 if(!isWasmInitialized) {
10366                         throw new Error("initializeWasm() must be awaited first!");
10367                 }
10368                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
10369                 return nativeResponseValue;
10370         }
10371         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
10372         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
10373                 if(!isWasmInitialized) {
10374                         throw new Error("initializeWasm() must be awaited first!");
10375                 }
10376                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
10377                 // debug statements here
10378         }
10379         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
10380         export function UnsignedChannelUpdate_clone(orig: number): number {
10381                 if(!isWasmInitialized) {
10382                         throw new Error("initializeWasm() must be awaited first!");
10383                 }
10384                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
10385                 return nativeResponseValue;
10386         }
10387         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
10388         export function ChannelUpdate_free(this_obj: number): void {
10389                 if(!isWasmInitialized) {
10390                         throw new Error("initializeWasm() must be awaited first!");
10391                 }
10392                 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
10393                 // debug statements here
10394         }
10395         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
10396         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
10397                 if(!isWasmInitialized) {
10398                         throw new Error("initializeWasm() must be awaited first!");
10399                 }
10400                 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
10401                 return decodeArray(nativeResponseValue);
10402         }
10403         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
10404         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
10405                 if(!isWasmInitialized) {
10406                         throw new Error("initializeWasm() must be awaited first!");
10407                 }
10408                 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
10409                 // debug statements here
10410         }
10411         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
10412         export function ChannelUpdate_get_contents(this_ptr: number): number {
10413                 if(!isWasmInitialized) {
10414                         throw new Error("initializeWasm() must be awaited first!");
10415                 }
10416                 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
10417                 return nativeResponseValue;
10418         }
10419         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
10420         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
10421                 if(!isWasmInitialized) {
10422                         throw new Error("initializeWasm() must be awaited first!");
10423                 }
10424                 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
10425                 // debug statements here
10426         }
10427         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
10428         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
10429                 if(!isWasmInitialized) {
10430                         throw new Error("initializeWasm() must be awaited first!");
10431                 }
10432                 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
10433                 return nativeResponseValue;
10434         }
10435         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
10436         export function ChannelUpdate_clone(orig: number): number {
10437                 if(!isWasmInitialized) {
10438                         throw new Error("initializeWasm() must be awaited first!");
10439                 }
10440                 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
10441                 return nativeResponseValue;
10442         }
10443         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
10444         export function QueryChannelRange_free(this_obj: number): void {
10445                 if(!isWasmInitialized) {
10446                         throw new Error("initializeWasm() must be awaited first!");
10447                 }
10448                 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
10449                 // debug statements here
10450         }
10451         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
10452         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
10453                 if(!isWasmInitialized) {
10454                         throw new Error("initializeWasm() must be awaited first!");
10455                 }
10456                 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
10457                 return decodeArray(nativeResponseValue);
10458         }
10459         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10460         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10461                 if(!isWasmInitialized) {
10462                         throw new Error("initializeWasm() must be awaited first!");
10463                 }
10464                 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
10465                 // debug statements here
10466         }
10467         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
10468         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
10469                 if(!isWasmInitialized) {
10470                         throw new Error("initializeWasm() must be awaited first!");
10471                 }
10472                 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
10473                 return nativeResponseValue;
10474         }
10475         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
10476         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
10477                 if(!isWasmInitialized) {
10478                         throw new Error("initializeWasm() must be awaited first!");
10479                 }
10480                 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
10481                 // debug statements here
10482         }
10483         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
10484         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
10485                 if(!isWasmInitialized) {
10486                         throw new Error("initializeWasm() must be awaited first!");
10487                 }
10488                 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
10489                 return nativeResponseValue;
10490         }
10491         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
10492         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
10493                 if(!isWasmInitialized) {
10494                         throw new Error("initializeWasm() must be awaited first!");
10495                 }
10496                 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
10497                 // debug statements here
10498         }
10499         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
10500         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
10501                 if(!isWasmInitialized) {
10502                         throw new Error("initializeWasm() must be awaited first!");
10503                 }
10504                 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
10505                 return nativeResponseValue;
10506         }
10507         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
10508         export function QueryChannelRange_clone(orig: number): number {
10509                 if(!isWasmInitialized) {
10510                         throw new Error("initializeWasm() must be awaited first!");
10511                 }
10512                 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
10513                 return nativeResponseValue;
10514         }
10515         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
10516         export function ReplyChannelRange_free(this_obj: number): void {
10517                 if(!isWasmInitialized) {
10518                         throw new Error("initializeWasm() must be awaited first!");
10519                 }
10520                 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
10521                 // debug statements here
10522         }
10523         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
10524         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
10525                 if(!isWasmInitialized) {
10526                         throw new Error("initializeWasm() must be awaited first!");
10527                 }
10528                 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
10529                 return decodeArray(nativeResponseValue);
10530         }
10531         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10532         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10533                 if(!isWasmInitialized) {
10534                         throw new Error("initializeWasm() must be awaited first!");
10535                 }
10536                 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
10537                 // debug statements here
10538         }
10539         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
10540         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
10541                 if(!isWasmInitialized) {
10542                         throw new Error("initializeWasm() must be awaited first!");
10543                 }
10544                 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
10545                 return nativeResponseValue;
10546         }
10547         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
10548         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
10549                 if(!isWasmInitialized) {
10550                         throw new Error("initializeWasm() must be awaited first!");
10551                 }
10552                 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
10553                 // debug statements here
10554         }
10555         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
10556         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
10557                 if(!isWasmInitialized) {
10558                         throw new Error("initializeWasm() must be awaited first!");
10559                 }
10560                 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
10561                 return nativeResponseValue;
10562         }
10563         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
10564         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
10565                 if(!isWasmInitialized) {
10566                         throw new Error("initializeWasm() must be awaited first!");
10567                 }
10568                 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
10569                 // debug statements here
10570         }
10571         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
10572         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
10573                 if(!isWasmInitialized) {
10574                         throw new Error("initializeWasm() must be awaited first!");
10575                 }
10576                 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
10577                 return nativeResponseValue;
10578         }
10579         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
10580         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
10581                 if(!isWasmInitialized) {
10582                         throw new Error("initializeWasm() must be awaited first!");
10583                 }
10584                 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
10585                 // debug statements here
10586         }
10587         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
10588         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
10589                 if(!isWasmInitialized) {
10590                         throw new Error("initializeWasm() must be awaited first!");
10591                 }
10592                 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
10593                 // debug statements here
10594         }
10595         // 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);
10596         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 {
10597                 if(!isWasmInitialized) {
10598                         throw new Error("initializeWasm() must be awaited first!");
10599                 }
10600                 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
10601                 return nativeResponseValue;
10602         }
10603         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
10604         export function ReplyChannelRange_clone(orig: number): number {
10605                 if(!isWasmInitialized) {
10606                         throw new Error("initializeWasm() must be awaited first!");
10607                 }
10608                 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
10609                 return nativeResponseValue;
10610         }
10611         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
10612         export function QueryShortChannelIds_free(this_obj: number): void {
10613                 if(!isWasmInitialized) {
10614                         throw new Error("initializeWasm() must be awaited first!");
10615                 }
10616                 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
10617                 // debug statements here
10618         }
10619         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
10620         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
10621                 if(!isWasmInitialized) {
10622                         throw new Error("initializeWasm() must be awaited first!");
10623                 }
10624                 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
10625                 return decodeArray(nativeResponseValue);
10626         }
10627         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10628         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10629                 if(!isWasmInitialized) {
10630                         throw new Error("initializeWasm() must be awaited first!");
10631                 }
10632                 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
10633                 // debug statements here
10634         }
10635         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
10636         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
10637                 if(!isWasmInitialized) {
10638                         throw new Error("initializeWasm() must be awaited first!");
10639                 }
10640                 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
10641                 // debug statements here
10642         }
10643         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
10644         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
10645                 if(!isWasmInitialized) {
10646                         throw new Error("initializeWasm() must be awaited first!");
10647                 }
10648                 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
10649                 return nativeResponseValue;
10650         }
10651         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
10652         export function QueryShortChannelIds_clone(orig: number): number {
10653                 if(!isWasmInitialized) {
10654                         throw new Error("initializeWasm() must be awaited first!");
10655                 }
10656                 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
10657                 return nativeResponseValue;
10658         }
10659         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
10660         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
10661                 if(!isWasmInitialized) {
10662                         throw new Error("initializeWasm() must be awaited first!");
10663                 }
10664                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
10665                 // debug statements here
10666         }
10667         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
10668         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
10669                 if(!isWasmInitialized) {
10670                         throw new Error("initializeWasm() must be awaited first!");
10671                 }
10672                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
10673                 return decodeArray(nativeResponseValue);
10674         }
10675         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10676         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10677                 if(!isWasmInitialized) {
10678                         throw new Error("initializeWasm() must be awaited first!");
10679                 }
10680                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
10681                 // debug statements here
10682         }
10683         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
10684         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
10685                 if(!isWasmInitialized) {
10686                         throw new Error("initializeWasm() must be awaited first!");
10687                 }
10688                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
10689                 return nativeResponseValue;
10690         }
10691         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
10692         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
10693                 if(!isWasmInitialized) {
10694                         throw new Error("initializeWasm() must be awaited first!");
10695                 }
10696                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
10697                 // debug statements here
10698         }
10699         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
10700         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
10701                 if(!isWasmInitialized) {
10702                         throw new Error("initializeWasm() must be awaited first!");
10703                 }
10704                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
10705                 return nativeResponseValue;
10706         }
10707         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
10708         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
10709                 if(!isWasmInitialized) {
10710                         throw new Error("initializeWasm() must be awaited first!");
10711                 }
10712                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
10713                 return nativeResponseValue;
10714         }
10715         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
10716         export function GossipTimestampFilter_free(this_obj: number): void {
10717                 if(!isWasmInitialized) {
10718                         throw new Error("initializeWasm() must be awaited first!");
10719                 }
10720                 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
10721                 // debug statements here
10722         }
10723         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
10724         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
10725                 if(!isWasmInitialized) {
10726                         throw new Error("initializeWasm() must be awaited first!");
10727                 }
10728                 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
10729                 return decodeArray(nativeResponseValue);
10730         }
10731         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10732         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10733                 if(!isWasmInitialized) {
10734                         throw new Error("initializeWasm() must be awaited first!");
10735                 }
10736                 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
10737                 // debug statements here
10738         }
10739         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
10740         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
10741                 if(!isWasmInitialized) {
10742                         throw new Error("initializeWasm() must be awaited first!");
10743                 }
10744                 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
10745                 return nativeResponseValue;
10746         }
10747         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
10748         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
10749                 if(!isWasmInitialized) {
10750                         throw new Error("initializeWasm() must be awaited first!");
10751                 }
10752                 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
10753                 // debug statements here
10754         }
10755         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
10756         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
10757                 if(!isWasmInitialized) {
10758                         throw new Error("initializeWasm() must be awaited first!");
10759                 }
10760                 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
10761                 return nativeResponseValue;
10762         }
10763         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
10764         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
10765                 if(!isWasmInitialized) {
10766                         throw new Error("initializeWasm() must be awaited first!");
10767                 }
10768                 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
10769                 // debug statements here
10770         }
10771         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
10772         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
10773                 if(!isWasmInitialized) {
10774                         throw new Error("initializeWasm() must be awaited first!");
10775                 }
10776                 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
10777                 return nativeResponseValue;
10778         }
10779         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
10780         export function GossipTimestampFilter_clone(orig: number): number {
10781                 if(!isWasmInitialized) {
10782                         throw new Error("initializeWasm() must be awaited first!");
10783                 }
10784                 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
10785                 return nativeResponseValue;
10786         }
10787         // void ErrorAction_free(struct LDKErrorAction this_ptr);
10788         export function ErrorAction_free(this_ptr: number): void {
10789                 if(!isWasmInitialized) {
10790                         throw new Error("initializeWasm() must be awaited first!");
10791                 }
10792                 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
10793                 // debug statements here
10794         }
10795         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
10796         export function ErrorAction_clone(orig: number): number {
10797                 if(!isWasmInitialized) {
10798                         throw new Error("initializeWasm() must be awaited first!");
10799                 }
10800                 const nativeResponseValue = wasm.ErrorAction_clone(orig);
10801                 return nativeResponseValue;
10802         }
10803         // void LightningError_free(struct LDKLightningError this_obj);
10804         export function LightningError_free(this_obj: number): void {
10805                 if(!isWasmInitialized) {
10806                         throw new Error("initializeWasm() must be awaited first!");
10807                 }
10808                 const nativeResponseValue = wasm.LightningError_free(this_obj);
10809                 // debug statements here
10810         }
10811         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
10812         export function LightningError_get_err(this_ptr: number): String {
10813                 if(!isWasmInitialized) {
10814                         throw new Error("initializeWasm() must be awaited first!");
10815                 }
10816                 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
10817                 return nativeResponseValue;
10818         }
10819         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
10820         export function LightningError_set_err(this_ptr: number, val: String): void {
10821                 if(!isWasmInitialized) {
10822                         throw new Error("initializeWasm() must be awaited first!");
10823                 }
10824                 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, val);
10825                 // debug statements here
10826         }
10827         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
10828         export function LightningError_get_action(this_ptr: number): number {
10829                 if(!isWasmInitialized) {
10830                         throw new Error("initializeWasm() must be awaited first!");
10831                 }
10832                 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
10833                 return nativeResponseValue;
10834         }
10835         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
10836         export function LightningError_set_action(this_ptr: number, val: number): void {
10837                 if(!isWasmInitialized) {
10838                         throw new Error("initializeWasm() must be awaited first!");
10839                 }
10840                 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
10841                 // debug statements here
10842         }
10843         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
10844         export function LightningError_new(err_arg: String, action_arg: number): number {
10845                 if(!isWasmInitialized) {
10846                         throw new Error("initializeWasm() must be awaited first!");
10847                 }
10848                 const nativeResponseValue = wasm.LightningError_new(err_arg, action_arg);
10849                 return nativeResponseValue;
10850         }
10851         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
10852         export function LightningError_clone(orig: number): number {
10853                 if(!isWasmInitialized) {
10854                         throw new Error("initializeWasm() must be awaited first!");
10855                 }
10856                 const nativeResponseValue = wasm.LightningError_clone(orig);
10857                 return nativeResponseValue;
10858         }
10859         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
10860         export function CommitmentUpdate_free(this_obj: number): void {
10861                 if(!isWasmInitialized) {
10862                         throw new Error("initializeWasm() must be awaited first!");
10863                 }
10864                 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
10865                 // debug statements here
10866         }
10867         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
10868         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
10869                 if(!isWasmInitialized) {
10870                         throw new Error("initializeWasm() must be awaited first!");
10871                 }
10872                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
10873                 // debug statements here
10874         }
10875         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
10876         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
10877                 if(!isWasmInitialized) {
10878                         throw new Error("initializeWasm() must be awaited first!");
10879                 }
10880                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
10881                 // debug statements here
10882         }
10883         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
10884         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
10885                 if(!isWasmInitialized) {
10886                         throw new Error("initializeWasm() must be awaited first!");
10887                 }
10888                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
10889                 // debug statements here
10890         }
10891         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
10892         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
10893                 if(!isWasmInitialized) {
10894                         throw new Error("initializeWasm() must be awaited first!");
10895                 }
10896                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
10897                 // debug statements here
10898         }
10899         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
10900         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
10901                 if(!isWasmInitialized) {
10902                         throw new Error("initializeWasm() must be awaited first!");
10903                 }
10904                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
10905                 return nativeResponseValue;
10906         }
10907         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
10908         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
10909                 if(!isWasmInitialized) {
10910                         throw new Error("initializeWasm() must be awaited first!");
10911                 }
10912                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
10913                 // debug statements here
10914         }
10915         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
10916         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
10917                 if(!isWasmInitialized) {
10918                         throw new Error("initializeWasm() must be awaited first!");
10919                 }
10920                 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
10921                 return nativeResponseValue;
10922         }
10923         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
10924         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
10925                 if(!isWasmInitialized) {
10926                         throw new Error("initializeWasm() must be awaited first!");
10927                 }
10928                 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
10929                 // debug statements here
10930         }
10931         // 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);
10932         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 {
10933                 if(!isWasmInitialized) {
10934                         throw new Error("initializeWasm() must be awaited first!");
10935                 }
10936                 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);
10937                 return nativeResponseValue;
10938         }
10939         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
10940         export function CommitmentUpdate_clone(orig: number): number {
10941                 if(!isWasmInitialized) {
10942                         throw new Error("initializeWasm() must be awaited first!");
10943                 }
10944                 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
10945                 return nativeResponseValue;
10946         }
10947         // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
10948         export function HTLCFailChannelUpdate_free(this_ptr: number): void {
10949                 if(!isWasmInitialized) {
10950                         throw new Error("initializeWasm() must be awaited first!");
10951                 }
10952                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
10953                 // debug statements here
10954         }
10955         // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
10956         export function HTLCFailChannelUpdate_clone(orig: number): number {
10957                 if(!isWasmInitialized) {
10958                         throw new Error("initializeWasm() must be awaited first!");
10959                 }
10960                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
10961                 return nativeResponseValue;
10962         }
10963         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
10964         export function ChannelMessageHandler_free(this_ptr: number): void {
10965                 if(!isWasmInitialized) {
10966                         throw new Error("initializeWasm() must be awaited first!");
10967                 }
10968                 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
10969                 // debug statements here
10970         }
10971         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
10972         export function RoutingMessageHandler_free(this_ptr: number): void {
10973                 if(!isWasmInitialized) {
10974                         throw new Error("initializeWasm() must be awaited first!");
10975                 }
10976                 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
10977                 // debug statements here
10978         }
10979         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
10980         export function AcceptChannel_write(obj: number): Uint8Array {
10981                 if(!isWasmInitialized) {
10982                         throw new Error("initializeWasm() must be awaited first!");
10983                 }
10984                 const nativeResponseValue = wasm.AcceptChannel_write(obj);
10985                 return decodeArray(nativeResponseValue);
10986         }
10987         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
10988         export function AcceptChannel_read(ser: Uint8Array): number {
10989                 if(!isWasmInitialized) {
10990                         throw new Error("initializeWasm() must be awaited first!");
10991                 }
10992                 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
10993                 return nativeResponseValue;
10994         }
10995         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
10996         export function AnnouncementSignatures_write(obj: number): Uint8Array {
10997                 if(!isWasmInitialized) {
10998                         throw new Error("initializeWasm() must be awaited first!");
10999                 }
11000                 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
11001                 return decodeArray(nativeResponseValue);
11002         }
11003         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
11004         export function AnnouncementSignatures_read(ser: Uint8Array): number {
11005                 if(!isWasmInitialized) {
11006                         throw new Error("initializeWasm() must be awaited first!");
11007                 }
11008                 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
11009                 return nativeResponseValue;
11010         }
11011         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
11012         export function ChannelReestablish_write(obj: number): Uint8Array {
11013                 if(!isWasmInitialized) {
11014                         throw new Error("initializeWasm() must be awaited first!");
11015                 }
11016                 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
11017                 return decodeArray(nativeResponseValue);
11018         }
11019         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
11020         export function ChannelReestablish_read(ser: Uint8Array): number {
11021                 if(!isWasmInitialized) {
11022                         throw new Error("initializeWasm() must be awaited first!");
11023                 }
11024                 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
11025                 return nativeResponseValue;
11026         }
11027         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
11028         export function ClosingSigned_write(obj: number): Uint8Array {
11029                 if(!isWasmInitialized) {
11030                         throw new Error("initializeWasm() must be awaited first!");
11031                 }
11032                 const nativeResponseValue = wasm.ClosingSigned_write(obj);
11033                 return decodeArray(nativeResponseValue);
11034         }
11035         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
11036         export function ClosingSigned_read(ser: Uint8Array): number {
11037                 if(!isWasmInitialized) {
11038                         throw new Error("initializeWasm() must be awaited first!");
11039                 }
11040                 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
11041                 return nativeResponseValue;
11042         }
11043         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
11044         export function CommitmentSigned_write(obj: number): Uint8Array {
11045                 if(!isWasmInitialized) {
11046                         throw new Error("initializeWasm() must be awaited first!");
11047                 }
11048                 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
11049                 return decodeArray(nativeResponseValue);
11050         }
11051         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
11052         export function CommitmentSigned_read(ser: Uint8Array): number {
11053                 if(!isWasmInitialized) {
11054                         throw new Error("initializeWasm() must be awaited first!");
11055                 }
11056                 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
11057                 return nativeResponseValue;
11058         }
11059         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
11060         export function FundingCreated_write(obj: number): Uint8Array {
11061                 if(!isWasmInitialized) {
11062                         throw new Error("initializeWasm() must be awaited first!");
11063                 }
11064                 const nativeResponseValue = wasm.FundingCreated_write(obj);
11065                 return decodeArray(nativeResponseValue);
11066         }
11067         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
11068         export function FundingCreated_read(ser: Uint8Array): number {
11069                 if(!isWasmInitialized) {
11070                         throw new Error("initializeWasm() must be awaited first!");
11071                 }
11072                 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
11073                 return nativeResponseValue;
11074         }
11075         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
11076         export function FundingSigned_write(obj: number): Uint8Array {
11077                 if(!isWasmInitialized) {
11078                         throw new Error("initializeWasm() must be awaited first!");
11079                 }
11080                 const nativeResponseValue = wasm.FundingSigned_write(obj);
11081                 return decodeArray(nativeResponseValue);
11082         }
11083         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
11084         export function FundingSigned_read(ser: Uint8Array): number {
11085                 if(!isWasmInitialized) {
11086                         throw new Error("initializeWasm() must be awaited first!");
11087                 }
11088                 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
11089                 return nativeResponseValue;
11090         }
11091         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
11092         export function FundingLocked_write(obj: number): Uint8Array {
11093                 if(!isWasmInitialized) {
11094                         throw new Error("initializeWasm() must be awaited first!");
11095                 }
11096                 const nativeResponseValue = wasm.FundingLocked_write(obj);
11097                 return decodeArray(nativeResponseValue);
11098         }
11099         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
11100         export function FundingLocked_read(ser: Uint8Array): number {
11101                 if(!isWasmInitialized) {
11102                         throw new Error("initializeWasm() must be awaited first!");
11103                 }
11104                 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
11105                 return nativeResponseValue;
11106         }
11107         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
11108         export function Init_write(obj: number): Uint8Array {
11109                 if(!isWasmInitialized) {
11110                         throw new Error("initializeWasm() must be awaited first!");
11111                 }
11112                 const nativeResponseValue = wasm.Init_write(obj);
11113                 return decodeArray(nativeResponseValue);
11114         }
11115         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
11116         export function Init_read(ser: Uint8Array): number {
11117                 if(!isWasmInitialized) {
11118                         throw new Error("initializeWasm() must be awaited first!");
11119                 }
11120                 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
11121                 return nativeResponseValue;
11122         }
11123         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
11124         export function OpenChannel_write(obj: number): Uint8Array {
11125                 if(!isWasmInitialized) {
11126                         throw new Error("initializeWasm() must be awaited first!");
11127                 }
11128                 const nativeResponseValue = wasm.OpenChannel_write(obj);
11129                 return decodeArray(nativeResponseValue);
11130         }
11131         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
11132         export function OpenChannel_read(ser: Uint8Array): number {
11133                 if(!isWasmInitialized) {
11134                         throw new Error("initializeWasm() must be awaited first!");
11135                 }
11136                 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
11137                 return nativeResponseValue;
11138         }
11139         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
11140         export function RevokeAndACK_write(obj: number): Uint8Array {
11141                 if(!isWasmInitialized) {
11142                         throw new Error("initializeWasm() must be awaited first!");
11143                 }
11144                 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
11145                 return decodeArray(nativeResponseValue);
11146         }
11147         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
11148         export function RevokeAndACK_read(ser: Uint8Array): number {
11149                 if(!isWasmInitialized) {
11150                         throw new Error("initializeWasm() must be awaited first!");
11151                 }
11152                 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
11153                 return nativeResponseValue;
11154         }
11155         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
11156         export function Shutdown_write(obj: number): Uint8Array {
11157                 if(!isWasmInitialized) {
11158                         throw new Error("initializeWasm() must be awaited first!");
11159                 }
11160                 const nativeResponseValue = wasm.Shutdown_write(obj);
11161                 return decodeArray(nativeResponseValue);
11162         }
11163         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
11164         export function Shutdown_read(ser: Uint8Array): number {
11165                 if(!isWasmInitialized) {
11166                         throw new Error("initializeWasm() must be awaited first!");
11167                 }
11168                 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
11169                 return nativeResponseValue;
11170         }
11171         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
11172         export function UpdateFailHTLC_write(obj: number): Uint8Array {
11173                 if(!isWasmInitialized) {
11174                         throw new Error("initializeWasm() must be awaited first!");
11175                 }
11176                 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
11177                 return decodeArray(nativeResponseValue);
11178         }
11179         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
11180         export function UpdateFailHTLC_read(ser: Uint8Array): number {
11181                 if(!isWasmInitialized) {
11182                         throw new Error("initializeWasm() must be awaited first!");
11183                 }
11184                 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
11185                 return nativeResponseValue;
11186         }
11187         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
11188         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
11189                 if(!isWasmInitialized) {
11190                         throw new Error("initializeWasm() must be awaited first!");
11191                 }
11192                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
11193                 return decodeArray(nativeResponseValue);
11194         }
11195         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
11196         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
11197                 if(!isWasmInitialized) {
11198                         throw new Error("initializeWasm() must be awaited first!");
11199                 }
11200                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
11201                 return nativeResponseValue;
11202         }
11203         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
11204         export function UpdateFee_write(obj: number): Uint8Array {
11205                 if(!isWasmInitialized) {
11206                         throw new Error("initializeWasm() must be awaited first!");
11207                 }
11208                 const nativeResponseValue = wasm.UpdateFee_write(obj);
11209                 return decodeArray(nativeResponseValue);
11210         }
11211         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
11212         export function UpdateFee_read(ser: Uint8Array): number {
11213                 if(!isWasmInitialized) {
11214                         throw new Error("initializeWasm() must be awaited first!");
11215                 }
11216                 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
11217                 return nativeResponseValue;
11218         }
11219         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
11220         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
11221                 if(!isWasmInitialized) {
11222                         throw new Error("initializeWasm() must be awaited first!");
11223                 }
11224                 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
11225                 return decodeArray(nativeResponseValue);
11226         }
11227         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
11228         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
11229                 if(!isWasmInitialized) {
11230                         throw new Error("initializeWasm() must be awaited first!");
11231                 }
11232                 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
11233                 return nativeResponseValue;
11234         }
11235         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
11236         export function UpdateAddHTLC_write(obj: number): Uint8Array {
11237                 if(!isWasmInitialized) {
11238                         throw new Error("initializeWasm() must be awaited first!");
11239                 }
11240                 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
11241                 return decodeArray(nativeResponseValue);
11242         }
11243         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
11244         export function UpdateAddHTLC_read(ser: Uint8Array): number {
11245                 if(!isWasmInitialized) {
11246                         throw new Error("initializeWasm() must be awaited first!");
11247                 }
11248                 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
11249                 return nativeResponseValue;
11250         }
11251         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
11252         export function Ping_write(obj: number): Uint8Array {
11253                 if(!isWasmInitialized) {
11254                         throw new Error("initializeWasm() must be awaited first!");
11255                 }
11256                 const nativeResponseValue = wasm.Ping_write(obj);
11257                 return decodeArray(nativeResponseValue);
11258         }
11259         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
11260         export function Ping_read(ser: Uint8Array): number {
11261                 if(!isWasmInitialized) {
11262                         throw new Error("initializeWasm() must be awaited first!");
11263                 }
11264                 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
11265                 return nativeResponseValue;
11266         }
11267         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
11268         export function Pong_write(obj: number): Uint8Array {
11269                 if(!isWasmInitialized) {
11270                         throw new Error("initializeWasm() must be awaited first!");
11271                 }
11272                 const nativeResponseValue = wasm.Pong_write(obj);
11273                 return decodeArray(nativeResponseValue);
11274         }
11275         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
11276         export function Pong_read(ser: Uint8Array): number {
11277                 if(!isWasmInitialized) {
11278                         throw new Error("initializeWasm() must be awaited first!");
11279                 }
11280                 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
11281                 return nativeResponseValue;
11282         }
11283         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
11284         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
11285                 if(!isWasmInitialized) {
11286                         throw new Error("initializeWasm() must be awaited first!");
11287                 }
11288                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
11289                 return decodeArray(nativeResponseValue);
11290         }
11291         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
11292         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
11293                 if(!isWasmInitialized) {
11294                         throw new Error("initializeWasm() must be awaited first!");
11295                 }
11296                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
11297                 return nativeResponseValue;
11298         }
11299         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
11300         export function ChannelAnnouncement_write(obj: number): Uint8Array {
11301                 if(!isWasmInitialized) {
11302                         throw new Error("initializeWasm() must be awaited first!");
11303                 }
11304                 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
11305                 return decodeArray(nativeResponseValue);
11306         }
11307         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
11308         export function ChannelAnnouncement_read(ser: Uint8Array): number {
11309                 if(!isWasmInitialized) {
11310                         throw new Error("initializeWasm() must be awaited first!");
11311                 }
11312                 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
11313                 return nativeResponseValue;
11314         }
11315         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
11316         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
11317                 if(!isWasmInitialized) {
11318                         throw new Error("initializeWasm() must be awaited first!");
11319                 }
11320                 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
11321                 return decodeArray(nativeResponseValue);
11322         }
11323         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
11324         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
11325                 if(!isWasmInitialized) {
11326                         throw new Error("initializeWasm() must be awaited first!");
11327                 }
11328                 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
11329                 return nativeResponseValue;
11330         }
11331         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
11332         export function ChannelUpdate_write(obj: number): Uint8Array {
11333                 if(!isWasmInitialized) {
11334                         throw new Error("initializeWasm() must be awaited first!");
11335                 }
11336                 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
11337                 return decodeArray(nativeResponseValue);
11338         }
11339         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
11340         export function ChannelUpdate_read(ser: Uint8Array): number {
11341                 if(!isWasmInitialized) {
11342                         throw new Error("initializeWasm() must be awaited first!");
11343                 }
11344                 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
11345                 return nativeResponseValue;
11346         }
11347         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
11348         export function ErrorMessage_write(obj: number): Uint8Array {
11349                 if(!isWasmInitialized) {
11350                         throw new Error("initializeWasm() must be awaited first!");
11351                 }
11352                 const nativeResponseValue = wasm.ErrorMessage_write(obj);
11353                 return decodeArray(nativeResponseValue);
11354         }
11355         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
11356         export function ErrorMessage_read(ser: Uint8Array): number {
11357                 if(!isWasmInitialized) {
11358                         throw new Error("initializeWasm() must be awaited first!");
11359                 }
11360                 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
11361                 return nativeResponseValue;
11362         }
11363         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
11364         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
11365                 if(!isWasmInitialized) {
11366                         throw new Error("initializeWasm() must be awaited first!");
11367                 }
11368                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
11369                 return decodeArray(nativeResponseValue);
11370         }
11371         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
11372         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
11373                 if(!isWasmInitialized) {
11374                         throw new Error("initializeWasm() must be awaited first!");
11375                 }
11376                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
11377                 return nativeResponseValue;
11378         }
11379         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
11380         export function NodeAnnouncement_write(obj: number): Uint8Array {
11381                 if(!isWasmInitialized) {
11382                         throw new Error("initializeWasm() must be awaited first!");
11383                 }
11384                 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
11385                 return decodeArray(nativeResponseValue);
11386         }
11387         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
11388         export function NodeAnnouncement_read(ser: Uint8Array): number {
11389                 if(!isWasmInitialized) {
11390                         throw new Error("initializeWasm() must be awaited first!");
11391                 }
11392                 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
11393                 return nativeResponseValue;
11394         }
11395         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
11396         export function QueryShortChannelIds_read(ser: Uint8Array): number {
11397                 if(!isWasmInitialized) {
11398                         throw new Error("initializeWasm() must be awaited first!");
11399                 }
11400                 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
11401                 return nativeResponseValue;
11402         }
11403         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
11404         export function QueryShortChannelIds_write(obj: number): Uint8Array {
11405                 if(!isWasmInitialized) {
11406                         throw new Error("initializeWasm() must be awaited first!");
11407                 }
11408                 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
11409                 return decodeArray(nativeResponseValue);
11410         }
11411         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
11412         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
11413                 if(!isWasmInitialized) {
11414                         throw new Error("initializeWasm() must be awaited first!");
11415                 }
11416                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
11417                 return nativeResponseValue;
11418         }
11419         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
11420         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
11421                 if(!isWasmInitialized) {
11422                         throw new Error("initializeWasm() must be awaited first!");
11423                 }
11424                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
11425                 return decodeArray(nativeResponseValue);
11426         }
11427         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
11428         export function QueryChannelRange_end_blocknum(this_arg: number): number {
11429                 if(!isWasmInitialized) {
11430                         throw new Error("initializeWasm() must be awaited first!");
11431                 }
11432                 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
11433                 return nativeResponseValue;
11434         }
11435         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
11436         export function QueryChannelRange_read(ser: Uint8Array): number {
11437                 if(!isWasmInitialized) {
11438                         throw new Error("initializeWasm() must be awaited first!");
11439                 }
11440                 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
11441                 return nativeResponseValue;
11442         }
11443         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
11444         export function QueryChannelRange_write(obj: number): Uint8Array {
11445                 if(!isWasmInitialized) {
11446                         throw new Error("initializeWasm() must be awaited first!");
11447                 }
11448                 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
11449                 return decodeArray(nativeResponseValue);
11450         }
11451         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
11452         export function ReplyChannelRange_read(ser: Uint8Array): number {
11453                 if(!isWasmInitialized) {
11454                         throw new Error("initializeWasm() must be awaited first!");
11455                 }
11456                 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
11457                 return nativeResponseValue;
11458         }
11459         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
11460         export function ReplyChannelRange_write(obj: number): Uint8Array {
11461                 if(!isWasmInitialized) {
11462                         throw new Error("initializeWasm() must be awaited first!");
11463                 }
11464                 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
11465                 return decodeArray(nativeResponseValue);
11466         }
11467         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
11468         export function GossipTimestampFilter_read(ser: Uint8Array): number {
11469                 if(!isWasmInitialized) {
11470                         throw new Error("initializeWasm() must be awaited first!");
11471                 }
11472                 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
11473                 return nativeResponseValue;
11474         }
11475         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
11476         export function GossipTimestampFilter_write(obj: number): Uint8Array {
11477                 if(!isWasmInitialized) {
11478                         throw new Error("initializeWasm() must be awaited first!");
11479                 }
11480                 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
11481                 return decodeArray(nativeResponseValue);
11482         }
11483         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
11484         export function IgnoringMessageHandler_free(this_obj: number): void {
11485                 if(!isWasmInitialized) {
11486                         throw new Error("initializeWasm() must be awaited first!");
11487                 }
11488                 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
11489                 // debug statements here
11490         }
11491         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
11492         export function IgnoringMessageHandler_new(): number {
11493                 if(!isWasmInitialized) {
11494                         throw new Error("initializeWasm() must be awaited first!");
11495                 }
11496                 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
11497                 return nativeResponseValue;
11498         }
11499         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
11500         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
11501                 if(!isWasmInitialized) {
11502                         throw new Error("initializeWasm() must be awaited first!");
11503                 }
11504                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
11505                 return nativeResponseValue;
11506         }
11507         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
11508         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
11509                 if(!isWasmInitialized) {
11510                         throw new Error("initializeWasm() must be awaited first!");
11511                 }
11512                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
11513                 return nativeResponseValue;
11514         }
11515         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
11516         export function ErroringMessageHandler_free(this_obj: number): void {
11517                 if(!isWasmInitialized) {
11518                         throw new Error("initializeWasm() must be awaited first!");
11519                 }
11520                 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
11521                 // debug statements here
11522         }
11523         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
11524         export function ErroringMessageHandler_new(): number {
11525                 if(!isWasmInitialized) {
11526                         throw new Error("initializeWasm() must be awaited first!");
11527                 }
11528                 const nativeResponseValue = wasm.ErroringMessageHandler_new();
11529                 return nativeResponseValue;
11530         }
11531         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
11532         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
11533                 if(!isWasmInitialized) {
11534                         throw new Error("initializeWasm() must be awaited first!");
11535                 }
11536                 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
11537                 return nativeResponseValue;
11538         }
11539         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
11540         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
11541                 if(!isWasmInitialized) {
11542                         throw new Error("initializeWasm() must be awaited first!");
11543                 }
11544                 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
11545                 return nativeResponseValue;
11546         }
11547         // void MessageHandler_free(struct LDKMessageHandler this_obj);
11548         export function MessageHandler_free(this_obj: number): void {
11549                 if(!isWasmInitialized) {
11550                         throw new Error("initializeWasm() must be awaited first!");
11551                 }
11552                 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
11553                 // debug statements here
11554         }
11555         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
11556         export function MessageHandler_get_chan_handler(this_ptr: number): number {
11557                 if(!isWasmInitialized) {
11558                         throw new Error("initializeWasm() must be awaited first!");
11559                 }
11560                 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
11561                 return nativeResponseValue;
11562         }
11563         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
11564         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
11565                 if(!isWasmInitialized) {
11566                         throw new Error("initializeWasm() must be awaited first!");
11567                 }
11568                 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
11569                 // debug statements here
11570         }
11571         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
11572         export function MessageHandler_get_route_handler(this_ptr: number): number {
11573                 if(!isWasmInitialized) {
11574                         throw new Error("initializeWasm() must be awaited first!");
11575                 }
11576                 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
11577                 return nativeResponseValue;
11578         }
11579         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
11580         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
11581                 if(!isWasmInitialized) {
11582                         throw new Error("initializeWasm() must be awaited first!");
11583                 }
11584                 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
11585                 // debug statements here
11586         }
11587         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
11588         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
11589                 if(!isWasmInitialized) {
11590                         throw new Error("initializeWasm() must be awaited first!");
11591                 }
11592                 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
11593                 return nativeResponseValue;
11594         }
11595         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
11596         export function SocketDescriptor_clone(orig: number): number {
11597                 if(!isWasmInitialized) {
11598                         throw new Error("initializeWasm() must be awaited first!");
11599                 }
11600                 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
11601                 return nativeResponseValue;
11602         }
11603         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
11604         export function SocketDescriptor_free(this_ptr: number): void {
11605                 if(!isWasmInitialized) {
11606                         throw new Error("initializeWasm() must be awaited first!");
11607                 }
11608                 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
11609                 // debug statements here
11610         }
11611         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
11612         export function PeerHandleError_free(this_obj: number): void {
11613                 if(!isWasmInitialized) {
11614                         throw new Error("initializeWasm() must be awaited first!");
11615                 }
11616                 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
11617                 // debug statements here
11618         }
11619         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
11620         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
11621                 if(!isWasmInitialized) {
11622                         throw new Error("initializeWasm() must be awaited first!");
11623                 }
11624                 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
11625                 return nativeResponseValue;
11626         }
11627         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
11628         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
11629                 if(!isWasmInitialized) {
11630                         throw new Error("initializeWasm() must be awaited first!");
11631                 }
11632                 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
11633                 // debug statements here
11634         }
11635         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
11636         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
11637                 if(!isWasmInitialized) {
11638                         throw new Error("initializeWasm() must be awaited first!");
11639                 }
11640                 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
11641                 return nativeResponseValue;
11642         }
11643         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
11644         export function PeerHandleError_clone(orig: number): number {
11645                 if(!isWasmInitialized) {
11646                         throw new Error("initializeWasm() must be awaited first!");
11647                 }
11648                 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
11649                 return nativeResponseValue;
11650         }
11651         // void PeerManager_free(struct LDKPeerManager this_obj);
11652         export function PeerManager_free(this_obj: number): void {
11653                 if(!isWasmInitialized) {
11654                         throw new Error("initializeWasm() must be awaited first!");
11655                 }
11656                 const nativeResponseValue = wasm.PeerManager_free(this_obj);
11657                 // debug statements here
11658         }
11659         // 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);
11660         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
11661                 if(!isWasmInitialized) {
11662                         throw new Error("initializeWasm() must be awaited first!");
11663                 }
11664                 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
11665                 return nativeResponseValue;
11666         }
11667         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
11668         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
11669                 if(!isWasmInitialized) {
11670                         throw new Error("initializeWasm() must be awaited first!");
11671                 }
11672                 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
11673                 return nativeResponseValue;
11674         }
11675         // 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);
11676         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
11677                 if(!isWasmInitialized) {
11678                         throw new Error("initializeWasm() must be awaited first!");
11679                 }
11680                 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
11681                 return nativeResponseValue;
11682         }
11683         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
11684         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
11685                 if(!isWasmInitialized) {
11686                         throw new Error("initializeWasm() must be awaited first!");
11687                 }
11688                 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
11689                 return nativeResponseValue;
11690         }
11691         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
11692         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
11693                 if(!isWasmInitialized) {
11694                         throw new Error("initializeWasm() must be awaited first!");
11695                 }
11696                 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
11697                 return nativeResponseValue;
11698         }
11699         // 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);
11700         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
11701                 if(!isWasmInitialized) {
11702                         throw new Error("initializeWasm() must be awaited first!");
11703                 }
11704                 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
11705                 return nativeResponseValue;
11706         }
11707         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
11708         export function PeerManager_process_events(this_arg: number): void {
11709                 if(!isWasmInitialized) {
11710                         throw new Error("initializeWasm() must be awaited first!");
11711                 }
11712                 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
11713                 // debug statements here
11714         }
11715         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
11716         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
11717                 if(!isWasmInitialized) {
11718                         throw new Error("initializeWasm() must be awaited first!");
11719                 }
11720                 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
11721                 // debug statements here
11722         }
11723         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
11724         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
11725                 if(!isWasmInitialized) {
11726                         throw new Error("initializeWasm() must be awaited first!");
11727                 }
11728                 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
11729                 // debug statements here
11730         }
11731         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
11732         export function PeerManager_timer_tick_occurred(this_arg: number): void {
11733                 if(!isWasmInitialized) {
11734                         throw new Error("initializeWasm() must be awaited first!");
11735                 }
11736                 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
11737                 // debug statements here
11738         }
11739         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
11740         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
11741                 if(!isWasmInitialized) {
11742                         throw new Error("initializeWasm() must be awaited first!");
11743                 }
11744                 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
11745                 return decodeArray(nativeResponseValue);
11746         }
11747         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
11748         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
11749                 if(!isWasmInitialized) {
11750                         throw new Error("initializeWasm() must be awaited first!");
11751                 }
11752                 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
11753                 return nativeResponseValue;
11754         }
11755         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
11756         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
11757                 if(!isWasmInitialized) {
11758                         throw new Error("initializeWasm() must be awaited first!");
11759                 }
11760                 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
11761                 return nativeResponseValue;
11762         }
11763         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
11764         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
11765                 if(!isWasmInitialized) {
11766                         throw new Error("initializeWasm() must be awaited first!");
11767                 }
11768                 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
11769                 return nativeResponseValue;
11770         }
11771         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
11772         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
11773                 if(!isWasmInitialized) {
11774                         throw new Error("initializeWasm() must be awaited first!");
11775                 }
11776                 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
11777                 return nativeResponseValue;
11778         }
11779         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
11780         export function TxCreationKeys_free(this_obj: number): void {
11781                 if(!isWasmInitialized) {
11782                         throw new Error("initializeWasm() must be awaited first!");
11783                 }
11784                 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
11785                 // debug statements here
11786         }
11787         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
11788         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
11789                 if(!isWasmInitialized) {
11790                         throw new Error("initializeWasm() must be awaited first!");
11791                 }
11792                 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
11793                 return decodeArray(nativeResponseValue);
11794         }
11795         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11796         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11797                 if(!isWasmInitialized) {
11798                         throw new Error("initializeWasm() must be awaited first!");
11799                 }
11800                 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
11801                 // debug statements here
11802         }
11803         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
11804         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
11805                 if(!isWasmInitialized) {
11806                         throw new Error("initializeWasm() must be awaited first!");
11807                 }
11808                 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
11809                 return decodeArray(nativeResponseValue);
11810         }
11811         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11812         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
11813                 if(!isWasmInitialized) {
11814                         throw new Error("initializeWasm() must be awaited first!");
11815                 }
11816                 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
11817                 // debug statements here
11818         }
11819         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
11820         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
11821                 if(!isWasmInitialized) {
11822                         throw new Error("initializeWasm() must be awaited first!");
11823                 }
11824                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
11825                 return decodeArray(nativeResponseValue);
11826         }
11827         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11828         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
11829                 if(!isWasmInitialized) {
11830                         throw new Error("initializeWasm() must be awaited first!");
11831                 }
11832                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
11833                 // debug statements here
11834         }
11835         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
11836         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
11837                 if(!isWasmInitialized) {
11838                         throw new Error("initializeWasm() must be awaited first!");
11839                 }
11840                 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
11841                 return decodeArray(nativeResponseValue);
11842         }
11843         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11844         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
11845                 if(!isWasmInitialized) {
11846                         throw new Error("initializeWasm() must be awaited first!");
11847                 }
11848                 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
11849                 // debug statements here
11850         }
11851         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
11852         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
11853                 if(!isWasmInitialized) {
11854                         throw new Error("initializeWasm() must be awaited first!");
11855                 }
11856                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
11857                 return decodeArray(nativeResponseValue);
11858         }
11859         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11860         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
11861                 if(!isWasmInitialized) {
11862                         throw new Error("initializeWasm() must be awaited first!");
11863                 }
11864                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
11865                 // debug statements here
11866         }
11867         // 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);
11868         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 {
11869                 if(!isWasmInitialized) {
11870                         throw new Error("initializeWasm() must be awaited first!");
11871                 }
11872                 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));
11873                 return nativeResponseValue;
11874         }
11875         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
11876         export function TxCreationKeys_clone(orig: number): number {
11877                 if(!isWasmInitialized) {
11878                         throw new Error("initializeWasm() must be awaited first!");
11879                 }
11880                 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
11881                 return nativeResponseValue;
11882         }
11883         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
11884         export function TxCreationKeys_write(obj: number): Uint8Array {
11885                 if(!isWasmInitialized) {
11886                         throw new Error("initializeWasm() must be awaited first!");
11887                 }
11888                 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
11889                 return decodeArray(nativeResponseValue);
11890         }
11891         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
11892         export function TxCreationKeys_read(ser: Uint8Array): number {
11893                 if(!isWasmInitialized) {
11894                         throw new Error("initializeWasm() must be awaited first!");
11895                 }
11896                 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
11897                 return nativeResponseValue;
11898         }
11899         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
11900         export function ChannelPublicKeys_free(this_obj: number): void {
11901                 if(!isWasmInitialized) {
11902                         throw new Error("initializeWasm() must be awaited first!");
11903                 }
11904                 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
11905                 // debug statements here
11906         }
11907         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
11908         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
11909                 if(!isWasmInitialized) {
11910                         throw new Error("initializeWasm() must be awaited first!");
11911                 }
11912                 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
11913                 return decodeArray(nativeResponseValue);
11914         }
11915         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11916         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
11917                 if(!isWasmInitialized) {
11918                         throw new Error("initializeWasm() must be awaited first!");
11919                 }
11920                 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
11921                 // debug statements here
11922         }
11923         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
11924         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
11925                 if(!isWasmInitialized) {
11926                         throw new Error("initializeWasm() must be awaited first!");
11927                 }
11928                 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
11929                 return decodeArray(nativeResponseValue);
11930         }
11931         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11932         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
11933                 if(!isWasmInitialized) {
11934                         throw new Error("initializeWasm() must be awaited first!");
11935                 }
11936                 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
11937                 // debug statements here
11938         }
11939         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
11940         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
11941                 if(!isWasmInitialized) {
11942                         throw new Error("initializeWasm() must be awaited first!");
11943                 }
11944                 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
11945                 return decodeArray(nativeResponseValue);
11946         }
11947         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11948         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
11949                 if(!isWasmInitialized) {
11950                         throw new Error("initializeWasm() must be awaited first!");
11951                 }
11952                 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
11953                 // debug statements here
11954         }
11955         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
11956         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
11957                 if(!isWasmInitialized) {
11958                         throw new Error("initializeWasm() must be awaited first!");
11959                 }
11960                 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
11961                 return decodeArray(nativeResponseValue);
11962         }
11963         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11964         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
11965                 if(!isWasmInitialized) {
11966                         throw new Error("initializeWasm() must be awaited first!");
11967                 }
11968                 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
11969                 // debug statements here
11970         }
11971         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
11972         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
11973                 if(!isWasmInitialized) {
11974                         throw new Error("initializeWasm() must be awaited first!");
11975                 }
11976                 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
11977                 return decodeArray(nativeResponseValue);
11978         }
11979         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11980         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
11981                 if(!isWasmInitialized) {
11982                         throw new Error("initializeWasm() must be awaited first!");
11983                 }
11984                 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
11985                 // debug statements here
11986         }
11987         // 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);
11988         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 {
11989                 if(!isWasmInitialized) {
11990                         throw new Error("initializeWasm() must be awaited first!");
11991                 }
11992                 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));
11993                 return nativeResponseValue;
11994         }
11995         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
11996         export function ChannelPublicKeys_clone(orig: number): number {
11997                 if(!isWasmInitialized) {
11998                         throw new Error("initializeWasm() must be awaited first!");
11999                 }
12000                 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
12001                 return nativeResponseValue;
12002         }
12003         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
12004         export function ChannelPublicKeys_write(obj: number): Uint8Array {
12005                 if(!isWasmInitialized) {
12006                         throw new Error("initializeWasm() must be awaited first!");
12007                 }
12008                 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
12009                 return decodeArray(nativeResponseValue);
12010         }
12011         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
12012         export function ChannelPublicKeys_read(ser: Uint8Array): number {
12013                 if(!isWasmInitialized) {
12014                         throw new Error("initializeWasm() must be awaited first!");
12015                 }
12016                 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
12017                 return nativeResponseValue;
12018         }
12019         // 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);
12020         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 {
12021                 if(!isWasmInitialized) {
12022                         throw new Error("initializeWasm() must be awaited first!");
12023                 }
12024                 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));
12025                 return nativeResponseValue;
12026         }
12027         // 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);
12028         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
12029                 if(!isWasmInitialized) {
12030                         throw new Error("initializeWasm() must be awaited first!");
12031                 }
12032                 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
12033                 return nativeResponseValue;
12034         }
12035         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
12036         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
12037                 if(!isWasmInitialized) {
12038                         throw new Error("initializeWasm() must be awaited first!");
12039                 }
12040                 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
12041                 return decodeArray(nativeResponseValue);
12042         }
12043         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
12044         export function HTLCOutputInCommitment_free(this_obj: number): void {
12045                 if(!isWasmInitialized) {
12046                         throw new Error("initializeWasm() must be awaited first!");
12047                 }
12048                 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
12049                 // debug statements here
12050         }
12051         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12052         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
12053                 if(!isWasmInitialized) {
12054                         throw new Error("initializeWasm() must be awaited first!");
12055                 }
12056                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
12057                 return nativeResponseValue;
12058         }
12059         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
12060         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
12061                 if(!isWasmInitialized) {
12062                         throw new Error("initializeWasm() must be awaited first!");
12063                 }
12064                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
12065                 // debug statements here
12066         }
12067         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12068         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
12069                 if(!isWasmInitialized) {
12070                         throw new Error("initializeWasm() must be awaited first!");
12071                 }
12072                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
12073                 return nativeResponseValue;
12074         }
12075         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
12076         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
12077                 if(!isWasmInitialized) {
12078                         throw new Error("initializeWasm() must be awaited first!");
12079                 }
12080                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
12081                 // debug statements here
12082         }
12083         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12084         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
12085                 if(!isWasmInitialized) {
12086                         throw new Error("initializeWasm() must be awaited first!");
12087                 }
12088                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
12089                 return nativeResponseValue;
12090         }
12091         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
12092         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
12093                 if(!isWasmInitialized) {
12094                         throw new Error("initializeWasm() must be awaited first!");
12095                 }
12096                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
12097                 // debug statements here
12098         }
12099         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
12100         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
12101                 if(!isWasmInitialized) {
12102                         throw new Error("initializeWasm() must be awaited first!");
12103                 }
12104                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
12105                 return decodeArray(nativeResponseValue);
12106         }
12107         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12108         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
12109                 if(!isWasmInitialized) {
12110                         throw new Error("initializeWasm() must be awaited first!");
12111                 }
12112                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
12113                 // debug statements here
12114         }
12115         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12116         export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
12117                 if(!isWasmInitialized) {
12118                         throw new Error("initializeWasm() must be awaited first!");
12119                 }
12120                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
12121                 return nativeResponseValue;
12122         }
12123         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
12124         export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
12125                 if(!isWasmInitialized) {
12126                         throw new Error("initializeWasm() must be awaited first!");
12127                 }
12128                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
12129                 // debug statements here
12130         }
12131         // 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);
12132         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 {
12133                 if(!isWasmInitialized) {
12134                         throw new Error("initializeWasm() must be awaited first!");
12135                 }
12136                 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
12137                 return nativeResponseValue;
12138         }
12139         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
12140         export function HTLCOutputInCommitment_clone(orig: number): number {
12141                 if(!isWasmInitialized) {
12142                         throw new Error("initializeWasm() must be awaited first!");
12143                 }
12144                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
12145                 return nativeResponseValue;
12146         }
12147         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
12148         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
12149                 if(!isWasmInitialized) {
12150                         throw new Error("initializeWasm() must be awaited first!");
12151                 }
12152                 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
12153                 return decodeArray(nativeResponseValue);
12154         }
12155         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
12156         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
12157                 if(!isWasmInitialized) {
12158                         throw new Error("initializeWasm() must be awaited first!");
12159                 }
12160                 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
12161                 return nativeResponseValue;
12162         }
12163         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
12164         export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
12165                 if(!isWasmInitialized) {
12166                         throw new Error("initializeWasm() must be awaited first!");
12167                 }
12168                 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
12169                 return decodeArray(nativeResponseValue);
12170         }
12171         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
12172         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
12173                 if(!isWasmInitialized) {
12174                         throw new Error("initializeWasm() must be awaited first!");
12175                 }
12176                 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
12177                 return decodeArray(nativeResponseValue);
12178         }
12179         // 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);
12180         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 {
12181                 if(!isWasmInitialized) {
12182                         throw new Error("initializeWasm() must be awaited first!");
12183                 }
12184                 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(commitment_txid), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
12185                 return decodeArray(nativeResponseValue);
12186         }
12187         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
12188         export function ChannelTransactionParameters_free(this_obj: number): void {
12189                 if(!isWasmInitialized) {
12190                         throw new Error("initializeWasm() must be awaited first!");
12191                 }
12192                 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
12193                 // debug statements here
12194         }
12195         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12196         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
12197                 if(!isWasmInitialized) {
12198                         throw new Error("initializeWasm() must be awaited first!");
12199                 }
12200                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
12201                 return nativeResponseValue;
12202         }
12203         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
12204         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
12205                 if(!isWasmInitialized) {
12206                         throw new Error("initializeWasm() must be awaited first!");
12207                 }
12208                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
12209                 // debug statements here
12210         }
12211         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12212         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
12213                 if(!isWasmInitialized) {
12214                         throw new Error("initializeWasm() must be awaited first!");
12215                 }
12216                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
12217                 return nativeResponseValue;
12218         }
12219         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
12220         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
12221                 if(!isWasmInitialized) {
12222                         throw new Error("initializeWasm() must be awaited first!");
12223                 }
12224                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
12225                 // debug statements here
12226         }
12227         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12228         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
12229                 if(!isWasmInitialized) {
12230                         throw new Error("initializeWasm() must be awaited first!");
12231                 }
12232                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
12233                 return nativeResponseValue;
12234         }
12235         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
12236         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
12237                 if(!isWasmInitialized) {
12238                         throw new Error("initializeWasm() must be awaited first!");
12239                 }
12240                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
12241                 // debug statements here
12242         }
12243         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12244         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
12245                 if(!isWasmInitialized) {
12246                         throw new Error("initializeWasm() must be awaited first!");
12247                 }
12248                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
12249                 return nativeResponseValue;
12250         }
12251         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
12252         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
12253                 if(!isWasmInitialized) {
12254                         throw new Error("initializeWasm() must be awaited first!");
12255                 }
12256                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
12257                 // debug statements here
12258         }
12259         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12260         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
12261                 if(!isWasmInitialized) {
12262                         throw new Error("initializeWasm() must be awaited first!");
12263                 }
12264                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
12265                 return nativeResponseValue;
12266         }
12267         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
12268         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
12269                 if(!isWasmInitialized) {
12270                         throw new Error("initializeWasm() must be awaited first!");
12271                 }
12272                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
12273                 // debug statements here
12274         }
12275         // 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);
12276         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 {
12277                 if(!isWasmInitialized) {
12278                         throw new Error("initializeWasm() must be awaited first!");
12279                 }
12280                 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
12281                 return nativeResponseValue;
12282         }
12283         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
12284         export function ChannelTransactionParameters_clone(orig: number): number {
12285                 if(!isWasmInitialized) {
12286                         throw new Error("initializeWasm() must be awaited first!");
12287                 }
12288                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
12289                 return nativeResponseValue;
12290         }
12291         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
12292         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
12293                 if(!isWasmInitialized) {
12294                         throw new Error("initializeWasm() must be awaited first!");
12295                 }
12296                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
12297                 // debug statements here
12298         }
12299         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
12300         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
12301                 if(!isWasmInitialized) {
12302                         throw new Error("initializeWasm() must be awaited first!");
12303                 }
12304                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
12305                 return nativeResponseValue;
12306         }
12307         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
12308         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
12309                 if(!isWasmInitialized) {
12310                         throw new Error("initializeWasm() must be awaited first!");
12311                 }
12312                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
12313                 // debug statements here
12314         }
12315         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
12316         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
12317                 if(!isWasmInitialized) {
12318                         throw new Error("initializeWasm() must be awaited first!");
12319                 }
12320                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
12321                 return nativeResponseValue;
12322         }
12323         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
12324         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
12325                 if(!isWasmInitialized) {
12326                         throw new Error("initializeWasm() must be awaited first!");
12327                 }
12328                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
12329                 // debug statements here
12330         }
12331         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
12332         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
12333                 if(!isWasmInitialized) {
12334                         throw new Error("initializeWasm() must be awaited first!");
12335                 }
12336                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
12337                 return nativeResponseValue;
12338         }
12339         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
12340         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
12341                 if(!isWasmInitialized) {
12342                         throw new Error("initializeWasm() must be awaited first!");
12343                 }
12344                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
12345                 return nativeResponseValue;
12346         }
12347         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
12348         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
12349                 if(!isWasmInitialized) {
12350                         throw new Error("initializeWasm() must be awaited first!");
12351                 }
12352                 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
12353                 return nativeResponseValue;
12354         }
12355         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
12356         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
12357                 if(!isWasmInitialized) {
12358                         throw new Error("initializeWasm() must be awaited first!");
12359                 }
12360                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
12361                 return nativeResponseValue;
12362         }
12363         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
12364         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
12365                 if(!isWasmInitialized) {
12366                         throw new Error("initializeWasm() must be awaited first!");
12367                 }
12368                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
12369                 return nativeResponseValue;
12370         }
12371         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
12372         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
12373                 if(!isWasmInitialized) {
12374                         throw new Error("initializeWasm() must be awaited first!");
12375                 }
12376                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
12377                 return decodeArray(nativeResponseValue);
12378         }
12379         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
12380         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
12381                 if(!isWasmInitialized) {
12382                         throw new Error("initializeWasm() must be awaited first!");
12383                 }
12384                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
12385                 return nativeResponseValue;
12386         }
12387         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
12388         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
12389                 if(!isWasmInitialized) {
12390                         throw new Error("initializeWasm() must be awaited first!");
12391                 }
12392                 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
12393                 return decodeArray(nativeResponseValue);
12394         }
12395         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
12396         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
12397                 if(!isWasmInitialized) {
12398                         throw new Error("initializeWasm() must be awaited first!");
12399                 }
12400                 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
12401                 return nativeResponseValue;
12402         }
12403         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
12404         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
12405                 if(!isWasmInitialized) {
12406                         throw new Error("initializeWasm() must be awaited first!");
12407                 }
12408                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
12409                 // debug statements here
12410         }
12411         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12412         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
12413                 if(!isWasmInitialized) {
12414                         throw new Error("initializeWasm() must be awaited first!");
12415                 }
12416                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
12417                 return nativeResponseValue;
12418         }
12419         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12420         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
12421                 if(!isWasmInitialized) {
12422                         throw new Error("initializeWasm() must be awaited first!");
12423                 }
12424                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
12425                 return nativeResponseValue;
12426         }
12427         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12428         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
12429                 if(!isWasmInitialized) {
12430                         throw new Error("initializeWasm() must be awaited first!");
12431                 }
12432                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
12433                 return nativeResponseValue;
12434         }
12435         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12436         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
12437                 if(!isWasmInitialized) {
12438                         throw new Error("initializeWasm() must be awaited first!");
12439                 }
12440                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
12441                 return nativeResponseValue;
12442         }
12443         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12444         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
12445                 if(!isWasmInitialized) {
12446                         throw new Error("initializeWasm() must be awaited first!");
12447                 }
12448                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
12449                 return nativeResponseValue;
12450         }
12451         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
12452         export function HolderCommitmentTransaction_free(this_obj: number): void {
12453                 if(!isWasmInitialized) {
12454                         throw new Error("initializeWasm() must be awaited first!");
12455                 }
12456                 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
12457                 // debug statements here
12458         }
12459         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
12460         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
12461                 if(!isWasmInitialized) {
12462                         throw new Error("initializeWasm() must be awaited first!");
12463                 }
12464                 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
12465                 return decodeArray(nativeResponseValue);
12466         }
12467         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
12468         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
12469                 if(!isWasmInitialized) {
12470                         throw new Error("initializeWasm() must be awaited first!");
12471                 }
12472                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
12473                 // debug statements here
12474         }
12475         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
12476         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
12477                 if(!isWasmInitialized) {
12478                         throw new Error("initializeWasm() must be awaited first!");
12479                 }
12480                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
12481                 // debug statements here
12482         }
12483         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
12484         export function HolderCommitmentTransaction_clone(orig: number): number {
12485                 if(!isWasmInitialized) {
12486                         throw new Error("initializeWasm() must be awaited first!");
12487                 }
12488                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
12489                 return nativeResponseValue;
12490         }
12491         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
12492         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
12493                 if(!isWasmInitialized) {
12494                         throw new Error("initializeWasm() must be awaited first!");
12495                 }
12496                 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
12497                 return decodeArray(nativeResponseValue);
12498         }
12499         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
12500         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
12501                 if(!isWasmInitialized) {
12502                         throw new Error("initializeWasm() must be awaited first!");
12503                 }
12504                 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
12505                 return nativeResponseValue;
12506         }
12507         // 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);
12508         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
12509                 if(!isWasmInitialized) {
12510                         throw new Error("initializeWasm() must be awaited first!");
12511                 }
12512                 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
12513                 return nativeResponseValue;
12514         }
12515         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
12516         export function BuiltCommitmentTransaction_free(this_obj: number): void {
12517                 if(!isWasmInitialized) {
12518                         throw new Error("initializeWasm() must be awaited first!");
12519                 }
12520                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
12521                 // debug statements here
12522         }
12523         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
12524         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
12525                 if(!isWasmInitialized) {
12526                         throw new Error("initializeWasm() must be awaited first!");
12527                 }
12528                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
12529                 return decodeArray(nativeResponseValue);
12530         }
12531         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
12532         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
12533                 if(!isWasmInitialized) {
12534                         throw new Error("initializeWasm() must be awaited first!");
12535                 }
12536                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
12537                 // debug statements here
12538         }
12539         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
12540         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
12541                 if(!isWasmInitialized) {
12542                         throw new Error("initializeWasm() must be awaited first!");
12543                 }
12544                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
12545                 return decodeArray(nativeResponseValue);
12546         }
12547         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12548         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
12549                 if(!isWasmInitialized) {
12550                         throw new Error("initializeWasm() must be awaited first!");
12551                 }
12552                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
12553                 // debug statements here
12554         }
12555         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
12556         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
12557                 if(!isWasmInitialized) {
12558                         throw new Error("initializeWasm() must be awaited first!");
12559                 }
12560                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
12561                 return nativeResponseValue;
12562         }
12563         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
12564         export function BuiltCommitmentTransaction_clone(orig: number): number {
12565                 if(!isWasmInitialized) {
12566                         throw new Error("initializeWasm() must be awaited first!");
12567                 }
12568                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
12569                 return nativeResponseValue;
12570         }
12571         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
12572         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
12573                 if(!isWasmInitialized) {
12574                         throw new Error("initializeWasm() must be awaited first!");
12575                 }
12576                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
12577                 return decodeArray(nativeResponseValue);
12578         }
12579         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
12580         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
12581                 if(!isWasmInitialized) {
12582                         throw new Error("initializeWasm() must be awaited first!");
12583                 }
12584                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
12585                 return nativeResponseValue;
12586         }
12587         // 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);
12588         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
12589                 if(!isWasmInitialized) {
12590                         throw new Error("initializeWasm() must be awaited first!");
12591                 }
12592                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
12593                 return decodeArray(nativeResponseValue);
12594         }
12595         // 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);
12596         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
12597                 if(!isWasmInitialized) {
12598                         throw new Error("initializeWasm() must be awaited first!");
12599                 }
12600                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
12601                 return decodeArray(nativeResponseValue);
12602         }
12603         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
12604         export function CommitmentTransaction_free(this_obj: number): void {
12605                 if(!isWasmInitialized) {
12606                         throw new Error("initializeWasm() must be awaited first!");
12607                 }
12608                 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
12609                 // debug statements here
12610         }
12611         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
12612         export function CommitmentTransaction_clone(orig: number): number {
12613                 if(!isWasmInitialized) {
12614                         throw new Error("initializeWasm() must be awaited first!");
12615                 }
12616                 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
12617                 return nativeResponseValue;
12618         }
12619         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
12620         export function CommitmentTransaction_write(obj: number): Uint8Array {
12621                 if(!isWasmInitialized) {
12622                         throw new Error("initializeWasm() must be awaited first!");
12623                 }
12624                 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
12625                 return decodeArray(nativeResponseValue);
12626         }
12627         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
12628         export function CommitmentTransaction_read(ser: Uint8Array): number {
12629                 if(!isWasmInitialized) {
12630                         throw new Error("initializeWasm() must be awaited first!");
12631                 }
12632                 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
12633                 return nativeResponseValue;
12634         }
12635         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12636         export function CommitmentTransaction_commitment_number(this_arg: number): number {
12637                 if(!isWasmInitialized) {
12638                         throw new Error("initializeWasm() must be awaited first!");
12639                 }
12640                 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
12641                 return nativeResponseValue;
12642         }
12643         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12644         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
12645                 if(!isWasmInitialized) {
12646                         throw new Error("initializeWasm() must be awaited first!");
12647                 }
12648                 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
12649                 return nativeResponseValue;
12650         }
12651         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12652         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
12653                 if(!isWasmInitialized) {
12654                         throw new Error("initializeWasm() must be awaited first!");
12655                 }
12656                 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
12657                 return nativeResponseValue;
12658         }
12659         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12660         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
12661                 if(!isWasmInitialized) {
12662                         throw new Error("initializeWasm() must be awaited first!");
12663                 }
12664                 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
12665                 return nativeResponseValue;
12666         }
12667         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12668         export function CommitmentTransaction_trust(this_arg: number): number {
12669                 if(!isWasmInitialized) {
12670                         throw new Error("initializeWasm() must be awaited first!");
12671                 }
12672                 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
12673                 return nativeResponseValue;
12674         }
12675         // 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);
12676         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
12677                 if(!isWasmInitialized) {
12678                         throw new Error("initializeWasm() must be awaited first!");
12679                 }
12680                 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
12681                 return nativeResponseValue;
12682         }
12683         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
12684         export function TrustedCommitmentTransaction_free(this_obj: number): void {
12685                 if(!isWasmInitialized) {
12686                         throw new Error("initializeWasm() must be awaited first!");
12687                 }
12688                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
12689                 // debug statements here
12690         }
12691         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
12692         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
12693                 if(!isWasmInitialized) {
12694                         throw new Error("initializeWasm() must be awaited first!");
12695                 }
12696                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
12697                 return decodeArray(nativeResponseValue);
12698         }
12699         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
12700         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
12701                 if(!isWasmInitialized) {
12702                         throw new Error("initializeWasm() must be awaited first!");
12703                 }
12704                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
12705                 return nativeResponseValue;
12706         }
12707         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
12708         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
12709                 if(!isWasmInitialized) {
12710                         throw new Error("initializeWasm() must be awaited first!");
12711                 }
12712                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
12713                 return nativeResponseValue;
12714         }
12715         // 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);
12716         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
12717                 if(!isWasmInitialized) {
12718                         throw new Error("initializeWasm() must be awaited first!");
12719                 }
12720                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
12721                 return nativeResponseValue;
12722         }
12723         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
12724         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
12725                 if(!isWasmInitialized) {
12726                         throw new Error("initializeWasm() must be awaited first!");
12727                 }
12728                 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
12729                 return nativeResponseValue;
12730         }
12731         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
12732         export function InitFeatures_eq(a: number, b: number): boolean {
12733                 if(!isWasmInitialized) {
12734                         throw new Error("initializeWasm() must be awaited first!");
12735                 }
12736                 const nativeResponseValue = wasm.InitFeatures_eq(a, b);
12737                 return nativeResponseValue;
12738         }
12739         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
12740         export function NodeFeatures_eq(a: number, b: number): boolean {
12741                 if(!isWasmInitialized) {
12742                         throw new Error("initializeWasm() must be awaited first!");
12743                 }
12744                 const nativeResponseValue = wasm.NodeFeatures_eq(a, b);
12745                 return nativeResponseValue;
12746         }
12747         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
12748         export function ChannelFeatures_eq(a: number, b: number): boolean {
12749                 if(!isWasmInitialized) {
12750                         throw new Error("initializeWasm() must be awaited first!");
12751                 }
12752                 const nativeResponseValue = wasm.ChannelFeatures_eq(a, b);
12753                 return nativeResponseValue;
12754         }
12755         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
12756         export function InvoiceFeatures_eq(a: number, b: number): boolean {
12757                 if(!isWasmInitialized) {
12758                         throw new Error("initializeWasm() must be awaited first!");
12759                 }
12760                 const nativeResponseValue = wasm.InvoiceFeatures_eq(a, b);
12761                 return nativeResponseValue;
12762         }
12763         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
12764         export function InitFeatures_clone(orig: number): number {
12765                 if(!isWasmInitialized) {
12766                         throw new Error("initializeWasm() must be awaited first!");
12767                 }
12768                 const nativeResponseValue = wasm.InitFeatures_clone(orig);
12769                 return nativeResponseValue;
12770         }
12771         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
12772         export function NodeFeatures_clone(orig: number): number {
12773                 if(!isWasmInitialized) {
12774                         throw new Error("initializeWasm() must be awaited first!");
12775                 }
12776                 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
12777                 return nativeResponseValue;
12778         }
12779         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
12780         export function ChannelFeatures_clone(orig: number): number {
12781                 if(!isWasmInitialized) {
12782                         throw new Error("initializeWasm() must be awaited first!");
12783                 }
12784                 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
12785                 return nativeResponseValue;
12786         }
12787         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
12788         export function InvoiceFeatures_clone(orig: number): number {
12789                 if(!isWasmInitialized) {
12790                         throw new Error("initializeWasm() must be awaited first!");
12791                 }
12792                 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
12793                 return nativeResponseValue;
12794         }
12795         // void InitFeatures_free(struct LDKInitFeatures this_obj);
12796         export function InitFeatures_free(this_obj: number): void {
12797                 if(!isWasmInitialized) {
12798                         throw new Error("initializeWasm() must be awaited first!");
12799                 }
12800                 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
12801                 // debug statements here
12802         }
12803         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
12804         export function NodeFeatures_free(this_obj: number): void {
12805                 if(!isWasmInitialized) {
12806                         throw new Error("initializeWasm() must be awaited first!");
12807                 }
12808                 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
12809                 // debug statements here
12810         }
12811         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
12812         export function ChannelFeatures_free(this_obj: number): void {
12813                 if(!isWasmInitialized) {
12814                         throw new Error("initializeWasm() must be awaited first!");
12815                 }
12816                 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
12817                 // debug statements here
12818         }
12819         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
12820         export function InvoiceFeatures_free(this_obj: number): void {
12821                 if(!isWasmInitialized) {
12822                         throw new Error("initializeWasm() must be awaited first!");
12823                 }
12824                 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
12825                 // debug statements here
12826         }
12827         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
12828         export function InitFeatures_empty(): number {
12829                 if(!isWasmInitialized) {
12830                         throw new Error("initializeWasm() must be awaited first!");
12831                 }
12832                 const nativeResponseValue = wasm.InitFeatures_empty();
12833                 return nativeResponseValue;
12834         }
12835         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
12836         export function InitFeatures_known(): number {
12837                 if(!isWasmInitialized) {
12838                         throw new Error("initializeWasm() must be awaited first!");
12839                 }
12840                 const nativeResponseValue = wasm.InitFeatures_known();
12841                 return nativeResponseValue;
12842         }
12843         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
12844         export function NodeFeatures_empty(): number {
12845                 if(!isWasmInitialized) {
12846                         throw new Error("initializeWasm() must be awaited first!");
12847                 }
12848                 const nativeResponseValue = wasm.NodeFeatures_empty();
12849                 return nativeResponseValue;
12850         }
12851         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
12852         export function NodeFeatures_known(): number {
12853                 if(!isWasmInitialized) {
12854                         throw new Error("initializeWasm() must be awaited first!");
12855                 }
12856                 const nativeResponseValue = wasm.NodeFeatures_known();
12857                 return nativeResponseValue;
12858         }
12859         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
12860         export function ChannelFeatures_empty(): number {
12861                 if(!isWasmInitialized) {
12862                         throw new Error("initializeWasm() must be awaited first!");
12863                 }
12864                 const nativeResponseValue = wasm.ChannelFeatures_empty();
12865                 return nativeResponseValue;
12866         }
12867         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
12868         export function ChannelFeatures_known(): number {
12869                 if(!isWasmInitialized) {
12870                         throw new Error("initializeWasm() must be awaited first!");
12871                 }
12872                 const nativeResponseValue = wasm.ChannelFeatures_known();
12873                 return nativeResponseValue;
12874         }
12875         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
12876         export function InvoiceFeatures_empty(): number {
12877                 if(!isWasmInitialized) {
12878                         throw new Error("initializeWasm() must be awaited first!");
12879                 }
12880                 const nativeResponseValue = wasm.InvoiceFeatures_empty();
12881                 return nativeResponseValue;
12882         }
12883         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
12884         export function InvoiceFeatures_known(): number {
12885                 if(!isWasmInitialized) {
12886                         throw new Error("initializeWasm() must be awaited first!");
12887                 }
12888                 const nativeResponseValue = wasm.InvoiceFeatures_known();
12889                 return nativeResponseValue;
12890         }
12891         // MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg);
12892         export function InitFeatures_supports_payment_secret(this_arg: number): boolean {
12893                 if(!isWasmInitialized) {
12894                         throw new Error("initializeWasm() must be awaited first!");
12895                 }
12896                 const nativeResponseValue = wasm.InitFeatures_supports_payment_secret(this_arg);
12897                 return nativeResponseValue;
12898         }
12899         // MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
12900         export function NodeFeatures_supports_payment_secret(this_arg: number): boolean {
12901                 if(!isWasmInitialized) {
12902                         throw new Error("initializeWasm() must be awaited first!");
12903                 }
12904                 const nativeResponseValue = wasm.NodeFeatures_supports_payment_secret(this_arg);
12905                 return nativeResponseValue;
12906         }
12907         // MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
12908         export function InvoiceFeatures_supports_payment_secret(this_arg: number): boolean {
12909                 if(!isWasmInitialized) {
12910                         throw new Error("initializeWasm() must be awaited first!");
12911                 }
12912                 const nativeResponseValue = wasm.InvoiceFeatures_supports_payment_secret(this_arg);
12913                 return nativeResponseValue;
12914         }
12915         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
12916         export function InitFeatures_write(obj: number): Uint8Array {
12917                 if(!isWasmInitialized) {
12918                         throw new Error("initializeWasm() must be awaited first!");
12919                 }
12920                 const nativeResponseValue = wasm.InitFeatures_write(obj);
12921                 return decodeArray(nativeResponseValue);
12922         }
12923         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
12924         export function NodeFeatures_write(obj: number): Uint8Array {
12925                 if(!isWasmInitialized) {
12926                         throw new Error("initializeWasm() must be awaited first!");
12927                 }
12928                 const nativeResponseValue = wasm.NodeFeatures_write(obj);
12929                 return decodeArray(nativeResponseValue);
12930         }
12931         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
12932         export function ChannelFeatures_write(obj: number): Uint8Array {
12933                 if(!isWasmInitialized) {
12934                         throw new Error("initializeWasm() must be awaited first!");
12935                 }
12936                 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
12937                 return decodeArray(nativeResponseValue);
12938         }
12939         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
12940         export function InvoiceFeatures_write(obj: number): Uint8Array {
12941                 if(!isWasmInitialized) {
12942                         throw new Error("initializeWasm() must be awaited first!");
12943                 }
12944                 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
12945                 return decodeArray(nativeResponseValue);
12946         }
12947         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
12948         export function InitFeatures_read(ser: Uint8Array): number {
12949                 if(!isWasmInitialized) {
12950                         throw new Error("initializeWasm() must be awaited first!");
12951                 }
12952                 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
12953                 return nativeResponseValue;
12954         }
12955         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
12956         export function NodeFeatures_read(ser: Uint8Array): number {
12957                 if(!isWasmInitialized) {
12958                         throw new Error("initializeWasm() must be awaited first!");
12959                 }
12960                 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
12961                 return nativeResponseValue;
12962         }
12963         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
12964         export function ChannelFeatures_read(ser: Uint8Array): number {
12965                 if(!isWasmInitialized) {
12966                         throw new Error("initializeWasm() must be awaited first!");
12967                 }
12968                 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
12969                 return nativeResponseValue;
12970         }
12971         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
12972         export function InvoiceFeatures_read(ser: Uint8Array): number {
12973                 if(!isWasmInitialized) {
12974                         throw new Error("initializeWasm() must be awaited first!");
12975                 }
12976                 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
12977                 return nativeResponseValue;
12978         }
12979         // void RouteHop_free(struct LDKRouteHop this_obj);
12980         export function RouteHop_free(this_obj: number): void {
12981                 if(!isWasmInitialized) {
12982                         throw new Error("initializeWasm() must be awaited first!");
12983                 }
12984                 const nativeResponseValue = wasm.RouteHop_free(this_obj);
12985                 // debug statements here
12986         }
12987         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
12988         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
12989                 if(!isWasmInitialized) {
12990                         throw new Error("initializeWasm() must be awaited first!");
12991                 }
12992                 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
12993                 return decodeArray(nativeResponseValue);
12994         }
12995         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12996         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
12997                 if(!isWasmInitialized) {
12998                         throw new Error("initializeWasm() must be awaited first!");
12999                 }
13000                 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
13001                 // debug statements here
13002         }
13003         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13004         export function RouteHop_get_node_features(this_ptr: number): number {
13005                 if(!isWasmInitialized) {
13006                         throw new Error("initializeWasm() must be awaited first!");
13007                 }
13008                 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
13009                 return nativeResponseValue;
13010         }
13011         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
13012         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
13013                 if(!isWasmInitialized) {
13014                         throw new Error("initializeWasm() must be awaited first!");
13015                 }
13016                 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
13017                 // debug statements here
13018         }
13019         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13020         export function RouteHop_get_short_channel_id(this_ptr: number): number {
13021                 if(!isWasmInitialized) {
13022                         throw new Error("initializeWasm() must be awaited first!");
13023                 }
13024                 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
13025                 return nativeResponseValue;
13026         }
13027         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
13028         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
13029                 if(!isWasmInitialized) {
13030                         throw new Error("initializeWasm() must be awaited first!");
13031                 }
13032                 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
13033                 // debug statements here
13034         }
13035         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13036         export function RouteHop_get_channel_features(this_ptr: number): number {
13037                 if(!isWasmInitialized) {
13038                         throw new Error("initializeWasm() must be awaited first!");
13039                 }
13040                 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
13041                 return nativeResponseValue;
13042         }
13043         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
13044         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
13045                 if(!isWasmInitialized) {
13046                         throw new Error("initializeWasm() must be awaited first!");
13047                 }
13048                 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
13049                 // debug statements here
13050         }
13051         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13052         export function RouteHop_get_fee_msat(this_ptr: number): number {
13053                 if(!isWasmInitialized) {
13054                         throw new Error("initializeWasm() must be awaited first!");
13055                 }
13056                 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
13057                 return nativeResponseValue;
13058         }
13059         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
13060         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
13061                 if(!isWasmInitialized) {
13062                         throw new Error("initializeWasm() must be awaited first!");
13063                 }
13064                 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
13065                 // debug statements here
13066         }
13067         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13068         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
13069                 if(!isWasmInitialized) {
13070                         throw new Error("initializeWasm() must be awaited first!");
13071                 }
13072                 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
13073                 return nativeResponseValue;
13074         }
13075         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
13076         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13077                 if(!isWasmInitialized) {
13078                         throw new Error("initializeWasm() must be awaited first!");
13079                 }
13080                 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
13081                 // debug statements here
13082         }
13083         // 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);
13084         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 {
13085                 if(!isWasmInitialized) {
13086                         throw new Error("initializeWasm() must be awaited first!");
13087                 }
13088                 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);
13089                 return nativeResponseValue;
13090         }
13091         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
13092         export function RouteHop_clone(orig: number): number {
13093                 if(!isWasmInitialized) {
13094                         throw new Error("initializeWasm() must be awaited first!");
13095                 }
13096                 const nativeResponseValue = wasm.RouteHop_clone(orig);
13097                 return nativeResponseValue;
13098         }
13099         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
13100         export function RouteHop_write(obj: number): Uint8Array {
13101                 if(!isWasmInitialized) {
13102                         throw new Error("initializeWasm() must be awaited first!");
13103                 }
13104                 const nativeResponseValue = wasm.RouteHop_write(obj);
13105                 return decodeArray(nativeResponseValue);
13106         }
13107         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
13108         export function RouteHop_read(ser: Uint8Array): number {
13109                 if(!isWasmInitialized) {
13110                         throw new Error("initializeWasm() must be awaited first!");
13111                 }
13112                 const nativeResponseValue = wasm.RouteHop_read(encodeArray(ser));
13113                 return nativeResponseValue;
13114         }
13115         // void Route_free(struct LDKRoute this_obj);
13116         export function Route_free(this_obj: number): void {
13117                 if(!isWasmInitialized) {
13118                         throw new Error("initializeWasm() must be awaited first!");
13119                 }
13120                 const nativeResponseValue = wasm.Route_free(this_obj);
13121                 // debug statements here
13122         }
13123         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
13124         export function Route_set_paths(this_ptr: number, val: number[][]): void {
13125                 if(!isWasmInitialized) {
13126                         throw new Error("initializeWasm() must be awaited first!");
13127                 }
13128                 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
13129                 // debug statements here
13130         }
13131         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
13132         export function Route_new(paths_arg: number[][]): number {
13133                 if(!isWasmInitialized) {
13134                         throw new Error("initializeWasm() must be awaited first!");
13135                 }
13136                 const nativeResponseValue = wasm.Route_new(paths_arg);
13137                 return nativeResponseValue;
13138         }
13139         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
13140         export function Route_clone(orig: number): number {
13141                 if(!isWasmInitialized) {
13142                         throw new Error("initializeWasm() must be awaited first!");
13143                 }
13144                 const nativeResponseValue = wasm.Route_clone(orig);
13145                 return nativeResponseValue;
13146         }
13147         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
13148         export function Route_write(obj: number): Uint8Array {
13149                 if(!isWasmInitialized) {
13150                         throw new Error("initializeWasm() must be awaited first!");
13151                 }
13152                 const nativeResponseValue = wasm.Route_write(obj);
13153                 return decodeArray(nativeResponseValue);
13154         }
13155         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
13156         export function Route_read(ser: Uint8Array): number {
13157                 if(!isWasmInitialized) {
13158                         throw new Error("initializeWasm() must be awaited first!");
13159                 }
13160                 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
13161                 return nativeResponseValue;
13162         }
13163         // void RouteHint_free(struct LDKRouteHint this_obj);
13164         export function RouteHint_free(this_obj: number): void {
13165                 if(!isWasmInitialized) {
13166                         throw new Error("initializeWasm() must be awaited first!");
13167                 }
13168                 const nativeResponseValue = wasm.RouteHint_free(this_obj);
13169                 // debug statements here
13170         }
13171         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
13172         export function RouteHint_eq(a: number, b: number): boolean {
13173                 if(!isWasmInitialized) {
13174                         throw new Error("initializeWasm() must be awaited first!");
13175                 }
13176                 const nativeResponseValue = wasm.RouteHint_eq(a, b);
13177                 return nativeResponseValue;
13178         }
13179         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
13180         export function RouteHint_clone(orig: number): number {
13181                 if(!isWasmInitialized) {
13182                         throw new Error("initializeWasm() must be awaited first!");
13183                 }
13184                 const nativeResponseValue = wasm.RouteHint_clone(orig);
13185                 return nativeResponseValue;
13186         }
13187         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
13188         export function RouteHintHop_free(this_obj: number): void {
13189                 if(!isWasmInitialized) {
13190                         throw new Error("initializeWasm() must be awaited first!");
13191                 }
13192                 const nativeResponseValue = wasm.RouteHintHop_free(this_obj);
13193                 // debug statements here
13194         }
13195         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13196         export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
13197                 if(!isWasmInitialized) {
13198                         throw new Error("initializeWasm() must be awaited first!");
13199                 }
13200                 const nativeResponseValue = wasm.RouteHintHop_get_src_node_id(this_ptr);
13201                 return decodeArray(nativeResponseValue);
13202         }
13203         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13204         export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
13205                 if(!isWasmInitialized) {
13206                         throw new Error("initializeWasm() must be awaited first!");
13207                 }
13208                 const nativeResponseValue = wasm.RouteHintHop_set_src_node_id(this_ptr, encodeArray(val));
13209                 // debug statements here
13210         }
13211         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13212         export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
13213                 if(!isWasmInitialized) {
13214                         throw new Error("initializeWasm() must be awaited first!");
13215                 }
13216                 const nativeResponseValue = wasm.RouteHintHop_get_short_channel_id(this_ptr);
13217                 return nativeResponseValue;
13218         }
13219         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
13220         export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
13221                 if(!isWasmInitialized) {
13222                         throw new Error("initializeWasm() must be awaited first!");
13223                 }
13224                 const nativeResponseValue = wasm.RouteHintHop_set_short_channel_id(this_ptr, val);
13225                 // debug statements here
13226         }
13227         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13228         export function RouteHintHop_get_fees(this_ptr: number): number {
13229                 if(!isWasmInitialized) {
13230                         throw new Error("initializeWasm() must be awaited first!");
13231                 }
13232                 const nativeResponseValue = wasm.RouteHintHop_get_fees(this_ptr);
13233                 return nativeResponseValue;
13234         }
13235         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
13236         export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
13237                 if(!isWasmInitialized) {
13238                         throw new Error("initializeWasm() must be awaited first!");
13239                 }
13240                 const nativeResponseValue = wasm.RouteHintHop_set_fees(this_ptr, val);
13241                 // debug statements here
13242         }
13243         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13244         export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
13245                 if(!isWasmInitialized) {
13246                         throw new Error("initializeWasm() must be awaited first!");
13247                 }
13248                 const nativeResponseValue = wasm.RouteHintHop_get_cltv_expiry_delta(this_ptr);
13249                 return nativeResponseValue;
13250         }
13251         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
13252         export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13253                 if(!isWasmInitialized) {
13254                         throw new Error("initializeWasm() must be awaited first!");
13255                 }
13256                 const nativeResponseValue = wasm.RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
13257                 // debug statements here
13258         }
13259         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13260         export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
13261                 if(!isWasmInitialized) {
13262                         throw new Error("initializeWasm() must be awaited first!");
13263                 }
13264                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_minimum_msat(this_ptr);
13265                 return nativeResponseValue;
13266         }
13267         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13268         export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
13269                 if(!isWasmInitialized) {
13270                         throw new Error("initializeWasm() must be awaited first!");
13271                 }
13272                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
13273                 // debug statements here
13274         }
13275         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13276         export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
13277                 if(!isWasmInitialized) {
13278                         throw new Error("initializeWasm() must be awaited first!");
13279                 }
13280                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_maximum_msat(this_ptr);
13281                 return nativeResponseValue;
13282         }
13283         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13284         export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
13285                 if(!isWasmInitialized) {
13286                         throw new Error("initializeWasm() must be awaited first!");
13287                 }
13288                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
13289                 // debug statements here
13290         }
13291         // 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);
13292         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 {
13293                 if(!isWasmInitialized) {
13294                         throw new Error("initializeWasm() must be awaited first!");
13295                 }
13296                 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);
13297                 return nativeResponseValue;
13298         }
13299         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
13300         export function RouteHintHop_eq(a: number, b: number): boolean {
13301                 if(!isWasmInitialized) {
13302                         throw new Error("initializeWasm() must be awaited first!");
13303                 }
13304                 const nativeResponseValue = wasm.RouteHintHop_eq(a, b);
13305                 return nativeResponseValue;
13306         }
13307         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
13308         export function RouteHintHop_clone(orig: number): number {
13309                 if(!isWasmInitialized) {
13310                         throw new Error("initializeWasm() must be awaited first!");
13311                 }
13312                 const nativeResponseValue = wasm.RouteHintHop_clone(orig);
13313                 return nativeResponseValue;
13314         }
13315         // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
13316         export function get_route(our_node_id: Uint8Array, network: number, payee: Uint8Array, payee_features: number, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
13317                 if(!isWasmInitialized) {
13318                         throw new Error("initializeWasm() must be awaited first!");
13319                 }
13320                 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger);
13321                 return nativeResponseValue;
13322         }
13323         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
13324         export function NetworkGraph_free(this_obj: number): void {
13325                 if(!isWasmInitialized) {
13326                         throw new Error("initializeWasm() must be awaited first!");
13327                 }
13328                 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
13329                 // debug statements here
13330         }
13331         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
13332         export function NetworkGraph_clone(orig: number): number {
13333                 if(!isWasmInitialized) {
13334                         throw new Error("initializeWasm() must be awaited first!");
13335                 }
13336                 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
13337                 return nativeResponseValue;
13338         }
13339         // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_obj);
13340         export function LockedNetworkGraph_free(this_obj: number): void {
13341                 if(!isWasmInitialized) {
13342                         throw new Error("initializeWasm() must be awaited first!");
13343                 }
13344                 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_obj);
13345                 // debug statements here
13346         }
13347         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
13348         export function NetGraphMsgHandler_free(this_obj: number): void {
13349                 if(!isWasmInitialized) {
13350                         throw new Error("initializeWasm() must be awaited first!");
13351                 }
13352                 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
13353                 // debug statements here
13354         }
13355         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
13356         export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
13357                 if(!isWasmInitialized) {
13358                         throw new Error("initializeWasm() must be awaited first!");
13359                 }
13360                 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
13361                 return nativeResponseValue;
13362         }
13363         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
13364         export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
13365                 if(!isWasmInitialized) {
13366                         throw new Error("initializeWasm() must be awaited first!");
13367                 }
13368                 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
13369                 return nativeResponseValue;
13370         }
13371         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
13372         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
13373                 if(!isWasmInitialized) {
13374                         throw new Error("initializeWasm() must be awaited first!");
13375                 }
13376                 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
13377                 // debug statements here
13378         }
13379         // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
13380         export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
13381                 if(!isWasmInitialized) {
13382                         throw new Error("initializeWasm() must be awaited first!");
13383                 }
13384                 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
13385                 return nativeResponseValue;
13386         }
13387         // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
13388         export function LockedNetworkGraph_graph(this_arg: number): number {
13389                 if(!isWasmInitialized) {
13390                         throw new Error("initializeWasm() must be awaited first!");
13391                 }
13392                 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
13393                 return nativeResponseValue;
13394         }
13395         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
13396         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
13397                 if(!isWasmInitialized) {
13398                         throw new Error("initializeWasm() must be awaited first!");
13399                 }
13400                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
13401                 return nativeResponseValue;
13402         }
13403         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
13404         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
13405                 if(!isWasmInitialized) {
13406                         throw new Error("initializeWasm() must be awaited first!");
13407                 }
13408                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
13409                 return nativeResponseValue;
13410         }
13411         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
13412         export function DirectionalChannelInfo_free(this_obj: number): void {
13413                 if(!isWasmInitialized) {
13414                         throw new Error("initializeWasm() must be awaited first!");
13415                 }
13416                 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
13417                 // debug statements here
13418         }
13419         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13420         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
13421                 if(!isWasmInitialized) {
13422                         throw new Error("initializeWasm() must be awaited first!");
13423                 }
13424                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
13425                 return nativeResponseValue;
13426         }
13427         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
13428         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
13429                 if(!isWasmInitialized) {
13430                         throw new Error("initializeWasm() must be awaited first!");
13431                 }
13432                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
13433                 // debug statements here
13434         }
13435         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13436         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
13437                 if(!isWasmInitialized) {
13438                         throw new Error("initializeWasm() must be awaited first!");
13439                 }
13440                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
13441                 return nativeResponseValue;
13442         }
13443         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
13444         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
13445                 if(!isWasmInitialized) {
13446                         throw new Error("initializeWasm() must be awaited first!");
13447                 }
13448                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
13449                 // debug statements here
13450         }
13451         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13452         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
13453                 if(!isWasmInitialized) {
13454                         throw new Error("initializeWasm() must be awaited first!");
13455                 }
13456                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
13457                 return nativeResponseValue;
13458         }
13459         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
13460         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13461                 if(!isWasmInitialized) {
13462                         throw new Error("initializeWasm() must be awaited first!");
13463                 }
13464                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
13465                 // debug statements here
13466         }
13467         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13468         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
13469                 if(!isWasmInitialized) {
13470                         throw new Error("initializeWasm() must be awaited first!");
13471                 }
13472                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
13473                 return nativeResponseValue;
13474         }
13475         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
13476         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
13477                 if(!isWasmInitialized) {
13478                         throw new Error("initializeWasm() must be awaited first!");
13479                 }
13480                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
13481                 // debug statements here
13482         }
13483         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13484         export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
13485                 if(!isWasmInitialized) {
13486                         throw new Error("initializeWasm() must be awaited first!");
13487                 }
13488                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
13489                 return nativeResponseValue;
13490         }
13491         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13492         export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
13493                 if(!isWasmInitialized) {
13494                         throw new Error("initializeWasm() must be awaited first!");
13495                 }
13496                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
13497                 // debug statements here
13498         }
13499         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13500         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
13501                 if(!isWasmInitialized) {
13502                         throw new Error("initializeWasm() must be awaited first!");
13503                 }
13504                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
13505                 return nativeResponseValue;
13506         }
13507         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
13508         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
13509                 if(!isWasmInitialized) {
13510                         throw new Error("initializeWasm() must be awaited first!");
13511                 }
13512                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
13513                 // debug statements here
13514         }
13515         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13516         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
13517                 if(!isWasmInitialized) {
13518                         throw new Error("initializeWasm() must be awaited first!");
13519                 }
13520                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
13521                 return nativeResponseValue;
13522         }
13523         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
13524         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
13525                 if(!isWasmInitialized) {
13526                         throw new Error("initializeWasm() must be awaited first!");
13527                 }
13528                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
13529                 // debug statements here
13530         }
13531         // 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);
13532         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 {
13533                 if(!isWasmInitialized) {
13534                         throw new Error("initializeWasm() must be awaited first!");
13535                 }
13536                 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);
13537                 return nativeResponseValue;
13538         }
13539         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
13540         export function DirectionalChannelInfo_clone(orig: number): number {
13541                 if(!isWasmInitialized) {
13542                         throw new Error("initializeWasm() must be awaited first!");
13543                 }
13544                 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
13545                 return nativeResponseValue;
13546         }
13547         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
13548         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
13549                 if(!isWasmInitialized) {
13550                         throw new Error("initializeWasm() must be awaited first!");
13551                 }
13552                 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
13553                 return decodeArray(nativeResponseValue);
13554         }
13555         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
13556         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
13557                 if(!isWasmInitialized) {
13558                         throw new Error("initializeWasm() must be awaited first!");
13559                 }
13560                 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
13561                 return nativeResponseValue;
13562         }
13563         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
13564         export function ChannelInfo_free(this_obj: number): void {
13565                 if(!isWasmInitialized) {
13566                         throw new Error("initializeWasm() must be awaited first!");
13567                 }
13568                 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
13569                 // debug statements here
13570         }
13571         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13572         export function ChannelInfo_get_features(this_ptr: number): number {
13573                 if(!isWasmInitialized) {
13574                         throw new Error("initializeWasm() must be awaited first!");
13575                 }
13576                 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
13577                 return nativeResponseValue;
13578         }
13579         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
13580         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
13581                 if(!isWasmInitialized) {
13582                         throw new Error("initializeWasm() must be awaited first!");
13583                 }
13584                 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
13585                 // debug statements here
13586         }
13587         // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13588         export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
13589                 if(!isWasmInitialized) {
13590                         throw new Error("initializeWasm() must be awaited first!");
13591                 }
13592                 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
13593                 return decodeArray(nativeResponseValue);
13594         }
13595         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13596         export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
13597                 if(!isWasmInitialized) {
13598                         throw new Error("initializeWasm() must be awaited first!");
13599                 }
13600                 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
13601                 // debug statements here
13602         }
13603         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13604         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
13605                 if(!isWasmInitialized) {
13606                         throw new Error("initializeWasm() must be awaited first!");
13607                 }
13608                 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
13609                 return nativeResponseValue;
13610         }
13611         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
13612         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
13613                 if(!isWasmInitialized) {
13614                         throw new Error("initializeWasm() must be awaited first!");
13615                 }
13616                 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
13617                 // debug statements here
13618         }
13619         // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13620         export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
13621                 if(!isWasmInitialized) {
13622                         throw new Error("initializeWasm() must be awaited first!");
13623                 }
13624                 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
13625                 return decodeArray(nativeResponseValue);
13626         }
13627         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13628         export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
13629                 if(!isWasmInitialized) {
13630                         throw new Error("initializeWasm() must be awaited first!");
13631                 }
13632                 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
13633                 // debug statements here
13634         }
13635         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13636         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
13637                 if(!isWasmInitialized) {
13638                         throw new Error("initializeWasm() must be awaited first!");
13639                 }
13640                 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
13641                 return nativeResponseValue;
13642         }
13643         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
13644         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
13645                 if(!isWasmInitialized) {
13646                         throw new Error("initializeWasm() must be awaited first!");
13647                 }
13648                 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
13649                 // debug statements here
13650         }
13651         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13652         export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
13653                 if(!isWasmInitialized) {
13654                         throw new Error("initializeWasm() must be awaited first!");
13655                 }
13656                 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
13657                 return nativeResponseValue;
13658         }
13659         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13660         export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
13661                 if(!isWasmInitialized) {
13662                         throw new Error("initializeWasm() must be awaited first!");
13663                 }
13664                 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
13665                 // debug statements here
13666         }
13667         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13668         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
13669                 if(!isWasmInitialized) {
13670                         throw new Error("initializeWasm() must be awaited first!");
13671                 }
13672                 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
13673                 return nativeResponseValue;
13674         }
13675         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
13676         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
13677                 if(!isWasmInitialized) {
13678                         throw new Error("initializeWasm() must be awaited first!");
13679                 }
13680                 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
13681                 // debug statements here
13682         }
13683         // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKPublicKey node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKPublicKey node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
13684         export function ChannelInfo_new(features_arg: number, node_one_arg: Uint8Array, one_to_two_arg: number, node_two_arg: Uint8Array, two_to_one_arg: number, capacity_sats_arg: number, announcement_message_arg: number): number {
13685                 if(!isWasmInitialized) {
13686                         throw new Error("initializeWasm() must be awaited first!");
13687                 }
13688                 const nativeResponseValue = wasm.ChannelInfo_new(features_arg, encodeArray(node_one_arg), one_to_two_arg, encodeArray(node_two_arg), two_to_one_arg, capacity_sats_arg, announcement_message_arg);
13689                 return nativeResponseValue;
13690         }
13691         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
13692         export function ChannelInfo_clone(orig: number): number {
13693                 if(!isWasmInitialized) {
13694                         throw new Error("initializeWasm() must be awaited first!");
13695                 }
13696                 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
13697                 return nativeResponseValue;
13698         }
13699         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
13700         export function ChannelInfo_write(obj: number): Uint8Array {
13701                 if(!isWasmInitialized) {
13702                         throw new Error("initializeWasm() must be awaited first!");
13703                 }
13704                 const nativeResponseValue = wasm.ChannelInfo_write(obj);
13705                 return decodeArray(nativeResponseValue);
13706         }
13707         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
13708         export function ChannelInfo_read(ser: Uint8Array): number {
13709                 if(!isWasmInitialized) {
13710                         throw new Error("initializeWasm() must be awaited first!");
13711                 }
13712                 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
13713                 return nativeResponseValue;
13714         }
13715         // void RoutingFees_free(struct LDKRoutingFees this_obj);
13716         export function RoutingFees_free(this_obj: number): void {
13717                 if(!isWasmInitialized) {
13718                         throw new Error("initializeWasm() must be awaited first!");
13719                 }
13720                 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
13721                 // debug statements here
13722         }
13723         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
13724         export function RoutingFees_get_base_msat(this_ptr: number): number {
13725                 if(!isWasmInitialized) {
13726                         throw new Error("initializeWasm() must be awaited first!");
13727                 }
13728                 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
13729                 return nativeResponseValue;
13730         }
13731         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
13732         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
13733                 if(!isWasmInitialized) {
13734                         throw new Error("initializeWasm() must be awaited first!");
13735                 }
13736                 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
13737                 // debug statements here
13738         }
13739         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
13740         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
13741                 if(!isWasmInitialized) {
13742                         throw new Error("initializeWasm() must be awaited first!");
13743                 }
13744                 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
13745                 return nativeResponseValue;
13746         }
13747         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
13748         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
13749                 if(!isWasmInitialized) {
13750                         throw new Error("initializeWasm() must be awaited first!");
13751                 }
13752                 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
13753                 // debug statements here
13754         }
13755         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
13756         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
13757                 if(!isWasmInitialized) {
13758                         throw new Error("initializeWasm() must be awaited first!");
13759                 }
13760                 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
13761                 return nativeResponseValue;
13762         }
13763         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
13764         export function RoutingFees_eq(a: number, b: number): boolean {
13765                 if(!isWasmInitialized) {
13766                         throw new Error("initializeWasm() must be awaited first!");
13767                 }
13768                 const nativeResponseValue = wasm.RoutingFees_eq(a, b);
13769                 return nativeResponseValue;
13770         }
13771         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
13772         export function RoutingFees_clone(orig: number): number {
13773                 if(!isWasmInitialized) {
13774                         throw new Error("initializeWasm() must be awaited first!");
13775                 }
13776                 const nativeResponseValue = wasm.RoutingFees_clone(orig);
13777                 return nativeResponseValue;
13778         }
13779         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
13780         export function RoutingFees_write(obj: number): Uint8Array {
13781                 if(!isWasmInitialized) {
13782                         throw new Error("initializeWasm() must be awaited first!");
13783                 }
13784                 const nativeResponseValue = wasm.RoutingFees_write(obj);
13785                 return decodeArray(nativeResponseValue);
13786         }
13787         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
13788         export function RoutingFees_read(ser: Uint8Array): number {
13789                 if(!isWasmInitialized) {
13790                         throw new Error("initializeWasm() must be awaited first!");
13791                 }
13792                 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
13793                 return nativeResponseValue;
13794         }
13795         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
13796         export function NodeAnnouncementInfo_free(this_obj: number): void {
13797                 if(!isWasmInitialized) {
13798                         throw new Error("initializeWasm() must be awaited first!");
13799                 }
13800                 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
13801                 // debug statements here
13802         }
13803         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
13804         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
13805                 if(!isWasmInitialized) {
13806                         throw new Error("initializeWasm() must be awaited first!");
13807                 }
13808                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
13809                 return nativeResponseValue;
13810         }
13811         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
13812         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
13813                 if(!isWasmInitialized) {
13814                         throw new Error("initializeWasm() must be awaited first!");
13815                 }
13816                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
13817                 // debug statements here
13818         }
13819         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
13820         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
13821                 if(!isWasmInitialized) {
13822                         throw new Error("initializeWasm() must be awaited first!");
13823                 }
13824                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
13825                 return nativeResponseValue;
13826         }
13827         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
13828         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
13829                 if(!isWasmInitialized) {
13830                         throw new Error("initializeWasm() must be awaited first!");
13831                 }
13832                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
13833                 // debug statements here
13834         }
13835         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
13836         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
13837                 if(!isWasmInitialized) {
13838                         throw new Error("initializeWasm() must be awaited first!");
13839                 }
13840                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
13841                 return decodeArray(nativeResponseValue);
13842         }
13843         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
13844         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
13845                 if(!isWasmInitialized) {
13846                         throw new Error("initializeWasm() must be awaited first!");
13847                 }
13848                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
13849                 // debug statements here
13850         }
13851         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
13852         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
13853                 if(!isWasmInitialized) {
13854                         throw new Error("initializeWasm() must be awaited first!");
13855                 }
13856                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
13857                 return decodeArray(nativeResponseValue);
13858         }
13859         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13860         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
13861                 if(!isWasmInitialized) {
13862                         throw new Error("initializeWasm() must be awaited first!");
13863                 }
13864                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
13865                 // debug statements here
13866         }
13867         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
13868         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
13869                 if(!isWasmInitialized) {
13870                         throw new Error("initializeWasm() must be awaited first!");
13871                 }
13872                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
13873                 // debug statements here
13874         }
13875         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
13876         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
13877                 if(!isWasmInitialized) {
13878                         throw new Error("initializeWasm() must be awaited first!");
13879                 }
13880                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
13881                 return nativeResponseValue;
13882         }
13883         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
13884         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
13885                 if(!isWasmInitialized) {
13886                         throw new Error("initializeWasm() must be awaited first!");
13887                 }
13888                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
13889                 // debug statements here
13890         }
13891         // 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);
13892         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 {
13893                 if(!isWasmInitialized) {
13894                         throw new Error("initializeWasm() must be awaited first!");
13895                 }
13896                 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
13897                 return nativeResponseValue;
13898         }
13899         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
13900         export function NodeAnnouncementInfo_clone(orig: number): number {
13901                 if(!isWasmInitialized) {
13902                         throw new Error("initializeWasm() must be awaited first!");
13903                 }
13904                 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
13905                 return nativeResponseValue;
13906         }
13907         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
13908         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
13909                 if(!isWasmInitialized) {
13910                         throw new Error("initializeWasm() must be awaited first!");
13911                 }
13912                 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
13913                 return decodeArray(nativeResponseValue);
13914         }
13915         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
13916         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
13917                 if(!isWasmInitialized) {
13918                         throw new Error("initializeWasm() must be awaited first!");
13919                 }
13920                 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
13921                 return nativeResponseValue;
13922         }
13923         // void NodeInfo_free(struct LDKNodeInfo this_obj);
13924         export function NodeInfo_free(this_obj: number): void {
13925                 if(!isWasmInitialized) {
13926                         throw new Error("initializeWasm() must be awaited first!");
13927                 }
13928                 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
13929                 // debug statements here
13930         }
13931         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
13932         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
13933                 if(!isWasmInitialized) {
13934                         throw new Error("initializeWasm() must be awaited first!");
13935                 }
13936                 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
13937                 // debug statements here
13938         }
13939         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
13940         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
13941                 if(!isWasmInitialized) {
13942                         throw new Error("initializeWasm() must be awaited first!");
13943                 }
13944                 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
13945                 return nativeResponseValue;
13946         }
13947         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
13948         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
13949                 if(!isWasmInitialized) {
13950                         throw new Error("initializeWasm() must be awaited first!");
13951                 }
13952                 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
13953                 // debug statements here
13954         }
13955         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
13956         export function NodeInfo_get_announcement_info(this_ptr: number): number {
13957                 if(!isWasmInitialized) {
13958                         throw new Error("initializeWasm() must be awaited first!");
13959                 }
13960                 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
13961                 return nativeResponseValue;
13962         }
13963         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
13964         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
13965                 if(!isWasmInitialized) {
13966                         throw new Error("initializeWasm() must be awaited first!");
13967                 }
13968                 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
13969                 // debug statements here
13970         }
13971         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
13972         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
13973                 if(!isWasmInitialized) {
13974                         throw new Error("initializeWasm() must be awaited first!");
13975                 }
13976                 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
13977                 return nativeResponseValue;
13978         }
13979         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
13980         export function NodeInfo_clone(orig: number): number {
13981                 if(!isWasmInitialized) {
13982                         throw new Error("initializeWasm() must be awaited first!");
13983                 }
13984                 const nativeResponseValue = wasm.NodeInfo_clone(orig);
13985                 return nativeResponseValue;
13986         }
13987         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
13988         export function NodeInfo_write(obj: number): Uint8Array {
13989                 if(!isWasmInitialized) {
13990                         throw new Error("initializeWasm() must be awaited first!");
13991                 }
13992                 const nativeResponseValue = wasm.NodeInfo_write(obj);
13993                 return decodeArray(nativeResponseValue);
13994         }
13995         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
13996         export function NodeInfo_read(ser: Uint8Array): number {
13997                 if(!isWasmInitialized) {
13998                         throw new Error("initializeWasm() must be awaited first!");
13999                 }
14000                 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
14001                 return nativeResponseValue;
14002         }
14003         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
14004         export function NetworkGraph_write(obj: number): Uint8Array {
14005                 if(!isWasmInitialized) {
14006                         throw new Error("initializeWasm() must be awaited first!");
14007                 }
14008                 const nativeResponseValue = wasm.NetworkGraph_write(obj);
14009                 return decodeArray(nativeResponseValue);
14010         }
14011         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
14012         export function NetworkGraph_read(ser: Uint8Array): number {
14013                 if(!isWasmInitialized) {
14014                         throw new Error("initializeWasm() must be awaited first!");
14015                 }
14016                 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
14017                 return nativeResponseValue;
14018         }
14019         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
14020         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
14021                 if(!isWasmInitialized) {
14022                         throw new Error("initializeWasm() must be awaited first!");
14023                 }
14024                 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
14025                 return nativeResponseValue;
14026         }
14027         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
14028         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
14029                 if(!isWasmInitialized) {
14030                         throw new Error("initializeWasm() must be awaited first!");
14031                 }
14032                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
14033                 return nativeResponseValue;
14034         }
14035         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
14036         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
14037                 if(!isWasmInitialized) {
14038                         throw new Error("initializeWasm() must be awaited first!");
14039                 }
14040                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
14041                 return nativeResponseValue;
14042         }
14043         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKAccess *chain_access);
14044         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
14045                 if(!isWasmInitialized) {
14046                         throw new Error("initializeWasm() must be awaited first!");
14047                 }
14048                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
14049                 return nativeResponseValue;
14050         }
14051         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKAccess *chain_access);
14052         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
14053                 if(!isWasmInitialized) {
14054                         throw new Error("initializeWasm() must be awaited first!");
14055                 }
14056                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
14057                 return nativeResponseValue;
14058         }
14059         // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
14060         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
14061                 if(!isWasmInitialized) {
14062                         throw new Error("initializeWasm() must be awaited first!");
14063                 }
14064                 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
14065                 // debug statements here
14066         }
14067         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
14068         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
14069                 if(!isWasmInitialized) {
14070                         throw new Error("initializeWasm() must be awaited first!");
14071                 }
14072                 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
14073                 return nativeResponseValue;
14074         }
14075         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
14076         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
14077                 if(!isWasmInitialized) {
14078                         throw new Error("initializeWasm() must be awaited first!");
14079                 }
14080                 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
14081                 return nativeResponseValue;
14082         }
14083         // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
14084         export function FilesystemPersister_free(this_obj: number): void {
14085                 if(!isWasmInitialized) {
14086                         throw new Error("initializeWasm() must be awaited first!");
14087                 }
14088                 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
14089                 // debug statements here
14090         }
14091         // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
14092         export function FilesystemPersister_new(path_to_channel_data: String): number {
14093                 if(!isWasmInitialized) {
14094                         throw new Error("initializeWasm() must be awaited first!");
14095                 }
14096                 const nativeResponseValue = wasm.FilesystemPersister_new(path_to_channel_data);
14097                 return nativeResponseValue;
14098         }
14099         // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
14100         export function FilesystemPersister_get_data_dir(this_arg: number): String {
14101                 if(!isWasmInitialized) {
14102                         throw new Error("initializeWasm() must be awaited first!");
14103                 }
14104                 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
14105                 return nativeResponseValue;
14106         }
14107         // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
14108         export function FilesystemPersister_persist_manager(data_dir: String, manager: number): number {
14109                 if(!isWasmInitialized) {
14110                         throw new Error("initializeWasm() must be awaited first!");
14111                 }
14112                 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(data_dir, manager);
14113                 return nativeResponseValue;
14114         }
14115         // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
14116         export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
14117                 if(!isWasmInitialized) {
14118                         throw new Error("initializeWasm() must be awaited first!");
14119                 }
14120                 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
14121                 return nativeResponseValue;
14122         }
14123         // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
14124         export function FilesystemPersister_as_Persist(this_arg: number): number {
14125                 if(!isWasmInitialized) {
14126                         throw new Error("initializeWasm() must be awaited first!");
14127                 }
14128                 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
14129                 return nativeResponseValue;
14130         }
14131         // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
14132         export function BackgroundProcessor_free(this_obj: number): void {
14133                 if(!isWasmInitialized) {
14134                         throw new Error("initializeWasm() must be awaited first!");
14135                 }
14136                 const nativeResponseValue = wasm.BackgroundProcessor_free(this_obj);
14137                 // debug statements here
14138         }
14139         // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
14140         export function ChannelManagerPersister_free(this_ptr: number): void {
14141                 if(!isWasmInitialized) {
14142                         throw new Error("initializeWasm() must be awaited first!");
14143                 }
14144                 const nativeResponseValue = wasm.ChannelManagerPersister_free(this_ptr);
14145                 // debug statements here
14146         }
14147         // MUST_USE_RES struct LDKBackgroundProcessor BackgroundProcessor_start(struct LDKChannelManagerPersister persister, struct LDKEventHandler event_handler, const struct LDKChainMonitor *NONNULL_PTR chain_monitor, const struct LDKChannelManager *NONNULL_PTR channel_manager, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger);
14148         export function BackgroundProcessor_start(persister: number, event_handler: number, chain_monitor: number, channel_manager: number, peer_manager: number, logger: number): number {
14149                 if(!isWasmInitialized) {
14150                         throw new Error("initializeWasm() must be awaited first!");
14151                 }
14152                 const nativeResponseValue = wasm.BackgroundProcessor_start(persister, event_handler, chain_monitor, channel_manager, peer_manager, logger);
14153                 return nativeResponseValue;
14154         }
14155         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
14156         export function BackgroundProcessor_stop(this_arg: number): number {
14157                 if(!isWasmInitialized) {
14158                         throw new Error("initializeWasm() must be awaited first!");
14159                 }
14160                 const nativeResponseValue = wasm.BackgroundProcessor_stop(this_arg);
14161                 return nativeResponseValue;
14162         }
14163         // void check_platform(void);
14164         export function check_platform(): void {
14165                 if(!isWasmInitialized) {
14166                         throw new Error("initializeWasm() must be awaited first!");
14167                 }
14168                 const nativeResponseValue = wasm.check_platform();
14169                 // debug statements here
14170         }
14171         // void Invoice_free(struct LDKInvoice this_obj);
14172         export function Invoice_free(this_obj: number): void {
14173                 if(!isWasmInitialized) {
14174                         throw new Error("initializeWasm() must be awaited first!");
14175                 }
14176                 const nativeResponseValue = wasm.Invoice_free(this_obj);
14177                 // debug statements here
14178         }
14179         // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
14180         export function Invoice_eq(a: number, b: number): boolean {
14181                 if(!isWasmInitialized) {
14182                         throw new Error("initializeWasm() must be awaited first!");
14183                 }
14184                 const nativeResponseValue = wasm.Invoice_eq(a, b);
14185                 return nativeResponseValue;
14186         }
14187         // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
14188         export function Invoice_clone(orig: number): number {
14189                 if(!isWasmInitialized) {
14190                         throw new Error("initializeWasm() must be awaited first!");
14191                 }
14192                 const nativeResponseValue = wasm.Invoice_clone(orig);
14193                 return nativeResponseValue;
14194         }
14195         // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
14196         export function SignedRawInvoice_free(this_obj: number): void {
14197                 if(!isWasmInitialized) {
14198                         throw new Error("initializeWasm() must be awaited first!");
14199                 }
14200                 const nativeResponseValue = wasm.SignedRawInvoice_free(this_obj);
14201                 // debug statements here
14202         }
14203         // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
14204         export function SignedRawInvoice_eq(a: number, b: number): boolean {
14205                 if(!isWasmInitialized) {
14206                         throw new Error("initializeWasm() must be awaited first!");
14207                 }
14208                 const nativeResponseValue = wasm.SignedRawInvoice_eq(a, b);
14209                 return nativeResponseValue;
14210         }
14211         // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
14212         export function SignedRawInvoice_clone(orig: number): number {
14213                 if(!isWasmInitialized) {
14214                         throw new Error("initializeWasm() must be awaited first!");
14215                 }
14216                 const nativeResponseValue = wasm.SignedRawInvoice_clone(orig);
14217                 return nativeResponseValue;
14218         }
14219         // void RawInvoice_free(struct LDKRawInvoice this_obj);
14220         export function RawInvoice_free(this_obj: number): void {
14221                 if(!isWasmInitialized) {
14222                         throw new Error("initializeWasm() must be awaited first!");
14223                 }
14224                 const nativeResponseValue = wasm.RawInvoice_free(this_obj);
14225                 // debug statements here
14226         }
14227         // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
14228         export function RawInvoice_get_data(this_ptr: number): number {
14229                 if(!isWasmInitialized) {
14230                         throw new Error("initializeWasm() must be awaited first!");
14231                 }
14232                 const nativeResponseValue = wasm.RawInvoice_get_data(this_ptr);
14233                 return nativeResponseValue;
14234         }
14235         // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
14236         export function RawInvoice_set_data(this_ptr: number, val: number): void {
14237                 if(!isWasmInitialized) {
14238                         throw new Error("initializeWasm() must be awaited first!");
14239                 }
14240                 const nativeResponseValue = wasm.RawInvoice_set_data(this_ptr, val);
14241                 // debug statements here
14242         }
14243         // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
14244         export function RawInvoice_eq(a: number, b: number): boolean {
14245                 if(!isWasmInitialized) {
14246                         throw new Error("initializeWasm() must be awaited first!");
14247                 }
14248                 const nativeResponseValue = wasm.RawInvoice_eq(a, b);
14249                 return nativeResponseValue;
14250         }
14251         // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
14252         export function RawInvoice_clone(orig: number): number {
14253                 if(!isWasmInitialized) {
14254                         throw new Error("initializeWasm() must be awaited first!");
14255                 }
14256                 const nativeResponseValue = wasm.RawInvoice_clone(orig);
14257                 return nativeResponseValue;
14258         }
14259         // void RawDataPart_free(struct LDKRawDataPart this_obj);
14260         export function RawDataPart_free(this_obj: number): void {
14261                 if(!isWasmInitialized) {
14262                         throw new Error("initializeWasm() must be awaited first!");
14263                 }
14264                 const nativeResponseValue = wasm.RawDataPart_free(this_obj);
14265                 // debug statements here
14266         }
14267         // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
14268         export function RawDataPart_get_timestamp(this_ptr: number): number {
14269                 if(!isWasmInitialized) {
14270                         throw new Error("initializeWasm() must be awaited first!");
14271                 }
14272                 const nativeResponseValue = wasm.RawDataPart_get_timestamp(this_ptr);
14273                 return nativeResponseValue;
14274         }
14275         // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
14276         export function RawDataPart_set_timestamp(this_ptr: number, val: number): void {
14277                 if(!isWasmInitialized) {
14278                         throw new Error("initializeWasm() must be awaited first!");
14279                 }
14280                 const nativeResponseValue = wasm.RawDataPart_set_timestamp(this_ptr, val);
14281                 // debug statements here
14282         }
14283         // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
14284         export function RawDataPart_eq(a: number, b: number): boolean {
14285                 if(!isWasmInitialized) {
14286                         throw new Error("initializeWasm() must be awaited first!");
14287                 }
14288                 const nativeResponseValue = wasm.RawDataPart_eq(a, b);
14289                 return nativeResponseValue;
14290         }
14291         // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
14292         export function RawDataPart_clone(orig: number): number {
14293                 if(!isWasmInitialized) {
14294                         throw new Error("initializeWasm() must be awaited first!");
14295                 }
14296                 const nativeResponseValue = wasm.RawDataPart_clone(orig);
14297                 return nativeResponseValue;
14298         }
14299         // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
14300         export function PositiveTimestamp_free(this_obj: number): void {
14301                 if(!isWasmInitialized) {
14302                         throw new Error("initializeWasm() must be awaited first!");
14303                 }
14304                 const nativeResponseValue = wasm.PositiveTimestamp_free(this_obj);
14305                 // debug statements here
14306         }
14307         // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
14308         export function PositiveTimestamp_eq(a: number, b: number): boolean {
14309                 if(!isWasmInitialized) {
14310                         throw new Error("initializeWasm() must be awaited first!");
14311                 }
14312                 const nativeResponseValue = wasm.PositiveTimestamp_eq(a, b);
14313                 return nativeResponseValue;
14314         }
14315         // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
14316         export function PositiveTimestamp_clone(orig: number): number {
14317                 if(!isWasmInitialized) {
14318                         throw new Error("initializeWasm() must be awaited first!");
14319                 }
14320                 const nativeResponseValue = wasm.PositiveTimestamp_clone(orig);
14321                 return nativeResponseValue;
14322         }
14323         // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
14324         export function SiPrefix_clone(orig: number): SiPrefix {
14325                 if(!isWasmInitialized) {
14326                         throw new Error("initializeWasm() must be awaited first!");
14327                 }
14328                 const nativeResponseValue = wasm.SiPrefix_clone(orig);
14329                 return nativeResponseValue;
14330         }
14331         // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
14332         export function SiPrefix_eq(a: number, b: number): boolean {
14333                 if(!isWasmInitialized) {
14334                         throw new Error("initializeWasm() must be awaited first!");
14335                 }
14336                 const nativeResponseValue = wasm.SiPrefix_eq(a, b);
14337                 return nativeResponseValue;
14338         }
14339         // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
14340         export function SiPrefix_multiplier(this_arg: number): number {
14341                 if(!isWasmInitialized) {
14342                         throw new Error("initializeWasm() must be awaited first!");
14343                 }
14344                 const nativeResponseValue = wasm.SiPrefix_multiplier(this_arg);
14345                 return nativeResponseValue;
14346         }
14347         // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
14348         export function Currency_clone(orig: number): Currency {
14349                 if(!isWasmInitialized) {
14350                         throw new Error("initializeWasm() must be awaited first!");
14351                 }
14352                 const nativeResponseValue = wasm.Currency_clone(orig);
14353                 return nativeResponseValue;
14354         }
14355         // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
14356         export function Currency_eq(a: number, b: number): boolean {
14357                 if(!isWasmInitialized) {
14358                         throw new Error("initializeWasm() must be awaited first!");
14359                 }
14360                 const nativeResponseValue = wasm.Currency_eq(a, b);
14361                 return nativeResponseValue;
14362         }
14363         // void Sha256_free(struct LDKSha256 this_obj);
14364         export function Sha256_free(this_obj: number): void {
14365                 if(!isWasmInitialized) {
14366                         throw new Error("initializeWasm() must be awaited first!");
14367                 }
14368                 const nativeResponseValue = wasm.Sha256_free(this_obj);
14369                 // debug statements here
14370         }
14371         // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
14372         export function Sha256_eq(a: number, b: number): boolean {
14373                 if(!isWasmInitialized) {
14374                         throw new Error("initializeWasm() must be awaited first!");
14375                 }
14376                 const nativeResponseValue = wasm.Sha256_eq(a, b);
14377                 return nativeResponseValue;
14378         }
14379         // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
14380         export function Sha256_clone(orig: number): number {
14381                 if(!isWasmInitialized) {
14382                         throw new Error("initializeWasm() must be awaited first!");
14383                 }
14384                 const nativeResponseValue = wasm.Sha256_clone(orig);
14385                 return nativeResponseValue;
14386         }
14387         // void Description_free(struct LDKDescription this_obj);
14388         export function Description_free(this_obj: number): void {
14389                 if(!isWasmInitialized) {
14390                         throw new Error("initializeWasm() must be awaited first!");
14391                 }
14392                 const nativeResponseValue = wasm.Description_free(this_obj);
14393                 // debug statements here
14394         }
14395         // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
14396         export function Description_eq(a: number, b: number): boolean {
14397                 if(!isWasmInitialized) {
14398                         throw new Error("initializeWasm() must be awaited first!");
14399                 }
14400                 const nativeResponseValue = wasm.Description_eq(a, b);
14401                 return nativeResponseValue;
14402         }
14403         // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
14404         export function Description_clone(orig: number): number {
14405                 if(!isWasmInitialized) {
14406                         throw new Error("initializeWasm() must be awaited first!");
14407                 }
14408                 const nativeResponseValue = wasm.Description_clone(orig);
14409                 return nativeResponseValue;
14410         }
14411         // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
14412         export function PayeePubKey_free(this_obj: number): void {
14413                 if(!isWasmInitialized) {
14414                         throw new Error("initializeWasm() must be awaited first!");
14415                 }
14416                 const nativeResponseValue = wasm.PayeePubKey_free(this_obj);
14417                 // debug statements here
14418         }
14419         // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
14420         export function PayeePubKey_eq(a: number, b: number): boolean {
14421                 if(!isWasmInitialized) {
14422                         throw new Error("initializeWasm() must be awaited first!");
14423                 }
14424                 const nativeResponseValue = wasm.PayeePubKey_eq(a, b);
14425                 return nativeResponseValue;
14426         }
14427         // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
14428         export function PayeePubKey_clone(orig: number): number {
14429                 if(!isWasmInitialized) {
14430                         throw new Error("initializeWasm() must be awaited first!");
14431                 }
14432                 const nativeResponseValue = wasm.PayeePubKey_clone(orig);
14433                 return nativeResponseValue;
14434         }
14435         // void ExpiryTime_free(struct LDKExpiryTime this_obj);
14436         export function ExpiryTime_free(this_obj: number): void {
14437                 if(!isWasmInitialized) {
14438                         throw new Error("initializeWasm() must be awaited first!");
14439                 }
14440                 const nativeResponseValue = wasm.ExpiryTime_free(this_obj);
14441                 // debug statements here
14442         }
14443         // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
14444         export function ExpiryTime_eq(a: number, b: number): boolean {
14445                 if(!isWasmInitialized) {
14446                         throw new Error("initializeWasm() must be awaited first!");
14447                 }
14448                 const nativeResponseValue = wasm.ExpiryTime_eq(a, b);
14449                 return nativeResponseValue;
14450         }
14451         // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
14452         export function ExpiryTime_clone(orig: number): number {
14453                 if(!isWasmInitialized) {
14454                         throw new Error("initializeWasm() must be awaited first!");
14455                 }
14456                 const nativeResponseValue = wasm.ExpiryTime_clone(orig);
14457                 return nativeResponseValue;
14458         }
14459         // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
14460         export function MinFinalCltvExpiry_free(this_obj: number): void {
14461                 if(!isWasmInitialized) {
14462                         throw new Error("initializeWasm() must be awaited first!");
14463                 }
14464                 const nativeResponseValue = wasm.MinFinalCltvExpiry_free(this_obj);
14465                 // debug statements here
14466         }
14467         // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
14468         export function MinFinalCltvExpiry_eq(a: number, b: number): boolean {
14469                 if(!isWasmInitialized) {
14470                         throw new Error("initializeWasm() must be awaited first!");
14471                 }
14472                 const nativeResponseValue = wasm.MinFinalCltvExpiry_eq(a, b);
14473                 return nativeResponseValue;
14474         }
14475         // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
14476         export function MinFinalCltvExpiry_clone(orig: number): number {
14477                 if(!isWasmInitialized) {
14478                         throw new Error("initializeWasm() must be awaited first!");
14479                 }
14480                 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone(orig);
14481                 return nativeResponseValue;
14482         }
14483         // void Fallback_free(struct LDKFallback this_ptr);
14484         export function Fallback_free(this_ptr: number): void {
14485                 if(!isWasmInitialized) {
14486                         throw new Error("initializeWasm() must be awaited first!");
14487                 }
14488                 const nativeResponseValue = wasm.Fallback_free(this_ptr);
14489                 // debug statements here
14490         }
14491         // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
14492         export function Fallback_clone(orig: number): number {
14493                 if(!isWasmInitialized) {
14494                         throw new Error("initializeWasm() must be awaited first!");
14495                 }
14496                 const nativeResponseValue = wasm.Fallback_clone(orig);
14497                 return nativeResponseValue;
14498         }
14499         // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
14500         export function Fallback_eq(a: number, b: number): boolean {
14501                 if(!isWasmInitialized) {
14502                         throw new Error("initializeWasm() must be awaited first!");
14503                 }
14504                 const nativeResponseValue = wasm.Fallback_eq(a, b);
14505                 return nativeResponseValue;
14506         }
14507         // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
14508         export function InvoiceSignature_free(this_obj: number): void {
14509                 if(!isWasmInitialized) {
14510                         throw new Error("initializeWasm() must be awaited first!");
14511                 }
14512                 const nativeResponseValue = wasm.InvoiceSignature_free(this_obj);
14513                 // debug statements here
14514         }
14515         // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
14516         export function InvoiceSignature_eq(a: number, b: number): boolean {
14517                 if(!isWasmInitialized) {
14518                         throw new Error("initializeWasm() must be awaited first!");
14519                 }
14520                 const nativeResponseValue = wasm.InvoiceSignature_eq(a, b);
14521                 return nativeResponseValue;
14522         }
14523         // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
14524         export function InvoiceSignature_clone(orig: number): number {
14525                 if(!isWasmInitialized) {
14526                         throw new Error("initializeWasm() must be awaited first!");
14527                 }
14528                 const nativeResponseValue = wasm.InvoiceSignature_clone(orig);
14529                 return nativeResponseValue;
14530         }
14531         // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
14532         export function PrivateRoute_free(this_obj: number): void {
14533                 if(!isWasmInitialized) {
14534                         throw new Error("initializeWasm() must be awaited first!");
14535                 }
14536                 const nativeResponseValue = wasm.PrivateRoute_free(this_obj);
14537                 // debug statements here
14538         }
14539         // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
14540         export function PrivateRoute_eq(a: number, b: number): boolean {
14541                 if(!isWasmInitialized) {
14542                         throw new Error("initializeWasm() must be awaited first!");
14543                 }
14544                 const nativeResponseValue = wasm.PrivateRoute_eq(a, b);
14545                 return nativeResponseValue;
14546         }
14547         // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
14548         export function PrivateRoute_clone(orig: number): number {
14549                 if(!isWasmInitialized) {
14550                         throw new Error("initializeWasm() must be awaited first!");
14551                 }
14552                 const nativeResponseValue = wasm.PrivateRoute_clone(orig);
14553                 return nativeResponseValue;
14554         }
14555         // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
14556         export function SignedRawInvoice_into_parts(this_arg: number): number {
14557                 if(!isWasmInitialized) {
14558                         throw new Error("initializeWasm() must be awaited first!");
14559                 }
14560                 const nativeResponseValue = wasm.SignedRawInvoice_into_parts(this_arg);
14561                 return nativeResponseValue;
14562         }
14563         // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
14564         export function SignedRawInvoice_raw_invoice(this_arg: number): number {
14565                 if(!isWasmInitialized) {
14566                         throw new Error("initializeWasm() must be awaited first!");
14567                 }
14568                 const nativeResponseValue = wasm.SignedRawInvoice_raw_invoice(this_arg);
14569                 return nativeResponseValue;
14570         }
14571         // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
14572         export function SignedRawInvoice_hash(this_arg: number): Uint8Array {
14573                 if(!isWasmInitialized) {
14574                         throw new Error("initializeWasm() must be awaited first!");
14575                 }
14576                 const nativeResponseValue = wasm.SignedRawInvoice_hash(this_arg);
14577                 return decodeArray(nativeResponseValue);
14578         }
14579         // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
14580         export function SignedRawInvoice_signature(this_arg: number): number {
14581                 if(!isWasmInitialized) {
14582                         throw new Error("initializeWasm() must be awaited first!");
14583                 }
14584                 const nativeResponseValue = wasm.SignedRawInvoice_signature(this_arg);
14585                 return nativeResponseValue;
14586         }
14587         // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
14588         export function SignedRawInvoice_recover_payee_pub_key(this_arg: number): number {
14589                 if(!isWasmInitialized) {
14590                         throw new Error("initializeWasm() must be awaited first!");
14591                 }
14592                 const nativeResponseValue = wasm.SignedRawInvoice_recover_payee_pub_key(this_arg);
14593                 return nativeResponseValue;
14594         }
14595         // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
14596         export function SignedRawInvoice_check_signature(this_arg: number): boolean {
14597                 if(!isWasmInitialized) {
14598                         throw new Error("initializeWasm() must be awaited first!");
14599                 }
14600                 const nativeResponseValue = wasm.SignedRawInvoice_check_signature(this_arg);
14601                 return nativeResponseValue;
14602         }
14603         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14604         export function RawInvoice_hash(this_arg: number): Uint8Array {
14605                 if(!isWasmInitialized) {
14606                         throw new Error("initializeWasm() must be awaited first!");
14607                 }
14608                 const nativeResponseValue = wasm.RawInvoice_hash(this_arg);
14609                 return decodeArray(nativeResponseValue);
14610         }
14611         // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14612         export function RawInvoice_payment_hash(this_arg: number): number {
14613                 if(!isWasmInitialized) {
14614                         throw new Error("initializeWasm() must be awaited first!");
14615                 }
14616                 const nativeResponseValue = wasm.RawInvoice_payment_hash(this_arg);
14617                 return nativeResponseValue;
14618         }
14619         // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14620         export function RawInvoice_description(this_arg: number): number {
14621                 if(!isWasmInitialized) {
14622                         throw new Error("initializeWasm() must be awaited first!");
14623                 }
14624                 const nativeResponseValue = wasm.RawInvoice_description(this_arg);
14625                 return nativeResponseValue;
14626         }
14627         // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14628         export function RawInvoice_payee_pub_key(this_arg: number): number {
14629                 if(!isWasmInitialized) {
14630                         throw new Error("initializeWasm() must be awaited first!");
14631                 }
14632                 const nativeResponseValue = wasm.RawInvoice_payee_pub_key(this_arg);
14633                 return nativeResponseValue;
14634         }
14635         // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14636         export function RawInvoice_description_hash(this_arg: number): number {
14637                 if(!isWasmInitialized) {
14638                         throw new Error("initializeWasm() must be awaited first!");
14639                 }
14640                 const nativeResponseValue = wasm.RawInvoice_description_hash(this_arg);
14641                 return nativeResponseValue;
14642         }
14643         // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14644         export function RawInvoice_expiry_time(this_arg: number): number {
14645                 if(!isWasmInitialized) {
14646                         throw new Error("initializeWasm() must be awaited first!");
14647                 }
14648                 const nativeResponseValue = wasm.RawInvoice_expiry_time(this_arg);
14649                 return nativeResponseValue;
14650         }
14651         // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14652         export function RawInvoice_min_final_cltv_expiry(this_arg: number): number {
14653                 if(!isWasmInitialized) {
14654                         throw new Error("initializeWasm() must be awaited first!");
14655                 }
14656                 const nativeResponseValue = wasm.RawInvoice_min_final_cltv_expiry(this_arg);
14657                 return nativeResponseValue;
14658         }
14659         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14660         export function RawInvoice_payment_secret(this_arg: number): Uint8Array {
14661                 if(!isWasmInitialized) {
14662                         throw new Error("initializeWasm() must be awaited first!");
14663                 }
14664                 const nativeResponseValue = wasm.RawInvoice_payment_secret(this_arg);
14665                 return decodeArray(nativeResponseValue);
14666         }
14667         // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14668         export function RawInvoice_features(this_arg: number): number {
14669                 if(!isWasmInitialized) {
14670                         throw new Error("initializeWasm() must be awaited first!");
14671                 }
14672                 const nativeResponseValue = wasm.RawInvoice_features(this_arg);
14673                 return nativeResponseValue;
14674         }
14675         // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14676         export function RawInvoice_private_routes(this_arg: number): number[] {
14677                 if(!isWasmInitialized) {
14678                         throw new Error("initializeWasm() must be awaited first!");
14679                 }
14680                 const nativeResponseValue = wasm.RawInvoice_private_routes(this_arg);
14681                 return nativeResponseValue;
14682         }
14683         // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14684         export function RawInvoice_amount_pico_btc(this_arg: number): number {
14685                 if(!isWasmInitialized) {
14686                         throw new Error("initializeWasm() must be awaited first!");
14687                 }
14688                 const nativeResponseValue = wasm.RawInvoice_amount_pico_btc(this_arg);
14689                 return nativeResponseValue;
14690         }
14691         // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14692         export function RawInvoice_currency(this_arg: number): Currency {
14693                 if(!isWasmInitialized) {
14694                         throw new Error("initializeWasm() must be awaited first!");
14695                 }
14696                 const nativeResponseValue = wasm.RawInvoice_currency(this_arg);
14697                 return nativeResponseValue;
14698         }
14699         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
14700         export function PositiveTimestamp_from_unix_timestamp(unix_seconds: number): number {
14701                 if(!isWasmInitialized) {
14702                         throw new Error("initializeWasm() must be awaited first!");
14703                 }
14704                 const nativeResponseValue = wasm.PositiveTimestamp_from_unix_timestamp(unix_seconds);
14705                 return nativeResponseValue;
14706         }
14707         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
14708         export function PositiveTimestamp_from_system_time(time: number): number {
14709                 if(!isWasmInitialized) {
14710                         throw new Error("initializeWasm() must be awaited first!");
14711                 }
14712                 const nativeResponseValue = wasm.PositiveTimestamp_from_system_time(time);
14713                 return nativeResponseValue;
14714         }
14715         // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
14716         export function PositiveTimestamp_as_unix_timestamp(this_arg: number): number {
14717                 if(!isWasmInitialized) {
14718                         throw new Error("initializeWasm() must be awaited first!");
14719                 }
14720                 const nativeResponseValue = wasm.PositiveTimestamp_as_unix_timestamp(this_arg);
14721                 return nativeResponseValue;
14722         }
14723         // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
14724         export function PositiveTimestamp_as_time(this_arg: number): number {
14725                 if(!isWasmInitialized) {
14726                         throw new Error("initializeWasm() must be awaited first!");
14727                 }
14728                 const nativeResponseValue = wasm.PositiveTimestamp_as_time(this_arg);
14729                 return nativeResponseValue;
14730         }
14731         // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
14732         export function Invoice_into_signed_raw(this_arg: number): number {
14733                 if(!isWasmInitialized) {
14734                         throw new Error("initializeWasm() must be awaited first!");
14735                 }
14736                 const nativeResponseValue = wasm.Invoice_into_signed_raw(this_arg);
14737                 return nativeResponseValue;
14738         }
14739         // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
14740         export function Invoice_check_signature(this_arg: number): number {
14741                 if(!isWasmInitialized) {
14742                         throw new Error("initializeWasm() must be awaited first!");
14743                 }
14744                 const nativeResponseValue = wasm.Invoice_check_signature(this_arg);
14745                 return nativeResponseValue;
14746         }
14747         // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
14748         export function Invoice_from_signed(signed_invoice: number): number {
14749                 if(!isWasmInitialized) {
14750                         throw new Error("initializeWasm() must be awaited first!");
14751                 }
14752                 const nativeResponseValue = wasm.Invoice_from_signed(signed_invoice);
14753                 return nativeResponseValue;
14754         }
14755         // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
14756         export function Invoice_timestamp(this_arg: number): number {
14757                 if(!isWasmInitialized) {
14758                         throw new Error("initializeWasm() must be awaited first!");
14759                 }
14760                 const nativeResponseValue = wasm.Invoice_timestamp(this_arg);
14761                 return nativeResponseValue;
14762         }
14763         // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
14764         export function Invoice_payment_hash(this_arg: number): Uint8Array {
14765                 if(!isWasmInitialized) {
14766                         throw new Error("initializeWasm() must be awaited first!");
14767                 }
14768                 const nativeResponseValue = wasm.Invoice_payment_hash(this_arg);
14769                 return decodeArray(nativeResponseValue);
14770         }
14771         // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
14772         export function Invoice_payee_pub_key(this_arg: number): Uint8Array {
14773                 if(!isWasmInitialized) {
14774                         throw new Error("initializeWasm() must be awaited first!");
14775                 }
14776                 const nativeResponseValue = wasm.Invoice_payee_pub_key(this_arg);
14777                 return decodeArray(nativeResponseValue);
14778         }
14779         // MUST_USE_RES struct LDKThirtyTwoBytes Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg);
14780         export function Invoice_payment_secret(this_arg: number): Uint8Array {
14781                 if(!isWasmInitialized) {
14782                         throw new Error("initializeWasm() must be awaited first!");
14783                 }
14784                 const nativeResponseValue = wasm.Invoice_payment_secret(this_arg);
14785                 return decodeArray(nativeResponseValue);
14786         }
14787         // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
14788         export function Invoice_features(this_arg: number): number {
14789                 if(!isWasmInitialized) {
14790                         throw new Error("initializeWasm() must be awaited first!");
14791                 }
14792                 const nativeResponseValue = wasm.Invoice_features(this_arg);
14793                 return nativeResponseValue;
14794         }
14795         // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
14796         export function Invoice_recover_payee_pub_key(this_arg: number): Uint8Array {
14797                 if(!isWasmInitialized) {
14798                         throw new Error("initializeWasm() must be awaited first!");
14799                 }
14800                 const nativeResponseValue = wasm.Invoice_recover_payee_pub_key(this_arg);
14801                 return decodeArray(nativeResponseValue);
14802         }
14803         // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
14804         export function Invoice_expiry_time(this_arg: number): number {
14805                 if(!isWasmInitialized) {
14806                         throw new Error("initializeWasm() must be awaited first!");
14807                 }
14808                 const nativeResponseValue = wasm.Invoice_expiry_time(this_arg);
14809                 return nativeResponseValue;
14810         }
14811         // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
14812         export function Invoice_min_final_cltv_expiry(this_arg: number): number {
14813                 if(!isWasmInitialized) {
14814                         throw new Error("initializeWasm() must be awaited first!");
14815                 }
14816                 const nativeResponseValue = wasm.Invoice_min_final_cltv_expiry(this_arg);
14817                 return nativeResponseValue;
14818         }
14819         // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
14820         export function Invoice_private_routes(this_arg: number): number[] {
14821                 if(!isWasmInitialized) {
14822                         throw new Error("initializeWasm() must be awaited first!");
14823                 }
14824                 const nativeResponseValue = wasm.Invoice_private_routes(this_arg);
14825                 return nativeResponseValue;
14826         }
14827         // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
14828         export function Invoice_route_hints(this_arg: number): number[] {
14829                 if(!isWasmInitialized) {
14830                         throw new Error("initializeWasm() must be awaited first!");
14831                 }
14832                 const nativeResponseValue = wasm.Invoice_route_hints(this_arg);
14833                 return nativeResponseValue;
14834         }
14835         // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
14836         export function Invoice_currency(this_arg: number): Currency {
14837                 if(!isWasmInitialized) {
14838                         throw new Error("initializeWasm() must be awaited first!");
14839                 }
14840                 const nativeResponseValue = wasm.Invoice_currency(this_arg);
14841                 return nativeResponseValue;
14842         }
14843         // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_pico_btc(const struct LDKInvoice *NONNULL_PTR this_arg);
14844         export function Invoice_amount_pico_btc(this_arg: number): number {
14845                 if(!isWasmInitialized) {
14846                         throw new Error("initializeWasm() must be awaited first!");
14847                 }
14848                 const nativeResponseValue = wasm.Invoice_amount_pico_btc(this_arg);
14849                 return nativeResponseValue;
14850         }
14851         // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
14852         export function Description_new(description: String): number {
14853                 if(!isWasmInitialized) {
14854                         throw new Error("initializeWasm() must be awaited first!");
14855                 }
14856                 const nativeResponseValue = wasm.Description_new(description);
14857                 return nativeResponseValue;
14858         }
14859         // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
14860         export function Description_into_inner(this_arg: number): String {
14861                 if(!isWasmInitialized) {
14862                         throw new Error("initializeWasm() must be awaited first!");
14863                 }
14864                 const nativeResponseValue = wasm.Description_into_inner(this_arg);
14865                 return nativeResponseValue;
14866         }
14867         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
14868         export function ExpiryTime_from_seconds(seconds: number): number {
14869                 if(!isWasmInitialized) {
14870                         throw new Error("initializeWasm() must be awaited first!");
14871                 }
14872                 const nativeResponseValue = wasm.ExpiryTime_from_seconds(seconds);
14873                 return nativeResponseValue;
14874         }
14875         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
14876         export function ExpiryTime_from_duration(duration: number): number {
14877                 if(!isWasmInitialized) {
14878                         throw new Error("initializeWasm() must be awaited first!");
14879                 }
14880                 const nativeResponseValue = wasm.ExpiryTime_from_duration(duration);
14881                 return nativeResponseValue;
14882         }
14883         // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
14884         export function ExpiryTime_as_seconds(this_arg: number): number {
14885                 if(!isWasmInitialized) {
14886                         throw new Error("initializeWasm() must be awaited first!");
14887                 }
14888                 const nativeResponseValue = wasm.ExpiryTime_as_seconds(this_arg);
14889                 return nativeResponseValue;
14890         }
14891         // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
14892         export function ExpiryTime_as_duration(this_arg: number): number {
14893                 if(!isWasmInitialized) {
14894                         throw new Error("initializeWasm() must be awaited first!");
14895                 }
14896                 const nativeResponseValue = wasm.ExpiryTime_as_duration(this_arg);
14897                 return nativeResponseValue;
14898         }
14899         // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
14900         export function PrivateRoute_new(hops: number): number {
14901                 if(!isWasmInitialized) {
14902                         throw new Error("initializeWasm() must be awaited first!");
14903                 }
14904                 const nativeResponseValue = wasm.PrivateRoute_new(hops);
14905                 return nativeResponseValue;
14906         }
14907         // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
14908         export function PrivateRoute_into_inner(this_arg: number): number {
14909                 if(!isWasmInitialized) {
14910                         throw new Error("initializeWasm() must be awaited first!");
14911                 }
14912                 const nativeResponseValue = wasm.PrivateRoute_into_inner(this_arg);
14913                 return nativeResponseValue;
14914         }
14915         // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
14916         export function CreationError_clone(orig: number): CreationError {
14917                 if(!isWasmInitialized) {
14918                         throw new Error("initializeWasm() must be awaited first!");
14919                 }
14920                 const nativeResponseValue = wasm.CreationError_clone(orig);
14921                 return nativeResponseValue;
14922         }
14923         // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
14924         export function CreationError_eq(a: number, b: number): boolean {
14925                 if(!isWasmInitialized) {
14926                         throw new Error("initializeWasm() must be awaited first!");
14927                 }
14928                 const nativeResponseValue = wasm.CreationError_eq(a, b);
14929                 return nativeResponseValue;
14930         }
14931         // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
14932         export function CreationError_to_str(o: number): String {
14933                 if(!isWasmInitialized) {
14934                         throw new Error("initializeWasm() must be awaited first!");
14935                 }
14936                 const nativeResponseValue = wasm.CreationError_to_str(o);
14937                 return nativeResponseValue;
14938         }
14939         // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
14940         export function SemanticError_clone(orig: number): SemanticError {
14941                 if(!isWasmInitialized) {
14942                         throw new Error("initializeWasm() must be awaited first!");
14943                 }
14944                 const nativeResponseValue = wasm.SemanticError_clone(orig);
14945                 return nativeResponseValue;
14946         }
14947         // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
14948         export function SemanticError_eq(a: number, b: number): boolean {
14949                 if(!isWasmInitialized) {
14950                         throw new Error("initializeWasm() must be awaited first!");
14951                 }
14952                 const nativeResponseValue = wasm.SemanticError_eq(a, b);
14953                 return nativeResponseValue;
14954         }
14955         // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
14956         export function SemanticError_to_str(o: number): String {
14957                 if(!isWasmInitialized) {
14958                         throw new Error("initializeWasm() must be awaited first!");
14959                 }
14960                 const nativeResponseValue = wasm.SemanticError_to_str(o);
14961                 return nativeResponseValue;
14962         }
14963         // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
14964         export function SignOrCreationError_free(this_ptr: number): void {
14965                 if(!isWasmInitialized) {
14966                         throw new Error("initializeWasm() must be awaited first!");
14967                 }
14968                 const nativeResponseValue = wasm.SignOrCreationError_free(this_ptr);
14969                 // debug statements here
14970         }
14971         // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
14972         export function SignOrCreationError_clone(orig: number): number {
14973                 if(!isWasmInitialized) {
14974                         throw new Error("initializeWasm() must be awaited first!");
14975                 }
14976                 const nativeResponseValue = wasm.SignOrCreationError_clone(orig);
14977                 return nativeResponseValue;
14978         }
14979         // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
14980         export function SignOrCreationError_eq(a: number, b: number): boolean {
14981                 if(!isWasmInitialized) {
14982                         throw new Error("initializeWasm() must be awaited first!");
14983                 }
14984                 const nativeResponseValue = wasm.SignOrCreationError_eq(a, b);
14985                 return nativeResponseValue;
14986         }
14987         // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
14988         export function SignOrCreationError_to_str(o: number): String {
14989                 if(!isWasmInitialized) {
14990                         throw new Error("initializeWasm() must be awaited first!");
14991                 }
14992                 const nativeResponseValue = wasm.SignOrCreationError_to_str(o);
14993                 return nativeResponseValue;
14994         }
14995         // 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);
14996         export function create_invoice_from_channelmanager(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description: String): number {
14997                 if(!isWasmInitialized) {
14998                         throw new Error("initializeWasm() must be awaited first!");
14999                 }
15000                 const nativeResponseValue = wasm.create_invoice_from_channelmanager(channelmanager, keys_manager, network, amt_msat, description);
15001                 return nativeResponseValue;
15002         }
15003         // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
15004         export function SiPrefix_from_str(s: String): number {
15005                 if(!isWasmInitialized) {
15006                         throw new Error("initializeWasm() must be awaited first!");
15007                 }
15008                 const nativeResponseValue = wasm.SiPrefix_from_str(s);
15009                 return nativeResponseValue;
15010         }
15011         // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
15012         export function Invoice_from_str(s: String): number {
15013                 if(!isWasmInitialized) {
15014                         throw new Error("initializeWasm() must be awaited first!");
15015                 }
15016                 const nativeResponseValue = wasm.Invoice_from_str(s);
15017                 return nativeResponseValue;
15018         }
15019         // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
15020         export function SignedRawInvoice_from_str(s: String): number {
15021                 if(!isWasmInitialized) {
15022                         throw new Error("initializeWasm() must be awaited first!");
15023                 }
15024                 const nativeResponseValue = wasm.SignedRawInvoice_from_str(s);
15025                 return nativeResponseValue;
15026         }
15027         // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
15028         export function Invoice_to_str(o: number): String {
15029                 if(!isWasmInitialized) {
15030                         throw new Error("initializeWasm() must be awaited first!");
15031                 }
15032                 const nativeResponseValue = wasm.Invoice_to_str(o);
15033                 return nativeResponseValue;
15034         }
15035         // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
15036         export function SignedRawInvoice_to_str(o: number): String {
15037                 if(!isWasmInitialized) {
15038                         throw new Error("initializeWasm() must be awaited first!");
15039                 }
15040                 const nativeResponseValue = wasm.SignedRawInvoice_to_str(o);
15041                 return nativeResponseValue;
15042         }
15043         // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
15044         export function Currency_to_str(o: number): String {
15045                 if(!isWasmInitialized) {
15046                         throw new Error("initializeWasm() must be awaited first!");
15047                 }
15048                 const nativeResponseValue = wasm.Currency_to_str(o);
15049                 return nativeResponseValue;
15050         }
15051         // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
15052         export function SiPrefix_to_str(o: number): String {
15053                 if(!isWasmInitialized) {
15054                         throw new Error("initializeWasm() must be awaited first!");
15055                 }
15056                 const nativeResponseValue = wasm.SiPrefix_to_str(o);
15057                 return nativeResponseValue;
15058         }
15059
15060         export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
15061             if(isWasmInitialized && !allowDoubleInitialization) {
15062                 return;
15063             }
15064             const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
15065             wasm = wasmInstance.exports;
15066             isWasmInitialized = true;
15067         }
15068