6de31bc407a786b2fae11a1f6e76d76a66b057f8
[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 LDKSecp256k1Error 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 LDKSecp256k1Error 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 LDKSecp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
170         public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
171         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
172         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
173         public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
174         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
175         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
176         public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
177         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
178         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
179         public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
180         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
181         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
182         public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
183         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
184         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
185         public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
186         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
187         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
188         public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
189         public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
190         public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
191         public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
192         public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
193         public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
194         public static class LDKErrorAction {
195                 private LDKErrorAction() {}
196                 export class DisconnectPeer extends LDKErrorAction {
197                         public number msg;
198                         DisconnectPeer(number msg) { this.msg = msg; }
199                 }
200                 export class IgnoreError extends LDKErrorAction {
201                         IgnoreError() { }
202                 }
203                 export class SendErrorMessage extends LDKErrorAction {
204                         public number msg;
205                         SendErrorMessage(number msg) { this.msg = msg; }
206                 }
207                 static native void init();
208         }
209         static { LDKErrorAction.init(); }
210         public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
211         public static class LDKHTLCFailChannelUpdate {
212                 private LDKHTLCFailChannelUpdate() {}
213                 export class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
214                         public number msg;
215                         ChannelUpdateMessage(number msg) { this.msg = msg; }
216                 }
217                 export class ChannelClosed extends LDKHTLCFailChannelUpdate {
218                         public number short_channel_id;
219                         public boolean is_permanent;
220                         ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
221                 }
222                 export class NodeFailure extends LDKHTLCFailChannelUpdate {
223                         public Uint8Array node_id;
224                         public boolean is_permanent;
225                         NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
226                 }
227                 static native void init();
228         }
229         static { LDKHTLCFailChannelUpdate.init(); }
230         public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
231         public static class LDKMessageSendEvent {
232                 private LDKMessageSendEvent() {}
233                 export class SendAcceptChannel extends LDKMessageSendEvent {
234                         public Uint8Array node_id;
235                         public number msg;
236                         SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
237                 }
238                 export class SendOpenChannel extends LDKMessageSendEvent {
239                         public Uint8Array node_id;
240                         public number msg;
241                         SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
242                 }
243                 export class SendFundingCreated extends LDKMessageSendEvent {
244                         public Uint8Array node_id;
245                         public number msg;
246                         SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
247                 }
248                 export class SendFundingSigned extends LDKMessageSendEvent {
249                         public Uint8Array node_id;
250                         public number msg;
251                         SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
252                 }
253                 export class SendFundingLocked extends LDKMessageSendEvent {
254                         public Uint8Array node_id;
255                         public number msg;
256                         SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
257                 }
258                 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
259                         public Uint8Array node_id;
260                         public number msg;
261                         SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
262                 }
263                 export class UpdateHTLCs extends LDKMessageSendEvent {
264                         public Uint8Array node_id;
265                         public number updates;
266                         UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
267                 }
268                 export class SendRevokeAndACK extends LDKMessageSendEvent {
269                         public Uint8Array node_id;
270                         public number msg;
271                         SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
272                 }
273                 export class SendClosingSigned extends LDKMessageSendEvent {
274                         public Uint8Array node_id;
275                         public number msg;
276                         SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
277                 }
278                 export class SendShutdown extends LDKMessageSendEvent {
279                         public Uint8Array node_id;
280                         public number msg;
281                         SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
282                 }
283                 export class SendChannelReestablish extends LDKMessageSendEvent {
284                         public Uint8Array node_id;
285                         public number msg;
286                         SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
287                 }
288                 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
289                         public number msg;
290                         public number update_msg;
291                         BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
292                 }
293                 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
294                         public number msg;
295                         BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
296                 }
297                 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
298                         public number msg;
299                         BroadcastChannelUpdate(number msg) { this.msg = msg; }
300                 }
301                 export class HandleError extends LDKMessageSendEvent {
302                         public Uint8Array node_id;
303                         public number action;
304                         HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
305                 }
306                 export class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
307                         public number update;
308                         PaymentFailureNetworkUpdate(number update) { this.update = update; }
309                 }
310                 export class SendChannelRangeQuery extends LDKMessageSendEvent {
311                         public Uint8Array node_id;
312                         public number msg;
313                         SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
314                 }
315                 export class SendShortIdsQuery extends LDKMessageSendEvent {
316                         public Uint8Array node_id;
317                         public number msg;
318                         SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
319                 }
320                 export class SendReplyChannelRange extends LDKMessageSendEvent {
321                         public Uint8Array node_id;
322                         public number msg;
323                         SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
324                 }
325                 static native void init();
326         }
327         static { LDKMessageSendEvent.init(); }
328         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
329         public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
330         public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
331         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
332         public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
333         public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
334         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
335         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
336         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
337         public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
338         public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
339         public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
340         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
341         public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
342         public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
343         public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
344         public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
345         public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
346         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
347         public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
348         public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
349         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
350         public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
351         public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
352         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
353         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
354         public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
355         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
356         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
357         public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
358         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
359         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
360         public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
361         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
362         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
363         public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
364         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
365         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
366         public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
367         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
368         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
369         public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
370         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
371         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
372         public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
373         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
374         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
375         public static class LDKNetAddress {
376                 private LDKNetAddress() {}
377                 export class IPv4 extends LDKNetAddress {
378                         public Uint8Array addr;
379                         public number port;
380                         IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
381                 }
382                 export class IPv6 extends LDKNetAddress {
383                         public Uint8Array addr;
384                         public number port;
385                         IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
386                 }
387                 export class OnionV2 extends LDKNetAddress {
388                         public Uint8Array addr;
389                         public number port;
390                         OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
391                 }
392                 export class OnionV3 extends LDKNetAddress {
393                         public Uint8Array ed25519_pubkey;
394                         public number checksum;
395                         public number version;
396                         public number port;
397                         OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
398                 }
399                 static native void init();
400         }
401         static { LDKNetAddress.init(); }
402         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
403         public static native long LDKCVec_NetAddressZ_new(number[] elems);
404         public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
405         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
406         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
407         public static native long LDKCVec_u64Z_new(number[] elems);
408         public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
409         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
410         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
411         public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
412         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
413         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
414         public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
415         public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
416         public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
417         public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
418         public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
419         public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
420         public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
421         public static class LDKMonitorEvent {
422                 private LDKMonitorEvent() {}
423                 export class HTLCEvent extends LDKMonitorEvent {
424                         HTLCEvent() { }
425                 }
426                 export class CommitmentTxBroadcasted extends LDKMonitorEvent {
427                         CommitmentTxBroadcasted() { }
428                 }
429                 static native void init();
430         }
431         static { LDKMonitorEvent.init(); }
432         public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
433         public static native long LDKCVec_MonitorEventZ_new(number[] elems);
434         public static class LDKSpendableOutputDescriptor {
435                 private LDKSpendableOutputDescriptor() {}
436                 export class StaticOutput extends LDKSpendableOutputDescriptor {
437                         public number outpoint;
438                         public number output;
439                         StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
440                 }
441                 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
442                         DelayedPaymentOutput() { }
443                 }
444                 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
445                         StaticPaymentOutput() { }
446                 }
447                 static native void init();
448         }
449         static { LDKSpendableOutputDescriptor.init(); }
450         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
451         public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
452         public static class LDKEvent {
453                 private LDKEvent() {}
454                 export class FundingGenerationReady extends LDKEvent {
455                         public Uint8Array temporary_channel_id;
456                         public number channel_value_satoshis;
457                         public Uint8Array output_script;
458                         public number user_channel_id;
459                         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; }
460                 }
461                 export class FundingBroadcastSafe extends LDKEvent {
462                         public number funding_txo;
463                         public number user_channel_id;
464                         FundingBroadcastSafe(number funding_txo, number user_channel_id) { this.funding_txo = funding_txo; this.user_channel_id = user_channel_id; }
465                 }
466                 export class PaymentReceived extends LDKEvent {
467                         public Uint8Array payment_hash;
468                         public Uint8Array payment_secret;
469                         public number amt;
470                         PaymentReceived(Uint8Array payment_hash, Uint8Array payment_secret, number amt) { this.payment_hash = payment_hash; this.payment_secret = payment_secret; this.amt = amt; }
471                 }
472                 export class PaymentSent extends LDKEvent {
473                         public Uint8Array payment_preimage;
474                         PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
475                 }
476                 export class PaymentFailed extends LDKEvent {
477                         public Uint8Array payment_hash;
478                         public boolean rejected_by_dest;
479                         PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
480                 }
481                 export class PendingHTLCsForwardable extends LDKEvent {
482                         public number time_forwardable;
483                         PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
484                 }
485                 export class SpendableOutputs extends LDKEvent {
486                         public number[] outputs;
487                         SpendableOutputs(number[] outputs) { this.outputs = outputs; }
488                 }
489                 static native void init();
490         }
491         static { LDKEvent.init(); }
492         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
493         public static native long LDKCVec_EventZ_new(number[] elems);
494         public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
495         public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
496         public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
497         public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
498         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
499         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
500         public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
501         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
502         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
503         public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
504         public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
505         public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
506         public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
507         public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
508         public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
509         public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
510         public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
511         public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
512         public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
513         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
514         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
515         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
516         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
517         public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
518         public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
519         public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
520         public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
521         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
522         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
523         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
524         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
525         public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
526         public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
527         public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
528         public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
529         public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
530         public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
531         public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
532         public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
533         public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
534
535
536
537 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
538
539                 export interface LDKSign {
540                         get_per_commitment_point (idx: number): Uint8Array;
541                         release_commitment_secret (idx: number): Uint8Array;
542                         channel_keys_id (): Uint8Array;
543                         sign_counterparty_commitment (commitment_tx: number): number;
544                         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
545                         sign_justice_transaction (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
546                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
547                         sign_closing_transaction (closing_tx: Uint8Array): number;
548                         sign_channel_announcement (msg: number): number;
549                         ready_channel (channel_parameters: number): void;
550                         write (): Uint8Array;
551                 }
552
553                 export function LDKSign_new(impl: LDKSign, pubkeys: number): number {
554             throw new Error('unimplemented'); // TODO: bind to WASM
555         }
556
557 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
558
559
560         // LDKPublicKey Sign_get_per_commitment_point LDKSign *NONNULL_PTR this_arg, uint64_t idx
561         export function Sign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
562                 if(!isWasmInitialized) {
563                         throw new Error("initializeWasm() must be awaited first!");
564                 }
565                 const nativeResponseValue = wasm.Sign_get_per_commitment_point(this_arg, idx);
566                 return decodeArray(nativeResponseValue);
567         }
568         // LDKThirtyTwoBytes Sign_release_commitment_secret LDKSign *NONNULL_PTR this_arg, uint64_t idx
569         export function Sign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
570                 if(!isWasmInitialized) {
571                         throw new Error("initializeWasm() must be awaited first!");
572                 }
573                 const nativeResponseValue = wasm.Sign_release_commitment_secret(this_arg, idx);
574                 return decodeArray(nativeResponseValue);
575         }
576         // LDKThirtyTwoBytes Sign_channel_keys_id LDKSign *NONNULL_PTR this_arg
577         export function Sign_channel_keys_id(this_arg: number): Uint8Array {
578                 if(!isWasmInitialized) {
579                         throw new Error("initializeWasm() must be awaited first!");
580                 }
581                 const nativeResponseValue = wasm.Sign_channel_keys_id(this_arg);
582                 return decodeArray(nativeResponseValue);
583         }
584         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_counterparty_commitment LDKSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
585         export function Sign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
586                 if(!isWasmInitialized) {
587                         throw new Error("initializeWasm() must be awaited first!");
588                 }
589                 const nativeResponseValue = wasm.Sign_sign_counterparty_commitment(this_arg, commitment_tx);
590                 return nativeResponseValue;
591         }
592         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_holder_commitment_and_htlcs LDKSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
593         export function Sign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
594                 if(!isWasmInitialized) {
595                         throw new Error("initializeWasm() must be awaited first!");
596                 }
597                 const nativeResponseValue = wasm.Sign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
598                 return nativeResponseValue;
599         }
600         // LDKCResult_SignatureNoneZ Sign_sign_justice_transaction LDKSign *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
601         export function Sign_sign_justice_transaction(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
602                 if(!isWasmInitialized) {
603                         throw new Error("initializeWasm() must be awaited first!");
604                 }
605                 const nativeResponseValue = wasm.Sign_sign_justice_transaction(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
606                 return nativeResponseValue;
607         }
608         // LDKCResult_SignatureNoneZ Sign_sign_counterparty_htlc_transaction LDKSign *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
609         export function Sign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
610                 if(!isWasmInitialized) {
611                         throw new Error("initializeWasm() must be awaited first!");
612                 }
613                 const nativeResponseValue = wasm.Sign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
614                 return nativeResponseValue;
615         }
616         // LDKCResult_SignatureNoneZ Sign_sign_closing_transaction LDKSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
617         export function Sign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
618                 if(!isWasmInitialized) {
619                         throw new Error("initializeWasm() must be awaited first!");
620                 }
621                 const nativeResponseValue = wasm.Sign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
622                 return nativeResponseValue;
623         }
624         // LDKCResult_SignatureNoneZ Sign_sign_channel_announcement LDKSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
625         export function Sign_sign_channel_announcement(this_arg: number, msg: number): number {
626                 if(!isWasmInitialized) {
627                         throw new Error("initializeWasm() must be awaited first!");
628                 }
629                 const nativeResponseValue = wasm.Sign_sign_channel_announcement(this_arg, msg);
630                 return nativeResponseValue;
631         }
632         // void Sign_ready_channel LDKSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
633         export function Sign_ready_channel(this_arg: number, channel_parameters: number): void {
634                 if(!isWasmInitialized) {
635                         throw new Error("initializeWasm() must be awaited first!");
636                 }
637                 const nativeResponseValue = wasm.Sign_ready_channel(this_arg, channel_parameters);
638                 // debug statements here
639         }
640         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
641         export function Sign_write(this_arg: number): Uint8Array {
642                 if(!isWasmInitialized) {
643                         throw new Error("initializeWasm() must be awaited first!");
644                 }
645                 const nativeResponseValue = wasm.Sign_write(this_arg);
646                 return decodeArray(nativeResponseValue);
647         }
648         // LDKChannelPublicKeys Sign_get_pubkeys LDKSign *NONNULL_PTR this_arg
649         export function Sign_get_pubkeys(this_arg: number): number {
650                 if(!isWasmInitialized) {
651                         throw new Error("initializeWasm() must be awaited first!");
652                 }
653                 const nativeResponseValue = wasm.Sign_get_pubkeys(this_arg);
654                 return nativeResponseValue;
655         }
656         public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
657         public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
658         public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
659         public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
660         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
661         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
662         public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
663         public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
664         public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
665         public static class LDKAPIError {
666                 private LDKAPIError() {}
667                 export class APIMisuseError extends LDKAPIError {
668                         public Uint8Array err;
669                         APIMisuseError(Uint8Array err) { this.err = err; }
670                 }
671                 export class FeeRateTooHigh extends LDKAPIError {
672                         public Uint8Array err;
673                         public number feerate;
674                         FeeRateTooHigh(Uint8Array err, number feerate) { this.err = err; this.feerate = feerate; }
675                 }
676                 export class RouteError extends LDKAPIError {
677                         public String err;
678                         RouteError(String err) { this.err = err; }
679                 }
680                 export class ChannelUnavailable extends LDKAPIError {
681                         public Uint8Array err;
682                         ChannelUnavailable(Uint8Array err) { this.err = err; }
683                 }
684                 export class MonitorUpdateFailed extends LDKAPIError {
685                         MonitorUpdateFailed() { }
686                 }
687                 static native void init();
688         }
689         static { LDKAPIError.init(); }
690         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
691         public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
692         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
693         public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
694         public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
695         public static native long LDKCVec_APIErrorZ_new(number[] elems);
696         public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
697         public static class LDKPaymentSendFailure {
698                 private LDKPaymentSendFailure() {}
699                 export class ParameterError extends LDKPaymentSendFailure {
700                         ParameterError() { }
701                 }
702                 export class PathParameterError extends LDKPaymentSendFailure {
703                         PathParameterError() { }
704                 }
705                 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
706                         AllFailedRetrySafe() { }
707                 }
708                 export class PartialFailure extends LDKPaymentSendFailure {
709                         PartialFailure() { }
710                 }
711                 static native void init();
712         }
713         static { LDKPaymentSendFailure.init(); }
714         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
715         public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
716         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
717         public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
718         public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
719
720
721
722 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
723
724                 export interface LDKWatch {
725                         watch_channel (funding_txo: number, monitor: number): number;
726                         update_channel (funding_txo: number, update: number): number;
727                         release_pending_monitor_events (): number[];
728                 }
729
730                 export function LDKWatch_new(impl: LDKWatch): number {
731             throw new Error('unimplemented'); // TODO: bind to WASM
732         }
733
734 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
735
736
737         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
738         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
739                 if(!isWasmInitialized) {
740                         throw new Error("initializeWasm() must be awaited first!");
741                 }
742                 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
743                 return nativeResponseValue;
744         }
745         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
746         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
747                 if(!isWasmInitialized) {
748                         throw new Error("initializeWasm() must be awaited first!");
749                 }
750                 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
751                 return nativeResponseValue;
752         }
753         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
754         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
755                 if(!isWasmInitialized) {
756                         throw new Error("initializeWasm() must be awaited first!");
757                 }
758                 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
759                 return nativeResponseValue;
760         }
761
762
763
764 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
765
766                 export interface LDKBroadcasterInterface {
767                         broadcast_transaction (tx: Uint8Array): void;
768                 }
769
770                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
771             throw new Error('unimplemented'); // TODO: bind to WASM
772         }
773
774 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
775
776
777         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
778         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
779                 if(!isWasmInitialized) {
780                         throw new Error("initializeWasm() must be awaited first!");
781                 }
782                 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
783                 // debug statements here
784         }
785         public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
786         public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
787         public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
788
789
790
791 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
792
793                 export interface LDKKeysInterface {
794                         get_node_secret (): Uint8Array;
795                         get_destination_script (): Uint8Array;
796                         get_shutdown_pubkey (): Uint8Array;
797                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
798                         get_secure_random_bytes (): Uint8Array;
799                         read_chan_signer (reader: Uint8Array): number;
800                 }
801
802                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
803             throw new Error('unimplemented'); // TODO: bind to WASM
804         }
805
806 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
807
808
809         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
810         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
811                 if(!isWasmInitialized) {
812                         throw new Error("initializeWasm() must be awaited first!");
813                 }
814                 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
815                 return decodeArray(nativeResponseValue);
816         }
817         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
818         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
819                 if(!isWasmInitialized) {
820                         throw new Error("initializeWasm() must be awaited first!");
821                 }
822                 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
823                 return decodeArray(nativeResponseValue);
824         }
825         // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
826         export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
827                 if(!isWasmInitialized) {
828                         throw new Error("initializeWasm() must be awaited first!");
829                 }
830                 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
831                 return decodeArray(nativeResponseValue);
832         }
833         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
834         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
835                 if(!isWasmInitialized) {
836                         throw new Error("initializeWasm() must be awaited first!");
837                 }
838                 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
839                 return nativeResponseValue;
840         }
841         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
842         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
843                 if(!isWasmInitialized) {
844                         throw new Error("initializeWasm() must be awaited first!");
845                 }
846                 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
847                 return decodeArray(nativeResponseValue);
848         }
849         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
850         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
851                 if(!isWasmInitialized) {
852                         throw new Error("initializeWasm() must be awaited first!");
853                 }
854                 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
855                 return nativeResponseValue;
856         }
857
858
859
860 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
861
862                 export interface LDKFeeEstimator {
863                         get_est_sat_per_1000_weight (confirmation_target: LDKConfirmationTarget): number;
864                 }
865
866                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
867             throw new Error('unimplemented'); // TODO: bind to WASM
868         }
869
870 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
871
872
873         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
874         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: LDKConfirmationTarget): number {
875                 if(!isWasmInitialized) {
876                         throw new Error("initializeWasm() must be awaited first!");
877                 }
878                 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
879                 return nativeResponseValue;
880         }
881
882
883
884 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
885
886                 export interface LDKLogger {
887                         log (record: String): void;
888                 }
889
890                 export function LDKLogger_new(impl: LDKLogger): number {
891             throw new Error('unimplemented'); // TODO: bind to WASM
892         }
893
894 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
895
896
897         public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
898         public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
899         public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
900         public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
901         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
902         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
903         public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
904         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
905         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
906         public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
907         public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
908         public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
909         public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
910         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
911         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
912         public static native long LDKCVec_TxOutZ_new(number[] elems);
913         public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
914         public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
915         public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
916         public static native long LDKCVec_RouteHopZ_new(number[] elems);
917         public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
918         public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
919         public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
920         public static native long LDKCVec_RouteHintZ_new(number[] elems);
921         public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
922         public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
923         public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
924         public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
925         public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
926         public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
927         public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
928         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
929         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
930         public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
931         public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
932         public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
933         public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
934         public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
935         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
936         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
937         public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
938         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
939         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
940         public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
941         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
942         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
943         public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
944         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
945         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
946         public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
947         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
948         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
949         public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
950         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
951         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
952         public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
953         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
954         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
955         public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
956         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
957         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
958         public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
959         public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
960         public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
961         public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
962         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
963         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
964         public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
965         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
966         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
967         public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
968         public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
969         public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
970         public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
971         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
972         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
973         public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
974         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
975         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
976         public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
977         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
978         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
979         public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
980         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
981         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
982         public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
983         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
984         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
985         public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
986         public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
987         public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
988         public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
989         public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
990         public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
991         public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
992         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
993         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
994         public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
995         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
996         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
997         public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
998         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
999         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1000         public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
1001         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1002         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1003         public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
1004         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1005         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1006         public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1007         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1008         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1009         public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1010         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1011         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1012         public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1013         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1014         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1015         public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1016         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1017         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1018         public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1019         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1020         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1021         public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1022         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1023         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1024         public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1025         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1026         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1027
1028
1029
1030 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1031
1032                 export interface LDKMessageSendEventsProvider {
1033                         get_and_clear_pending_msg_events (): number[];
1034                 }
1035
1036                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1037             throw new Error('unimplemented'); // TODO: bind to WASM
1038         }
1039
1040 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1041
1042
1043         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1044         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1045                 if(!isWasmInitialized) {
1046                         throw new Error("initializeWasm() must be awaited first!");
1047                 }
1048                 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1049                 return nativeResponseValue;
1050         }
1051
1052
1053
1054 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1055
1056                 export interface LDKEventsProvider {
1057                         get_and_clear_pending_events (): number[];
1058                 }
1059
1060                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1061             throw new Error('unimplemented'); // TODO: bind to WASM
1062         }
1063
1064 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1065
1066
1067         // LDKCVec_EventZ EventsProvider_get_and_clear_pending_events LDKEventsProvider *NONNULL_PTR this_arg
1068         export function EventsProvider_get_and_clear_pending_events(this_arg: number): number[] {
1069                 if(!isWasmInitialized) {
1070                         throw new Error("initializeWasm() must be awaited first!");
1071                 }
1072                 const nativeResponseValue = wasm.EventsProvider_get_and_clear_pending_events(this_arg);
1073                 return nativeResponseValue;
1074         }
1075
1076
1077
1078 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1079
1080                 export interface LDKAccess {
1081                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1082                 }
1083
1084                 export function LDKAccess_new(impl: LDKAccess): number {
1085             throw new Error('unimplemented'); // TODO: bind to WASM
1086         }
1087
1088 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1089
1090
1091         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1092         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1093                 if(!isWasmInitialized) {
1094                         throw new Error("initializeWasm() must be awaited first!");
1095                 }
1096                 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1097                 return nativeResponseValue;
1098         }
1099
1100
1101
1102 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1103
1104                 export interface LDKListen {
1105                         block_connected (block: Uint8Array, height: number): void;
1106                         block_disconnected (header: Uint8Array, height: number): void;
1107                 }
1108
1109                 export function LDKListen_new(impl: LDKListen): number {
1110             throw new Error('unimplemented'); // TODO: bind to WASM
1111         }
1112
1113 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1114
1115
1116         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1117         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1118                 if(!isWasmInitialized) {
1119                         throw new Error("initializeWasm() must be awaited first!");
1120                 }
1121                 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1122                 // debug statements here
1123         }
1124         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1125         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1126                 if(!isWasmInitialized) {
1127                         throw new Error("initializeWasm() must be awaited first!");
1128                 }
1129                 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1130                 // debug statements here
1131         }
1132
1133
1134
1135 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1136
1137                 export interface LDKFilter {
1138                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1139                         register_output (outpoint: number, script_pubkey: Uint8Array): void;
1140                 }
1141
1142                 export function LDKFilter_new(impl: LDKFilter): number {
1143             throw new Error('unimplemented'); // TODO: bind to WASM
1144         }
1145
1146 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1147
1148
1149         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1150         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1151                 if(!isWasmInitialized) {
1152                         throw new Error("initializeWasm() must be awaited first!");
1153                 }
1154                 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1155                 // debug statements here
1156         }
1157         // void Filter_register_output LDKFilter *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey
1158         export function Filter_register_output(this_arg: number, outpoint: number, script_pubkey: Uint8Array): void {
1159                 if(!isWasmInitialized) {
1160                         throw new Error("initializeWasm() must be awaited first!");
1161                 }
1162                 const nativeResponseValue = wasm.Filter_register_output(this_arg, outpoint, encodeArray(script_pubkey));
1163                 // debug statements here
1164         }
1165
1166
1167
1168 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1169
1170                 export interface LDKPersist {
1171                         persist_new_channel (id: number, data: number): number;
1172                         update_persisted_channel (id: number, update: number, data: number): number;
1173                 }
1174
1175                 export function LDKPersist_new(impl: LDKPersist): number {
1176             throw new Error('unimplemented'); // TODO: bind to WASM
1177         }
1178
1179 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1180
1181
1182         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1183         export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1184                 if(!isWasmInitialized) {
1185                         throw new Error("initializeWasm() must be awaited first!");
1186                 }
1187                 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1188                 return nativeResponseValue;
1189         }
1190         // 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
1191         export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1192                 if(!isWasmInitialized) {
1193                         throw new Error("initializeWasm() must be awaited first!");
1194                 }
1195                 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1196                 return nativeResponseValue;
1197         }
1198
1199
1200
1201 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1202
1203                 export interface LDKChannelMessageHandler {
1204                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1205                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1206                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1207                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1208                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1209                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1210                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1211                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1212                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1213                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1214                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1215                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1216                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1217                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1218                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1219                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1220                         peer_connected (their_node_id: Uint8Array, msg: number): void;
1221                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1222                         handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1223                         handle_error (their_node_id: Uint8Array, msg: number): void;
1224                 }
1225
1226                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1227             throw new Error('unimplemented'); // TODO: bind to WASM
1228         }
1229
1230 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1231
1232
1233         // 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
1234         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1235                 if(!isWasmInitialized) {
1236                         throw new Error("initializeWasm() must be awaited first!");
1237                 }
1238                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1239                 // debug statements here
1240         }
1241         // 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
1242         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1243                 if(!isWasmInitialized) {
1244                         throw new Error("initializeWasm() must be awaited first!");
1245                 }
1246                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1247                 // debug statements here
1248         }
1249         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1250         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1251                 if(!isWasmInitialized) {
1252                         throw new Error("initializeWasm() must be awaited first!");
1253                 }
1254                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1255                 // debug statements here
1256         }
1257         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1258         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1259                 if(!isWasmInitialized) {
1260                         throw new Error("initializeWasm() must be awaited first!");
1261                 }
1262                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1263                 // debug statements here
1264         }
1265         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1266         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1267                 if(!isWasmInitialized) {
1268                         throw new Error("initializeWasm() must be awaited first!");
1269                 }
1270                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1271                 // debug statements here
1272         }
1273         // 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
1274         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1275                 if(!isWasmInitialized) {
1276                         throw new Error("initializeWasm() must be awaited first!");
1277                 }
1278                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1279                 // debug statements here
1280         }
1281         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1282         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1283                 if(!isWasmInitialized) {
1284                         throw new Error("initializeWasm() must be awaited first!");
1285                 }
1286                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1287                 // debug statements here
1288         }
1289         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1290         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1291                 if(!isWasmInitialized) {
1292                         throw new Error("initializeWasm() must be awaited first!");
1293                 }
1294                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1295                 // debug statements here
1296         }
1297         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1298         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1299                 if(!isWasmInitialized) {
1300                         throw new Error("initializeWasm() must be awaited first!");
1301                 }
1302                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1303                 // debug statements here
1304         }
1305         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1306         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1307                 if(!isWasmInitialized) {
1308                         throw new Error("initializeWasm() must be awaited first!");
1309                 }
1310                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1311                 // debug statements here
1312         }
1313         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1314         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1315                 if(!isWasmInitialized) {
1316                         throw new Error("initializeWasm() must be awaited first!");
1317                 }
1318                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1319                 // debug statements here
1320         }
1321         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1322         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1323                 if(!isWasmInitialized) {
1324                         throw new Error("initializeWasm() must be awaited first!");
1325                 }
1326                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1327                 // debug statements here
1328         }
1329         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1330         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1331                 if(!isWasmInitialized) {
1332                         throw new Error("initializeWasm() must be awaited first!");
1333                 }
1334                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1335                 // debug statements here
1336         }
1337         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1338         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1339                 if(!isWasmInitialized) {
1340                         throw new Error("initializeWasm() must be awaited first!");
1341                 }
1342                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1343                 // debug statements here
1344         }
1345         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1346         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1347                 if(!isWasmInitialized) {
1348                         throw new Error("initializeWasm() must be awaited first!");
1349                 }
1350                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1351                 // debug statements here
1352         }
1353         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1354         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1355                 if(!isWasmInitialized) {
1356                         throw new Error("initializeWasm() must be awaited first!");
1357                 }
1358                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1359                 // debug statements here
1360         }
1361         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1362         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1363                 if(!isWasmInitialized) {
1364                         throw new Error("initializeWasm() must be awaited first!");
1365                 }
1366                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1367                 // debug statements here
1368         }
1369         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1370         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1371                 if(!isWasmInitialized) {
1372                         throw new Error("initializeWasm() must be awaited first!");
1373                 }
1374                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1375                 // debug statements here
1376         }
1377         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
1378         export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1379                 if(!isWasmInitialized) {
1380                         throw new Error("initializeWasm() must be awaited first!");
1381                 }
1382                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
1383                 // debug statements here
1384         }
1385         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1386         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1387                 if(!isWasmInitialized) {
1388                         throw new Error("initializeWasm() must be awaited first!");
1389                 }
1390                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1391                 // debug statements here
1392         }
1393
1394
1395
1396 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1397
1398                 export interface LDKRoutingMessageHandler {
1399                         handle_node_announcement (msg: number): number;
1400                         handle_channel_announcement (msg: number): number;
1401                         handle_channel_update (msg: number): number;
1402                         handle_htlc_fail_channel_update (update: number): void;
1403                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1404                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1405                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
1406                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1407                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1408                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1409                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1410                 }
1411
1412                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1413             throw new Error('unimplemented'); // TODO: bind to WASM
1414         }
1415
1416 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1417
1418
1419         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1420         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1421                 if(!isWasmInitialized) {
1422                         throw new Error("initializeWasm() must be awaited first!");
1423                 }
1424                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1425                 return nativeResponseValue;
1426         }
1427         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1428         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1429                 if(!isWasmInitialized) {
1430                         throw new Error("initializeWasm() must be awaited first!");
1431                 }
1432                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1433                 return nativeResponseValue;
1434         }
1435         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1436         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1437                 if(!isWasmInitialized) {
1438                         throw new Error("initializeWasm() must be awaited first!");
1439                 }
1440                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1441                 return nativeResponseValue;
1442         }
1443         // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1444         export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1445                 if(!isWasmInitialized) {
1446                         throw new Error("initializeWasm() must be awaited first!");
1447                 }
1448                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1449                 // debug statements here
1450         }
1451         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1452         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1453                 if(!isWasmInitialized) {
1454                         throw new Error("initializeWasm() must be awaited first!");
1455                 }
1456                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1457                 return nativeResponseValue;
1458         }
1459         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1460         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1461                 if(!isWasmInitialized) {
1462                         throw new Error("initializeWasm() must be awaited first!");
1463                 }
1464                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1465                 return nativeResponseValue;
1466         }
1467         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1468         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1469                 if(!isWasmInitialized) {
1470                         throw new Error("initializeWasm() must be awaited first!");
1471                 }
1472                 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1473                 // debug statements here
1474         }
1475         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1476         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1477                 if(!isWasmInitialized) {
1478                         throw new Error("initializeWasm() must be awaited first!");
1479                 }
1480                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1481                 return nativeResponseValue;
1482         }
1483         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1484         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1485                 if(!isWasmInitialized) {
1486                         throw new Error("initializeWasm() must be awaited first!");
1487                 }
1488                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1489                 return nativeResponseValue;
1490         }
1491         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1492         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1493                 if(!isWasmInitialized) {
1494                         throw new Error("initializeWasm() must be awaited first!");
1495                 }
1496                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1497                 return nativeResponseValue;
1498         }
1499         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1500         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1501                 if(!isWasmInitialized) {
1502                         throw new Error("initializeWasm() must be awaited first!");
1503                 }
1504                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1505                 return nativeResponseValue;
1506         }
1507
1508
1509
1510 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1511
1512                 export interface LDKSocketDescriptor {
1513                         send_data (data: Uint8Array, resume_read: boolean): number;
1514                         disconnect_socket (): void;
1515                         eq (other_arg: number): boolean;
1516                         hash (): number;
1517                 }
1518
1519                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1520             throw new Error('unimplemented'); // TODO: bind to WASM
1521         }
1522
1523 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1524
1525
1526         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1527         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1528                 if(!isWasmInitialized) {
1529                         throw new Error("initializeWasm() must be awaited first!");
1530                 }
1531                 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1532                 return nativeResponseValue;
1533         }
1534         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1535         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1536                 if(!isWasmInitialized) {
1537                         throw new Error("initializeWasm() must be awaited first!");
1538                 }
1539                 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1540                 // debug statements here
1541         }
1542         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1543         export function SocketDescriptor_hash(this_arg: number): number {
1544                 if(!isWasmInitialized) {
1545                         throw new Error("initializeWasm() must be awaited first!");
1546                 }
1547                 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1548                 return nativeResponseValue;
1549         }
1550         // void Transaction_free(struct LDKTransaction _res);
1551         export function Transaction_free(_res: Uint8Array): void {
1552                 if(!isWasmInitialized) {
1553                         throw new Error("initializeWasm() must be awaited first!");
1554                 }
1555                 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1556                 // debug statements here
1557         }
1558         // void TxOut_free(struct LDKTxOut _res);
1559         export function TxOut_free(_res: number): void {
1560                 if(!isWasmInitialized) {
1561                         throw new Error("initializeWasm() must be awaited first!");
1562                 }
1563                 const nativeResponseValue = wasm.TxOut_free(_res);
1564                 // debug statements here
1565         }
1566         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1567         export function TxOut_clone(orig: number): number {
1568                 if(!isWasmInitialized) {
1569                         throw new Error("initializeWasm() must be awaited first!");
1570                 }
1571                 const nativeResponseValue = wasm.TxOut_clone(orig);
1572                 return nativeResponseValue;
1573         }
1574         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1575         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1576                 if(!isWasmInitialized) {
1577                         throw new Error("initializeWasm() must be awaited first!");
1578                 }
1579                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1580                 return nativeResponseValue;
1581         }
1582         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1583         export function CResult_SecretKeyErrorZ_err(e: LDKSecp256k1Error): number {
1584                 if(!isWasmInitialized) {
1585                         throw new Error("initializeWasm() must be awaited first!");
1586                 }
1587                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1588                 return nativeResponseValue;
1589         }
1590         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1591         export function CResult_SecretKeyErrorZ_free(_res: number): void {
1592                 if(!isWasmInitialized) {
1593                         throw new Error("initializeWasm() must be awaited first!");
1594                 }
1595                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1596                 // debug statements here
1597         }
1598         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1599         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1600                 if(!isWasmInitialized) {
1601                         throw new Error("initializeWasm() must be awaited first!");
1602                 }
1603                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1604                 return nativeResponseValue;
1605         }
1606         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1607         export function CResult_PublicKeyErrorZ_err(e: LDKSecp256k1Error): number {
1608                 if(!isWasmInitialized) {
1609                         throw new Error("initializeWasm() must be awaited first!");
1610                 }
1611                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1612                 return nativeResponseValue;
1613         }
1614         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1615         export function CResult_PublicKeyErrorZ_free(_res: number): void {
1616                 if(!isWasmInitialized) {
1617                         throw new Error("initializeWasm() must be awaited first!");
1618                 }
1619                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
1620                 // debug statements here
1621         }
1622         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1623         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
1624                 if(!isWasmInitialized) {
1625                         throw new Error("initializeWasm() must be awaited first!");
1626                 }
1627                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
1628                 return nativeResponseValue;
1629         }
1630         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1631         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
1632                 if(!isWasmInitialized) {
1633                         throw new Error("initializeWasm() must be awaited first!");
1634                 }
1635                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
1636                 return nativeResponseValue;
1637         }
1638         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1639         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
1640                 if(!isWasmInitialized) {
1641                         throw new Error("initializeWasm() must be awaited first!");
1642                 }
1643                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
1644                 // debug statements here
1645         }
1646         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1647         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
1648                 if(!isWasmInitialized) {
1649                         throw new Error("initializeWasm() must be awaited first!");
1650                 }
1651                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
1652                 return nativeResponseValue;
1653         }
1654         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1655         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
1656                 if(!isWasmInitialized) {
1657                         throw new Error("initializeWasm() must be awaited first!");
1658                 }
1659                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
1660                 return nativeResponseValue;
1661         }
1662         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1663         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
1664                 if(!isWasmInitialized) {
1665                         throw new Error("initializeWasm() must be awaited first!");
1666                 }
1667                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
1668                 return nativeResponseValue;
1669         }
1670         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
1671         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
1672                 if(!isWasmInitialized) {
1673                         throw new Error("initializeWasm() must be awaited first!");
1674                 }
1675                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
1676                 // debug statements here
1677         }
1678         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
1679         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
1680                 if(!isWasmInitialized) {
1681                         throw new Error("initializeWasm() must be awaited first!");
1682                 }
1683                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
1684                 return nativeResponseValue;
1685         }
1686         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
1687         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
1688                 if(!isWasmInitialized) {
1689                         throw new Error("initializeWasm() must be awaited first!");
1690                 }
1691                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
1692                 return nativeResponseValue;
1693         }
1694         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
1695         export function CResult_TxCreationKeysErrorZ_err(e: LDKSecp256k1Error): number {
1696                 if(!isWasmInitialized) {
1697                         throw new Error("initializeWasm() must be awaited first!");
1698                 }
1699                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
1700                 return nativeResponseValue;
1701         }
1702         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
1703         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
1704                 if(!isWasmInitialized) {
1705                         throw new Error("initializeWasm() must be awaited first!");
1706                 }
1707                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
1708                 // debug statements here
1709         }
1710         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
1711         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
1712                 if(!isWasmInitialized) {
1713                         throw new Error("initializeWasm() must be awaited first!");
1714                 }
1715                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
1716                 return nativeResponseValue;
1717         }
1718         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
1719         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
1720                 if(!isWasmInitialized) {
1721                         throw new Error("initializeWasm() must be awaited first!");
1722                 }
1723                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
1724                 return nativeResponseValue;
1725         }
1726         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
1727         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
1728                 if(!isWasmInitialized) {
1729                         throw new Error("initializeWasm() must be awaited first!");
1730                 }
1731                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
1732                 // debug statements here
1733         }
1734         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
1735         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
1736                 if(!isWasmInitialized) {
1737                         throw new Error("initializeWasm() must be awaited first!");
1738                 }
1739                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
1740                 return nativeResponseValue;
1741         }
1742         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
1743         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1744                 if(!isWasmInitialized) {
1745                         throw new Error("initializeWasm() must be awaited first!");
1746                 }
1747                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
1748                 return nativeResponseValue;
1749         }
1750         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1751         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1752                 if(!isWasmInitialized) {
1753                         throw new Error("initializeWasm() must be awaited first!");
1754                 }
1755                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
1756                 return nativeResponseValue;
1757         }
1758         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
1759         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1760                 if(!isWasmInitialized) {
1761                         throw new Error("initializeWasm() must be awaited first!");
1762                 }
1763                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
1764                 // debug statements here
1765         }
1766         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1767         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1768                 if(!isWasmInitialized) {
1769                         throw new Error("initializeWasm() must be awaited first!");
1770                 }
1771                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
1772                 return nativeResponseValue;
1773         }
1774         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
1775         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1776                 if(!isWasmInitialized) {
1777                         throw new Error("initializeWasm() must be awaited first!");
1778                 }
1779                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
1780                 return nativeResponseValue;
1781         }
1782         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1783         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1784                 if(!isWasmInitialized) {
1785                         throw new Error("initializeWasm() must be awaited first!");
1786                 }
1787                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
1788                 return nativeResponseValue;
1789         }
1790         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
1791         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1792                 if(!isWasmInitialized) {
1793                         throw new Error("initializeWasm() must be awaited first!");
1794                 }
1795                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
1796                 // debug statements here
1797         }
1798         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1799         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1800                 if(!isWasmInitialized) {
1801                         throw new Error("initializeWasm() must be awaited first!");
1802                 }
1803                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
1804                 return nativeResponseValue;
1805         }
1806         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
1807         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
1808                 if(!isWasmInitialized) {
1809                         throw new Error("initializeWasm() must be awaited first!");
1810                 }
1811                 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
1812                 // debug statements here
1813         }
1814         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
1815         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1816                 if(!isWasmInitialized) {
1817                         throw new Error("initializeWasm() must be awaited first!");
1818                 }
1819                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
1820                 return nativeResponseValue;
1821         }
1822         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1823         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
1824                 if(!isWasmInitialized) {
1825                         throw new Error("initializeWasm() must be awaited first!");
1826                 }
1827                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
1828                 return nativeResponseValue;
1829         }
1830         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
1831         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1832                 if(!isWasmInitialized) {
1833                         throw new Error("initializeWasm() must be awaited first!");
1834                 }
1835                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
1836                 // debug statements here
1837         }
1838         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1839         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1840                 if(!isWasmInitialized) {
1841                         throw new Error("initializeWasm() must be awaited first!");
1842                 }
1843                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
1844                 return nativeResponseValue;
1845         }
1846         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
1847         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1848                 if(!isWasmInitialized) {
1849                         throw new Error("initializeWasm() must be awaited first!");
1850                 }
1851                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
1852                 return nativeResponseValue;
1853         }
1854         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1855         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
1856                 if(!isWasmInitialized) {
1857                         throw new Error("initializeWasm() must be awaited first!");
1858                 }
1859                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
1860                 return nativeResponseValue;
1861         }
1862         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
1863         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1864                 if(!isWasmInitialized) {
1865                         throw new Error("initializeWasm() must be awaited first!");
1866                 }
1867                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
1868                 // debug statements here
1869         }
1870         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1871         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1872                 if(!isWasmInitialized) {
1873                         throw new Error("initializeWasm() must be awaited first!");
1874                 }
1875                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
1876                 return nativeResponseValue;
1877         }
1878         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
1879         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
1880                 if(!isWasmInitialized) {
1881                         throw new Error("initializeWasm() must be awaited first!");
1882                 }
1883                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
1884                 return nativeResponseValue;
1885         }
1886         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1887         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
1888                 if(!isWasmInitialized) {
1889                         throw new Error("initializeWasm() must be awaited first!");
1890                 }
1891                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
1892                 return nativeResponseValue;
1893         }
1894         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
1895         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
1896                 if(!isWasmInitialized) {
1897                         throw new Error("initializeWasm() must be awaited first!");
1898                 }
1899                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
1900                 // debug statements here
1901         }
1902         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1903         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1904                 if(!isWasmInitialized) {
1905                         throw new Error("initializeWasm() must be awaited first!");
1906                 }
1907                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
1908                 return nativeResponseValue;
1909         }
1910         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
1911         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
1912                 if(!isWasmInitialized) {
1913                         throw new Error("initializeWasm() must be awaited first!");
1914                 }
1915                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
1916                 return nativeResponseValue;
1917         }
1918         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
1919         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
1920                 if(!isWasmInitialized) {
1921                         throw new Error("initializeWasm() must be awaited first!");
1922                 }
1923                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
1924                 return nativeResponseValue;
1925         }
1926         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
1927         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
1928                 if(!isWasmInitialized) {
1929                         throw new Error("initializeWasm() must be awaited first!");
1930                 }
1931                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
1932                 // debug statements here
1933         }
1934         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
1935         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
1936                 if(!isWasmInitialized) {
1937                         throw new Error("initializeWasm() must be awaited first!");
1938                 }
1939                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
1940                 return nativeResponseValue;
1941         }
1942         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
1943         export function CResult_CVec_SignatureZNoneZ_err(): number {
1944                 if(!isWasmInitialized) {
1945                         throw new Error("initializeWasm() must be awaited first!");
1946                 }
1947                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
1948                 return nativeResponseValue;
1949         }
1950         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
1951         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
1952                 if(!isWasmInitialized) {
1953                         throw new Error("initializeWasm() must be awaited first!");
1954                 }
1955                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
1956                 // debug statements here
1957         }
1958         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
1959         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
1960                 if(!isWasmInitialized) {
1961                         throw new Error("initializeWasm() must be awaited first!");
1962                 }
1963                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
1964                 return nativeResponseValue;
1965         }
1966         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
1967         export function CVec_MessageSendEventZ_free(_res: number[]): void {
1968                 if(!isWasmInitialized) {
1969                         throw new Error("initializeWasm() must be awaited first!");
1970                 }
1971                 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
1972                 // debug statements here
1973         }
1974         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
1975         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
1976                 if(!isWasmInitialized) {
1977                         throw new Error("initializeWasm() must be awaited first!");
1978                 }
1979                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
1980                 return nativeResponseValue;
1981         }
1982         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
1983         export function CResult_boolLightningErrorZ_err(e: number): number {
1984                 if(!isWasmInitialized) {
1985                         throw new Error("initializeWasm() must be awaited first!");
1986                 }
1987                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
1988                 return nativeResponseValue;
1989         }
1990         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
1991         export function CResult_boolLightningErrorZ_free(_res: number): void {
1992                 if(!isWasmInitialized) {
1993                         throw new Error("initializeWasm() must be awaited first!");
1994                 }
1995                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
1996                 // debug statements here
1997         }
1998         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
1999         export function CResult_boolLightningErrorZ_clone(orig: number): number {
2000                 if(!isWasmInitialized) {
2001                         throw new Error("initializeWasm() must be awaited first!");
2002                 }
2003                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
2004                 return nativeResponseValue;
2005         }
2006         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
2007         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
2008                 if(!isWasmInitialized) {
2009                         throw new Error("initializeWasm() must be awaited first!");
2010                 }
2011                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
2012                 return nativeResponseValue;
2013         }
2014         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
2015         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
2016                 if(!isWasmInitialized) {
2017                         throw new Error("initializeWasm() must be awaited first!");
2018                 }
2019                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
2020                 return nativeResponseValue;
2021         }
2022         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
2023         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
2024                 if(!isWasmInitialized) {
2025                         throw new Error("initializeWasm() must be awaited first!");
2026                 }
2027                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
2028                 // debug statements here
2029         }
2030         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
2031         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
2032                 if(!isWasmInitialized) {
2033                         throw new Error("initializeWasm() must be awaited first!");
2034                 }
2035                 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
2036                 // debug statements here
2037         }
2038         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
2039         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
2040                 if(!isWasmInitialized) {
2041                         throw new Error("initializeWasm() must be awaited first!");
2042                 }
2043                 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
2044                 // debug statements here
2045         }
2046         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
2047         export function CResult_NoneLightningErrorZ_ok(): number {
2048                 if(!isWasmInitialized) {
2049                         throw new Error("initializeWasm() must be awaited first!");
2050                 }
2051                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
2052                 return nativeResponseValue;
2053         }
2054         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
2055         export function CResult_NoneLightningErrorZ_err(e: number): number {
2056                 if(!isWasmInitialized) {
2057                         throw new Error("initializeWasm() must be awaited first!");
2058                 }
2059                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
2060                 return nativeResponseValue;
2061         }
2062         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
2063         export function CResult_NoneLightningErrorZ_free(_res: number): void {
2064                 if(!isWasmInitialized) {
2065                         throw new Error("initializeWasm() must be awaited first!");
2066                 }
2067                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
2068                 // debug statements here
2069         }
2070         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
2071         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
2072                 if(!isWasmInitialized) {
2073                         throw new Error("initializeWasm() must be awaited first!");
2074                 }
2075                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
2076                 return nativeResponseValue;
2077         }
2078         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
2079         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
2080                 if(!isWasmInitialized) {
2081                         throw new Error("initializeWasm() must be awaited first!");
2082                 }
2083                 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
2084                 // debug statements here
2085         }
2086         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
2087         export function CVec_u8Z_free(_res: Uint8Array): void {
2088                 if(!isWasmInitialized) {
2089                         throw new Error("initializeWasm() must be awaited first!");
2090                 }
2091                 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
2092                 // debug statements here
2093         }
2094         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
2095         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
2096                 if(!isWasmInitialized) {
2097                         throw new Error("initializeWasm() must be awaited first!");
2098                 }
2099                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
2100                 return nativeResponseValue;
2101         }
2102         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2103         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
2104                 if(!isWasmInitialized) {
2105                         throw new Error("initializeWasm() must be awaited first!");
2106                 }
2107                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
2108                 return nativeResponseValue;
2109         }
2110         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
2111         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
2112                 if(!isWasmInitialized) {
2113                         throw new Error("initializeWasm() must be awaited first!");
2114                 }
2115                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
2116                 // debug statements here
2117         }
2118         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
2119         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
2120                 if(!isWasmInitialized) {
2121                         throw new Error("initializeWasm() must be awaited first!");
2122                 }
2123                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
2124                 return nativeResponseValue;
2125         }
2126         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
2127         export function CResult_NonePeerHandleErrorZ_ok(): number {
2128                 if(!isWasmInitialized) {
2129                         throw new Error("initializeWasm() must be awaited first!");
2130                 }
2131                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
2132                 return nativeResponseValue;
2133         }
2134         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
2135         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
2136                 if(!isWasmInitialized) {
2137                         throw new Error("initializeWasm() must be awaited first!");
2138                 }
2139                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
2140                 return nativeResponseValue;
2141         }
2142         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
2143         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
2144                 if(!isWasmInitialized) {
2145                         throw new Error("initializeWasm() must be awaited first!");
2146                 }
2147                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
2148                 // debug statements here
2149         }
2150         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
2151         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
2152                 if(!isWasmInitialized) {
2153                         throw new Error("initializeWasm() must be awaited first!");
2154                 }
2155                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
2156                 return nativeResponseValue;
2157         }
2158         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
2159         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
2160                 if(!isWasmInitialized) {
2161                         throw new Error("initializeWasm() must be awaited first!");
2162                 }
2163                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
2164                 return nativeResponseValue;
2165         }
2166         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2167         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
2168                 if(!isWasmInitialized) {
2169                         throw new Error("initializeWasm() must be awaited first!");
2170                 }
2171                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
2172                 return nativeResponseValue;
2173         }
2174         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
2175         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
2176                 if(!isWasmInitialized) {
2177                         throw new Error("initializeWasm() must be awaited first!");
2178                 }
2179                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
2180                 // debug statements here
2181         }
2182         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
2183         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
2184                 if(!isWasmInitialized) {
2185                         throw new Error("initializeWasm() must be awaited first!");
2186                 }
2187                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
2188                 return nativeResponseValue;
2189         }
2190         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
2191         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
2192                 if(!isWasmInitialized) {
2193                         throw new Error("initializeWasm() must be awaited first!");
2194                 }
2195                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
2196                 return nativeResponseValue;
2197         }
2198         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2199         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
2200                 if(!isWasmInitialized) {
2201                         throw new Error("initializeWasm() must be awaited first!");
2202                 }
2203                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
2204                 return nativeResponseValue;
2205         }
2206         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
2207         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
2208                 if(!isWasmInitialized) {
2209                         throw new Error("initializeWasm() must be awaited first!");
2210                 }
2211                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
2212                 // debug statements here
2213         }
2214         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
2215         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
2216                 if(!isWasmInitialized) {
2217                         throw new Error("initializeWasm() must be awaited first!");
2218                 }
2219                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
2220                 return nativeResponseValue;
2221         }
2222         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2223         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
2224                 if(!isWasmInitialized) {
2225                         throw new Error("initializeWasm() must be awaited first!");
2226                 }
2227                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
2228                 return nativeResponseValue;
2229         }
2230         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
2231         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
2232                 if(!isWasmInitialized) {
2233                         throw new Error("initializeWasm() must be awaited first!");
2234                 }
2235                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
2236                 // debug statements here
2237         }
2238         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
2239         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
2240                 if(!isWasmInitialized) {
2241                         throw new Error("initializeWasm() must be awaited first!");
2242                 }
2243                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
2244                 return nativeResponseValue;
2245         }
2246         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2247         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
2248                 if(!isWasmInitialized) {
2249                         throw new Error("initializeWasm() must be awaited first!");
2250                 }
2251                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
2252                 return nativeResponseValue;
2253         }
2254         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
2255         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
2256                 if(!isWasmInitialized) {
2257                         throw new Error("initializeWasm() must be awaited first!");
2258                 }
2259                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
2260                 // debug statements here
2261         }
2262         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
2263         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
2264                 if(!isWasmInitialized) {
2265                         throw new Error("initializeWasm() must be awaited first!");
2266                 }
2267                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
2268                 return nativeResponseValue;
2269         }
2270         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2271         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
2272                 if(!isWasmInitialized) {
2273                         throw new Error("initializeWasm() must be awaited first!");
2274                 }
2275                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
2276                 return nativeResponseValue;
2277         }
2278         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
2279         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
2280                 if(!isWasmInitialized) {
2281                         throw new Error("initializeWasm() must be awaited first!");
2282                 }
2283                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
2284                 // debug statements here
2285         }
2286         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
2287         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
2288                 if(!isWasmInitialized) {
2289                         throw new Error("initializeWasm() must be awaited first!");
2290                 }
2291                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
2292                 return nativeResponseValue;
2293         }
2294         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
2295         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
2296                 if(!isWasmInitialized) {
2297                         throw new Error("initializeWasm() must be awaited first!");
2298                 }
2299                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
2300                 return nativeResponseValue;
2301         }
2302         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
2303         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
2304                 if(!isWasmInitialized) {
2305                         throw new Error("initializeWasm() must be awaited first!");
2306                 }
2307                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
2308                 // debug statements here
2309         }
2310         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
2311         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
2312                 if(!isWasmInitialized) {
2313                         throw new Error("initializeWasm() must be awaited first!");
2314                 }
2315                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
2316                 return nativeResponseValue;
2317         }
2318         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
2319         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
2320                 if(!isWasmInitialized) {
2321                         throw new Error("initializeWasm() must be awaited first!");
2322                 }
2323                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
2324                 return nativeResponseValue;
2325         }
2326         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2327         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
2328                 if(!isWasmInitialized) {
2329                         throw new Error("initializeWasm() must be awaited first!");
2330                 }
2331                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
2332                 return nativeResponseValue;
2333         }
2334         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
2335         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
2336                 if(!isWasmInitialized) {
2337                         throw new Error("initializeWasm() must be awaited first!");
2338                 }
2339                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
2340                 // debug statements here
2341         }
2342         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2343         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
2344                 if(!isWasmInitialized) {
2345                         throw new Error("initializeWasm() must be awaited first!");
2346                 }
2347                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
2348                 return nativeResponseValue;
2349         }
2350         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
2351         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
2352                 if(!isWasmInitialized) {
2353                         throw new Error("initializeWasm() must be awaited first!");
2354                 }
2355                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
2356                 return nativeResponseValue;
2357         }
2358         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2359         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
2360                 if(!isWasmInitialized) {
2361                         throw new Error("initializeWasm() must be awaited first!");
2362                 }
2363                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
2364                 return nativeResponseValue;
2365         }
2366         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
2367         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
2368                 if(!isWasmInitialized) {
2369                         throw new Error("initializeWasm() must be awaited first!");
2370                 }
2371                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
2372                 // debug statements here
2373         }
2374         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2375         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
2376                 if(!isWasmInitialized) {
2377                         throw new Error("initializeWasm() must be awaited first!");
2378                 }
2379                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
2380                 return nativeResponseValue;
2381         }
2382         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
2383         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
2384                 if(!isWasmInitialized) {
2385                         throw new Error("initializeWasm() must be awaited first!");
2386                 }
2387                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
2388                 return nativeResponseValue;
2389         }
2390         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
2391         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
2392                 if(!isWasmInitialized) {
2393                         throw new Error("initializeWasm() must be awaited first!");
2394                 }
2395                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
2396                 return nativeResponseValue;
2397         }
2398         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
2399         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
2400                 if(!isWasmInitialized) {
2401                         throw new Error("initializeWasm() must be awaited first!");
2402                 }
2403                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
2404                 // debug statements here
2405         }
2406         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
2407         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
2408                 if(!isWasmInitialized) {
2409                         throw new Error("initializeWasm() must be awaited first!");
2410                 }
2411                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
2412                 return nativeResponseValue;
2413         }
2414         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
2415         export function CVec_NetAddressZ_free(_res: number[]): void {
2416                 if(!isWasmInitialized) {
2417                         throw new Error("initializeWasm() must be awaited first!");
2418                 }
2419                 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
2420                 // debug statements here
2421         }
2422         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
2423         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
2424                 if(!isWasmInitialized) {
2425                         throw new Error("initializeWasm() must be awaited first!");
2426                 }
2427                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
2428                 return nativeResponseValue;
2429         }
2430         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
2431         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
2432                 if(!isWasmInitialized) {
2433                         throw new Error("initializeWasm() must be awaited first!");
2434                 }
2435                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
2436                 return nativeResponseValue;
2437         }
2438         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
2439         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
2440                 if(!isWasmInitialized) {
2441                         throw new Error("initializeWasm() must be awaited first!");
2442                 }
2443                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
2444                 // debug statements here
2445         }
2446         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
2447         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
2448                 if(!isWasmInitialized) {
2449                         throw new Error("initializeWasm() must be awaited first!");
2450                 }
2451                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
2452                 return nativeResponseValue;
2453         }
2454         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
2455         export function CVec_u64Z_free(_res: number[]): void {
2456                 if(!isWasmInitialized) {
2457                         throw new Error("initializeWasm() must be awaited first!");
2458                 }
2459                 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
2460                 // debug statements here
2461         }
2462         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
2463         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
2464                 if(!isWasmInitialized) {
2465                         throw new Error("initializeWasm() must be awaited first!");
2466                 }
2467                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
2468                 return nativeResponseValue;
2469         }
2470         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
2471         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
2472                 if(!isWasmInitialized) {
2473                         throw new Error("initializeWasm() must be awaited first!");
2474                 }
2475                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
2476                 return nativeResponseValue;
2477         }
2478         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
2479         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
2480                 if(!isWasmInitialized) {
2481                         throw new Error("initializeWasm() must be awaited first!");
2482                 }
2483                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
2484                 // debug statements here
2485         }
2486         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
2487         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
2488                 if(!isWasmInitialized) {
2489                         throw new Error("initializeWasm() must be awaited first!");
2490                 }
2491                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
2492                 return nativeResponseValue;
2493         }
2494         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
2495         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
2496                 if(!isWasmInitialized) {
2497                         throw new Error("initializeWasm() must be awaited first!");
2498                 }
2499                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
2500                 return nativeResponseValue;
2501         }
2502         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
2503         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
2504                 if(!isWasmInitialized) {
2505                         throw new Error("initializeWasm() must be awaited first!");
2506                 }
2507                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
2508                 return nativeResponseValue;
2509         }
2510         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
2511         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
2512                 if(!isWasmInitialized) {
2513                         throw new Error("initializeWasm() must be awaited first!");
2514                 }
2515                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
2516                 // debug statements here
2517         }
2518         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
2519         export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
2520                 if(!isWasmInitialized) {
2521                         throw new Error("initializeWasm() must be awaited first!");
2522                 }
2523                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
2524                 return nativeResponseValue;
2525         }
2526         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2527         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2528                 if(!isWasmInitialized) {
2529                         throw new Error("initializeWasm() must be awaited first!");
2530                 }
2531                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2532                 return nativeResponseValue;
2533         }
2534         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2535         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2536                 if(!isWasmInitialized) {
2537                         throw new Error("initializeWasm() must be awaited first!");
2538                 }
2539                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2540                 // debug statements here
2541         }
2542         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2543         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2544                 if(!isWasmInitialized) {
2545                         throw new Error("initializeWasm() must be awaited first!");
2546                 }
2547                 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2548                 // debug statements here
2549         }
2550         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2551         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2552                 if(!isWasmInitialized) {
2553                         throw new Error("initializeWasm() must be awaited first!");
2554                 }
2555                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2556                 return nativeResponseValue;
2557         }
2558         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2559         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
2560                 if(!isWasmInitialized) {
2561                         throw new Error("initializeWasm() must be awaited first!");
2562                 }
2563                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2564                 return nativeResponseValue;
2565         }
2566         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2567         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2568                 if(!isWasmInitialized) {
2569                         throw new Error("initializeWasm() must be awaited first!");
2570                 }
2571                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2572                 // debug statements here
2573         }
2574         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2575         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2576                 if(!isWasmInitialized) {
2577                         throw new Error("initializeWasm() must be awaited first!");
2578                 }
2579                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2580                 return nativeResponseValue;
2581         }
2582         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2583         export function CVec_MonitorEventZ_free(_res: number[]): void {
2584                 if(!isWasmInitialized) {
2585                         throw new Error("initializeWasm() must be awaited first!");
2586                 }
2587                 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2588                 // debug statements here
2589         }
2590         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
2591         export function CVec_EventZ_free(_res: number[]): void {
2592                 if(!isWasmInitialized) {
2593                         throw new Error("initializeWasm() must be awaited first!");
2594                 }
2595                 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
2596                 // debug statements here
2597         }
2598         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
2599         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
2600                 if(!isWasmInitialized) {
2601                         throw new Error("initializeWasm() must be awaited first!");
2602                 }
2603                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
2604                 return nativeResponseValue;
2605         }
2606         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
2607         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
2608                 if(!isWasmInitialized) {
2609                         throw new Error("initializeWasm() must be awaited first!");
2610                 }
2611                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
2612                 return nativeResponseValue;
2613         }
2614         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
2615         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
2616                 if(!isWasmInitialized) {
2617                         throw new Error("initializeWasm() must be awaited first!");
2618                 }
2619                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
2620                 // debug statements here
2621         }
2622         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
2623         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
2624                 if(!isWasmInitialized) {
2625                         throw new Error("initializeWasm() must be awaited first!");
2626                 }
2627                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
2628                 return nativeResponseValue;
2629         }
2630         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
2631         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
2632                 if(!isWasmInitialized) {
2633                         throw new Error("initializeWasm() must be awaited first!");
2634                 }
2635                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
2636                 return nativeResponseValue;
2637         }
2638         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2639         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
2640                 if(!isWasmInitialized) {
2641                         throw new Error("initializeWasm() must be awaited first!");
2642                 }
2643                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
2644                 return nativeResponseValue;
2645         }
2646         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
2647         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
2648                 if(!isWasmInitialized) {
2649                         throw new Error("initializeWasm() must be awaited first!");
2650                 }
2651                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
2652                 // debug statements here
2653         }
2654         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
2655         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
2656                 if(!isWasmInitialized) {
2657                         throw new Error("initializeWasm() must be awaited first!");
2658                 }
2659                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
2660                 return nativeResponseValue;
2661         }
2662         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
2663         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
2664                 if(!isWasmInitialized) {
2665                         throw new Error("initializeWasm() must be awaited first!");
2666                 }
2667                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
2668                 return nativeResponseValue;
2669         }
2670         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2671         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
2672                 if(!isWasmInitialized) {
2673                         throw new Error("initializeWasm() must be awaited first!");
2674                 }
2675                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
2676                 return nativeResponseValue;
2677         }
2678         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
2679         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
2680                 if(!isWasmInitialized) {
2681                         throw new Error("initializeWasm() must be awaited first!");
2682                 }
2683                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
2684                 // debug statements here
2685         }
2686         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
2687         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
2688                 if(!isWasmInitialized) {
2689                         throw new Error("initializeWasm() must be awaited first!");
2690                 }
2691                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
2692                 return nativeResponseValue;
2693         }
2694         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
2695         export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
2696                 if(!isWasmInitialized) {
2697                         throw new Error("initializeWasm() must be awaited first!");
2698                 }
2699                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
2700                 return nativeResponseValue;
2701         }
2702         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
2703         export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
2704                 if(!isWasmInitialized) {
2705                         throw new Error("initializeWasm() must be awaited first!");
2706                 }
2707                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
2708                 return nativeResponseValue;
2709         }
2710         // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
2711         export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
2712                 if(!isWasmInitialized) {
2713                         throw new Error("initializeWasm() must be awaited first!");
2714                 }
2715                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
2716                 // debug statements here
2717         }
2718         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
2719         export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
2720                 if(!isWasmInitialized) {
2721                         throw new Error("initializeWasm() must be awaited first!");
2722                 }
2723                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
2724                 return nativeResponseValue;
2725         }
2726         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
2727         export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
2728                 if(!isWasmInitialized) {
2729                         throw new Error("initializeWasm() must be awaited first!");
2730                 }
2731                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
2732                 return nativeResponseValue;
2733         }
2734         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
2735         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
2736                 if(!isWasmInitialized) {
2737                         throw new Error("initializeWasm() must be awaited first!");
2738                 }
2739                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
2740                 return nativeResponseValue;
2741         }
2742         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
2743         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
2744                 if(!isWasmInitialized) {
2745                         throw new Error("initializeWasm() must be awaited first!");
2746                 }
2747                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
2748                 // debug statements here
2749         }
2750         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
2751         export function C2Tuple_u32ScriptZ_clone(orig: number): number {
2752                 if(!isWasmInitialized) {
2753                         throw new Error("initializeWasm() must be awaited first!");
2754                 }
2755                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
2756                 return nativeResponseValue;
2757         }
2758         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
2759         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
2760                 if(!isWasmInitialized) {
2761                         throw new Error("initializeWasm() must be awaited first!");
2762                 }
2763                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
2764                 return nativeResponseValue;
2765         }
2766         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
2767         export function C2Tuple_u32ScriptZ_free(_res: number): void {
2768                 if(!isWasmInitialized) {
2769                         throw new Error("initializeWasm() must be awaited first!");
2770                 }
2771                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
2772                 // debug statements here
2773         }
2774         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
2775         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
2776                 if(!isWasmInitialized) {
2777                         throw new Error("initializeWasm() must be awaited first!");
2778                 }
2779                 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
2780                 // debug statements here
2781         }
2782         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
2783         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
2784                 if(!isWasmInitialized) {
2785                         throw new Error("initializeWasm() must be awaited first!");
2786                 }
2787                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
2788                 return nativeResponseValue;
2789         }
2790         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
2791         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
2792                 if(!isWasmInitialized) {
2793                         throw new Error("initializeWasm() must be awaited first!");
2794                 }
2795                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
2796                 // debug statements here
2797         }
2798         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
2799         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
2800                 if(!isWasmInitialized) {
2801                         throw new Error("initializeWasm() must be awaited first!");
2802                 }
2803                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
2804                 // debug statements here
2805         }
2806         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
2807         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
2808                 if(!isWasmInitialized) {
2809                         throw new Error("initializeWasm() must be awaited first!");
2810                 }
2811                 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
2812                 // debug statements here
2813         }
2814         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
2815         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
2816                 if(!isWasmInitialized) {
2817                         throw new Error("initializeWasm() must be awaited first!");
2818                 }
2819                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
2820                 return nativeResponseValue;
2821         }
2822         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
2823         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
2824                 if(!isWasmInitialized) {
2825                         throw new Error("initializeWasm() must be awaited first!");
2826                 }
2827                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
2828                 return nativeResponseValue;
2829         }
2830         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
2831         export function C2Tuple_u32TxOutZ_free(_res: number): void {
2832                 if(!isWasmInitialized) {
2833                         throw new Error("initializeWasm() must be awaited first!");
2834                 }
2835                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
2836                 // debug statements here
2837         }
2838         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
2839         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
2840                 if(!isWasmInitialized) {
2841                         throw new Error("initializeWasm() must be awaited first!");
2842                 }
2843                 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
2844                 // debug statements here
2845         }
2846         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
2847         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
2848                 if(!isWasmInitialized) {
2849                         throw new Error("initializeWasm() must be awaited first!");
2850                 }
2851                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
2852                 return nativeResponseValue;
2853         }
2854         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
2855         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
2856                 if(!isWasmInitialized) {
2857                         throw new Error("initializeWasm() must be awaited first!");
2858                 }
2859                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
2860                 // debug statements here
2861         }
2862         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
2863         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
2864                 if(!isWasmInitialized) {
2865                         throw new Error("initializeWasm() must be awaited first!");
2866                 }
2867                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
2868                 // debug statements here
2869         }
2870         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
2871         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
2872                 if(!isWasmInitialized) {
2873                         throw new Error("initializeWasm() must be awaited first!");
2874                 }
2875                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
2876                 return nativeResponseValue;
2877         }
2878         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
2879         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
2880                 if(!isWasmInitialized) {
2881                         throw new Error("initializeWasm() must be awaited first!");
2882                 }
2883                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
2884                 // debug statements here
2885         }
2886         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
2887         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
2888                 if(!isWasmInitialized) {
2889                         throw new Error("initializeWasm() must be awaited first!");
2890                 }
2891                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
2892                 return nativeResponseValue;
2893         }
2894         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
2895         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
2896                 if(!isWasmInitialized) {
2897                         throw new Error("initializeWasm() must be awaited first!");
2898                 }
2899                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
2900                 return nativeResponseValue;
2901         }
2902         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
2903         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
2904                 if(!isWasmInitialized) {
2905                         throw new Error("initializeWasm() must be awaited first!");
2906                 }
2907                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
2908                 // debug statements here
2909         }
2910         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2911         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
2912                 if(!isWasmInitialized) {
2913                         throw new Error("initializeWasm() must be awaited first!");
2914                 }
2915                 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
2916                 // debug statements here
2917         }
2918         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2919         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2920                 if(!isWasmInitialized) {
2921                         throw new Error("initializeWasm() must be awaited first!");
2922                 }
2923                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2924                 return nativeResponseValue;
2925         }
2926         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2927         export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
2928                 if(!isWasmInitialized) {
2929                         throw new Error("initializeWasm() must be awaited first!");
2930                 }
2931                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2932                 return nativeResponseValue;
2933         }
2934         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2935         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2936                 if(!isWasmInitialized) {
2937                         throw new Error("initializeWasm() must be awaited first!");
2938                 }
2939                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2940                 // debug statements here
2941         }
2942         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2943         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2944                 if(!isWasmInitialized) {
2945                         throw new Error("initializeWasm() must be awaited first!");
2946                 }
2947                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2948                 return nativeResponseValue;
2949         }
2950         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
2951         export function CResult_NoneAPIErrorZ_ok(): number {
2952                 if(!isWasmInitialized) {
2953                         throw new Error("initializeWasm() must be awaited first!");
2954                 }
2955                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
2956                 return nativeResponseValue;
2957         }
2958         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
2959         export function CResult_NoneAPIErrorZ_err(e: number): number {
2960                 if(!isWasmInitialized) {
2961                         throw new Error("initializeWasm() must be awaited first!");
2962                 }
2963                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
2964                 return nativeResponseValue;
2965         }
2966         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
2967         export function CResult_NoneAPIErrorZ_free(_res: number): void {
2968                 if(!isWasmInitialized) {
2969                         throw new Error("initializeWasm() must be awaited first!");
2970                 }
2971                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
2972                 // debug statements here
2973         }
2974         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
2975         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
2976                 if(!isWasmInitialized) {
2977                         throw new Error("initializeWasm() must be awaited first!");
2978                 }
2979                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
2980                 return nativeResponseValue;
2981         }
2982         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
2983         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
2984                 if(!isWasmInitialized) {
2985                         throw new Error("initializeWasm() must be awaited first!");
2986                 }
2987                 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
2988                 // debug statements here
2989         }
2990         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
2991         export function CVec_APIErrorZ_free(_res: number[]): void {
2992                 if(!isWasmInitialized) {
2993                         throw new Error("initializeWasm() must be awaited first!");
2994                 }
2995                 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
2996                 // debug statements here
2997         }
2998         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2999         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
3000                 if(!isWasmInitialized) {
3001                         throw new Error("initializeWasm() must be awaited first!");
3002                 }
3003                 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
3004                 // debug statements here
3005         }
3006         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
3007         export function CResult_NonePaymentSendFailureZ_ok(): number {
3008                 if(!isWasmInitialized) {
3009                         throw new Error("initializeWasm() must be awaited first!");
3010                 }
3011                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
3012                 return nativeResponseValue;
3013         }
3014         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3015         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
3016                 if(!isWasmInitialized) {
3017                         throw new Error("initializeWasm() must be awaited first!");
3018                 }
3019                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
3020                 return nativeResponseValue;
3021         }
3022         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
3023         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
3024                 if(!isWasmInitialized) {
3025                         throw new Error("initializeWasm() must be awaited first!");
3026                 }
3027                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
3028                 // debug statements here
3029         }
3030         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
3031         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
3032                 if(!isWasmInitialized) {
3033                         throw new Error("initializeWasm() must be awaited first!");
3034                 }
3035                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
3036                 return nativeResponseValue;
3037         }
3038         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
3039         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
3040                 if(!isWasmInitialized) {
3041                         throw new Error("initializeWasm() must be awaited first!");
3042                 }
3043                 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
3044                 // debug statements here
3045         }
3046         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
3047         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
3048                 if(!isWasmInitialized) {
3049                         throw new Error("initializeWasm() must be awaited first!");
3050                 }
3051                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
3052                 return nativeResponseValue;
3053         }
3054         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
3055         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
3056                 if(!isWasmInitialized) {
3057                         throw new Error("initializeWasm() must be awaited first!");
3058                 }
3059                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
3060                 // debug statements here
3061         }
3062         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
3063         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
3064                 if(!isWasmInitialized) {
3065                         throw new Error("initializeWasm() must be awaited first!");
3066                 }
3067                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
3068                 return nativeResponseValue;
3069         }
3070         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
3071         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
3072                 if(!isWasmInitialized) {
3073                         throw new Error("initializeWasm() must be awaited first!");
3074                 }
3075                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
3076                 return nativeResponseValue;
3077         }
3078         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
3079         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
3080                 if(!isWasmInitialized) {
3081                         throw new Error("initializeWasm() must be awaited first!");
3082                 }
3083                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
3084                 // debug statements here
3085         }
3086         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
3087         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
3088                 if(!isWasmInitialized) {
3089                         throw new Error("initializeWasm() must be awaited first!");
3090                 }
3091                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
3092                 return nativeResponseValue;
3093         }
3094         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3095         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
3096                 if(!isWasmInitialized) {
3097                         throw new Error("initializeWasm() must be awaited first!");
3098                 }
3099                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
3100                 return nativeResponseValue;
3101         }
3102         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
3103         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
3104                 if(!isWasmInitialized) {
3105                         throw new Error("initializeWasm() must be awaited first!");
3106                 }
3107                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
3108                 // debug statements here
3109         }
3110         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3111         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3112                 if(!isWasmInitialized) {
3113                         throw new Error("initializeWasm() must be awaited first!");
3114                 }
3115                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
3116                 return nativeResponseValue;
3117         }
3118         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
3119         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
3120                 if(!isWasmInitialized) {
3121                         throw new Error("initializeWasm() must be awaited first!");
3122                 }
3123                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
3124                 return nativeResponseValue;
3125         }
3126         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
3127         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
3128                 if(!isWasmInitialized) {
3129                         throw new Error("initializeWasm() must be awaited first!");
3130                 }
3131                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
3132                 return nativeResponseValue;
3133         }
3134         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
3135         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
3136                 if(!isWasmInitialized) {
3137                         throw new Error("initializeWasm() must be awaited first!");
3138                 }
3139                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
3140                 // debug statements here
3141         }
3142         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
3143         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
3144                 if(!isWasmInitialized) {
3145                         throw new Error("initializeWasm() must be awaited first!");
3146                 }
3147                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
3148                 return nativeResponseValue;
3149         }
3150         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
3151         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
3152                 if(!isWasmInitialized) {
3153                         throw new Error("initializeWasm() must be awaited first!");
3154                 }
3155                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
3156                 return nativeResponseValue;
3157         }
3158         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
3159         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
3160                 if(!isWasmInitialized) {
3161                         throw new Error("initializeWasm() must be awaited first!");
3162                 }
3163                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
3164                 // debug statements here
3165         }
3166         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
3167         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
3168                 if(!isWasmInitialized) {
3169                         throw new Error("initializeWasm() must be awaited first!");
3170                 }
3171                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
3172                 return nativeResponseValue;
3173         }
3174         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
3175         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
3176                 if(!isWasmInitialized) {
3177                         throw new Error("initializeWasm() must be awaited first!");
3178                 }
3179                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
3180                 return nativeResponseValue;
3181         }
3182         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
3183         export function CResult_SignatureNoneZ_err(): number {
3184                 if(!isWasmInitialized) {
3185                         throw new Error("initializeWasm() must be awaited first!");
3186                 }
3187                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
3188                 return nativeResponseValue;
3189         }
3190         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
3191         export function CResult_SignatureNoneZ_free(_res: number): void {
3192                 if(!isWasmInitialized) {
3193                         throw new Error("initializeWasm() must be awaited first!");
3194                 }
3195                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
3196                 // debug statements here
3197         }
3198         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
3199         export function CResult_SignatureNoneZ_clone(orig: number): number {
3200                 if(!isWasmInitialized) {
3201                         throw new Error("initializeWasm() must be awaited first!");
3202                 }
3203                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
3204                 return nativeResponseValue;
3205         }
3206         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
3207         export function CResult_SignDecodeErrorZ_ok(o: number): number {
3208                 if(!isWasmInitialized) {
3209                         throw new Error("initializeWasm() must be awaited first!");
3210                 }
3211                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
3212                 return nativeResponseValue;
3213         }
3214         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
3215         export function CResult_SignDecodeErrorZ_err(e: number): number {
3216                 if(!isWasmInitialized) {
3217                         throw new Error("initializeWasm() must be awaited first!");
3218                 }
3219                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
3220                 return nativeResponseValue;
3221         }
3222         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
3223         export function CResult_SignDecodeErrorZ_free(_res: number): void {
3224                 if(!isWasmInitialized) {
3225                         throw new Error("initializeWasm() must be awaited first!");
3226                 }
3227                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
3228                 // debug statements here
3229         }
3230         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
3231         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
3232                 if(!isWasmInitialized) {
3233                         throw new Error("initializeWasm() must be awaited first!");
3234                 }
3235                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
3236                 return nativeResponseValue;
3237         }
3238         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3239         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3240                 if(!isWasmInitialized) {
3241                         throw new Error("initializeWasm() must be awaited first!");
3242                 }
3243                 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3244                 // debug statements here
3245         }
3246         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3247         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3248                 if(!isWasmInitialized) {
3249                         throw new Error("initializeWasm() must be awaited first!");
3250                 }
3251                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3252                 return nativeResponseValue;
3253         }
3254         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3255         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3256                 if(!isWasmInitialized) {
3257                         throw new Error("initializeWasm() must be awaited first!");
3258                 }
3259                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3260                 return nativeResponseValue;
3261         }
3262         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3263         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3264                 if(!isWasmInitialized) {
3265                         throw new Error("initializeWasm() must be awaited first!");
3266                 }
3267                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3268                 // debug statements here
3269         }
3270         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3271         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3272                 if(!isWasmInitialized) {
3273                         throw new Error("initializeWasm() must be awaited first!");
3274                 }
3275                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3276                 return nativeResponseValue;
3277         }
3278         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3279         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3280                 if(!isWasmInitialized) {
3281                         throw new Error("initializeWasm() must be awaited first!");
3282                 }
3283                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3284                 return nativeResponseValue;
3285         }
3286         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3287         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3288                 if(!isWasmInitialized) {
3289                         throw new Error("initializeWasm() must be awaited first!");
3290                 }
3291                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3292                 return nativeResponseValue;
3293         }
3294         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3295         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3296                 if(!isWasmInitialized) {
3297                         throw new Error("initializeWasm() must be awaited first!");
3298                 }
3299                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3300                 // debug statements here
3301         }
3302         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3303         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3304                 if(!isWasmInitialized) {
3305                         throw new Error("initializeWasm() must be awaited first!");
3306                 }
3307                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3308                 return nativeResponseValue;
3309         }
3310         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3311         export function CVec_TxOutZ_free(_res: number[]): void {
3312                 if(!isWasmInitialized) {
3313                         throw new Error("initializeWasm() must be awaited first!");
3314                 }
3315                 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3316                 // debug statements here
3317         }
3318         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3319         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3320                 if(!isWasmInitialized) {
3321                         throw new Error("initializeWasm() must be awaited first!");
3322                 }
3323                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3324                 return nativeResponseValue;
3325         }
3326         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3327         export function CResult_TransactionNoneZ_err(): number {
3328                 if(!isWasmInitialized) {
3329                         throw new Error("initializeWasm() must be awaited first!");
3330                 }
3331                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3332                 return nativeResponseValue;
3333         }
3334         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3335         export function CResult_TransactionNoneZ_free(_res: number): void {
3336                 if(!isWasmInitialized) {
3337                         throw new Error("initializeWasm() must be awaited first!");
3338                 }
3339                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3340                 // debug statements here
3341         }
3342         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
3343         export function CVec_RouteHopZ_free(_res: number[]): void {
3344                 if(!isWasmInitialized) {
3345                         throw new Error("initializeWasm() must be awaited first!");
3346                 }
3347                 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
3348                 // debug statements here
3349         }
3350         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
3351         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
3352                 if(!isWasmInitialized) {
3353                         throw new Error("initializeWasm() must be awaited first!");
3354                 }
3355                 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
3356                 // debug statements here
3357         }
3358         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
3359         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
3360                 if(!isWasmInitialized) {
3361                         throw new Error("initializeWasm() must be awaited first!");
3362                 }
3363                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
3364                 return nativeResponseValue;
3365         }
3366         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
3367         export function CResult_RouteDecodeErrorZ_err(e: number): number {
3368                 if(!isWasmInitialized) {
3369                         throw new Error("initializeWasm() must be awaited first!");
3370                 }
3371                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
3372                 return nativeResponseValue;
3373         }
3374         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
3375         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
3376                 if(!isWasmInitialized) {
3377                         throw new Error("initializeWasm() must be awaited first!");
3378                 }
3379                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
3380                 // debug statements here
3381         }
3382         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
3383         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
3384                 if(!isWasmInitialized) {
3385                         throw new Error("initializeWasm() must be awaited first!");
3386                 }
3387                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
3388                 return nativeResponseValue;
3389         }
3390         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3391         export function CVec_RouteHintZ_free(_res: number[]): void {
3392                 if(!isWasmInitialized) {
3393                         throw new Error("initializeWasm() must be awaited first!");
3394                 }
3395                 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3396                 // debug statements here
3397         }
3398         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
3399         export function CResult_RouteLightningErrorZ_ok(o: number): number {
3400                 if(!isWasmInitialized) {
3401                         throw new Error("initializeWasm() must be awaited first!");
3402                 }
3403                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
3404                 return nativeResponseValue;
3405         }
3406         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
3407         export function CResult_RouteLightningErrorZ_err(e: number): number {
3408                 if(!isWasmInitialized) {
3409                         throw new Error("initializeWasm() must be awaited first!");
3410                 }
3411                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
3412                 return nativeResponseValue;
3413         }
3414         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
3415         export function CResult_RouteLightningErrorZ_free(_res: number): void {
3416                 if(!isWasmInitialized) {
3417                         throw new Error("initializeWasm() must be awaited first!");
3418                 }
3419                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
3420                 // debug statements here
3421         }
3422         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
3423         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
3424                 if(!isWasmInitialized) {
3425                         throw new Error("initializeWasm() must be awaited first!");
3426                 }
3427                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
3428                 return nativeResponseValue;
3429         }
3430         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
3431         export function CResult_NetAddressu8Z_ok(o: number): number {
3432                 if(!isWasmInitialized) {
3433                         throw new Error("initializeWasm() must be awaited first!");
3434                 }
3435                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
3436                 return nativeResponseValue;
3437         }
3438         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
3439         export function CResult_NetAddressu8Z_err(e: number): number {
3440                 if(!isWasmInitialized) {
3441                         throw new Error("initializeWasm() must be awaited first!");
3442                 }
3443                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
3444                 return nativeResponseValue;
3445         }
3446         // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
3447         export function CResult_NetAddressu8Z_free(_res: number): void {
3448                 if(!isWasmInitialized) {
3449                         throw new Error("initializeWasm() must be awaited first!");
3450                 }
3451                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
3452                 // debug statements here
3453         }
3454         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
3455         export function CResult_NetAddressu8Z_clone(orig: number): number {
3456                 if(!isWasmInitialized) {
3457                         throw new Error("initializeWasm() must be awaited first!");
3458                 }
3459                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
3460                 return nativeResponseValue;
3461         }
3462         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
3463         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
3464                 if(!isWasmInitialized) {
3465                         throw new Error("initializeWasm() must be awaited first!");
3466                 }
3467                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
3468                 return nativeResponseValue;
3469         }
3470         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
3471         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
3472                 if(!isWasmInitialized) {
3473                         throw new Error("initializeWasm() must be awaited first!");
3474                 }
3475                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
3476                 return nativeResponseValue;
3477         }
3478         // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
3479         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
3480                 if(!isWasmInitialized) {
3481                         throw new Error("initializeWasm() must be awaited first!");
3482                 }
3483                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
3484                 // debug statements here
3485         }
3486         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
3487         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
3488                 if(!isWasmInitialized) {
3489                         throw new Error("initializeWasm() must be awaited first!");
3490                 }
3491                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
3492                 return nativeResponseValue;
3493         }
3494         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
3495         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
3496                 if(!isWasmInitialized) {
3497                         throw new Error("initializeWasm() must be awaited first!");
3498                 }
3499                 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
3500                 // debug statements here
3501         }
3502         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
3503         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
3504                 if(!isWasmInitialized) {
3505                         throw new Error("initializeWasm() must be awaited first!");
3506                 }
3507                 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
3508                 // debug statements here
3509         }
3510         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
3511         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
3512                 if(!isWasmInitialized) {
3513                         throw new Error("initializeWasm() must be awaited first!");
3514                 }
3515                 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
3516                 // debug statements here
3517         }
3518         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
3519         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
3520                 if(!isWasmInitialized) {
3521                         throw new Error("initializeWasm() must be awaited first!");
3522                 }
3523                 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
3524                 // debug statements here
3525         }
3526         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
3527         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
3528                 if(!isWasmInitialized) {
3529                         throw new Error("initializeWasm() must be awaited first!");
3530                 }
3531                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
3532                 return nativeResponseValue;
3533         }
3534         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
3535         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
3536                 if(!isWasmInitialized) {
3537                         throw new Error("initializeWasm() must be awaited first!");
3538                 }
3539                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
3540                 return nativeResponseValue;
3541         }
3542         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
3543         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
3544                 if(!isWasmInitialized) {
3545                         throw new Error("initializeWasm() must be awaited first!");
3546                 }
3547                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
3548                 // debug statements here
3549         }
3550         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
3551         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
3552                 if(!isWasmInitialized) {
3553                         throw new Error("initializeWasm() must be awaited first!");
3554                 }
3555                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
3556                 return nativeResponseValue;
3557         }
3558         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
3559         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
3560                 if(!isWasmInitialized) {
3561                         throw new Error("initializeWasm() must be awaited first!");
3562                 }
3563                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
3564                 return nativeResponseValue;
3565         }
3566         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
3567         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
3568                 if(!isWasmInitialized) {
3569                         throw new Error("initializeWasm() must be awaited first!");
3570                 }
3571                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
3572                 return nativeResponseValue;
3573         }
3574         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
3575         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
3576                 if(!isWasmInitialized) {
3577                         throw new Error("initializeWasm() must be awaited first!");
3578                 }
3579                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
3580                 // debug statements here
3581         }
3582         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
3583         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
3584                 if(!isWasmInitialized) {
3585                         throw new Error("initializeWasm() must be awaited first!");
3586                 }
3587                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
3588                 return nativeResponseValue;
3589         }
3590         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
3591         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
3592                 if(!isWasmInitialized) {
3593                         throw new Error("initializeWasm() must be awaited first!");
3594                 }
3595                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
3596                 return nativeResponseValue;
3597         }
3598         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
3599         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
3600                 if(!isWasmInitialized) {
3601                         throw new Error("initializeWasm() must be awaited first!");
3602                 }
3603                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
3604                 return nativeResponseValue;
3605         }
3606         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
3607         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
3608                 if(!isWasmInitialized) {
3609                         throw new Error("initializeWasm() must be awaited first!");
3610                 }
3611                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
3612                 // debug statements here
3613         }
3614         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
3615         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
3616                 if(!isWasmInitialized) {
3617                         throw new Error("initializeWasm() must be awaited first!");
3618                 }
3619                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
3620                 return nativeResponseValue;
3621         }
3622         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
3623         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
3624                 if(!isWasmInitialized) {
3625                         throw new Error("initializeWasm() must be awaited first!");
3626                 }
3627                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
3628                 return nativeResponseValue;
3629         }
3630         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3631         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
3632                 if(!isWasmInitialized) {
3633                         throw new Error("initializeWasm() must be awaited first!");
3634                 }
3635                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
3636                 return nativeResponseValue;
3637         }
3638         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
3639         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
3640                 if(!isWasmInitialized) {
3641                         throw new Error("initializeWasm() must be awaited first!");
3642                 }
3643                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
3644                 // debug statements here
3645         }
3646         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
3647         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
3648                 if(!isWasmInitialized) {
3649                         throw new Error("initializeWasm() must be awaited first!");
3650                 }
3651                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
3652                 return nativeResponseValue;
3653         }
3654         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
3655         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
3656                 if(!isWasmInitialized) {
3657                         throw new Error("initializeWasm() must be awaited first!");
3658                 }
3659                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
3660                 return nativeResponseValue;
3661         }
3662         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
3663         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
3664                 if(!isWasmInitialized) {
3665                         throw new Error("initializeWasm() must be awaited first!");
3666                 }
3667                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
3668                 return nativeResponseValue;
3669         }
3670         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
3671         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
3672                 if(!isWasmInitialized) {
3673                         throw new Error("initializeWasm() must be awaited first!");
3674                 }
3675                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
3676                 // debug statements here
3677         }
3678         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
3679         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
3680                 if(!isWasmInitialized) {
3681                         throw new Error("initializeWasm() must be awaited first!");
3682                 }
3683                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
3684                 return nativeResponseValue;
3685         }
3686         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
3687         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
3688                 if(!isWasmInitialized) {
3689                         throw new Error("initializeWasm() must be awaited first!");
3690                 }
3691                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
3692                 return nativeResponseValue;
3693         }
3694         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
3695         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
3696                 if(!isWasmInitialized) {
3697                         throw new Error("initializeWasm() must be awaited first!");
3698                 }
3699                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
3700                 return nativeResponseValue;
3701         }
3702         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
3703         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
3704                 if(!isWasmInitialized) {
3705                         throw new Error("initializeWasm() must be awaited first!");
3706                 }
3707                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
3708                 // debug statements here
3709         }
3710         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
3711         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
3712                 if(!isWasmInitialized) {
3713                         throw new Error("initializeWasm() must be awaited first!");
3714                 }
3715                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
3716                 return nativeResponseValue;
3717         }
3718         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
3719         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
3720                 if(!isWasmInitialized) {
3721                         throw new Error("initializeWasm() must be awaited first!");
3722                 }
3723                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
3724                 return nativeResponseValue;
3725         }
3726         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3727         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
3728                 if(!isWasmInitialized) {
3729                         throw new Error("initializeWasm() must be awaited first!");
3730                 }
3731                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
3732                 return nativeResponseValue;
3733         }
3734         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
3735         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
3736                 if(!isWasmInitialized) {
3737                         throw new Error("initializeWasm() must be awaited first!");
3738                 }
3739                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
3740                 // debug statements here
3741         }
3742         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
3743         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
3744                 if(!isWasmInitialized) {
3745                         throw new Error("initializeWasm() must be awaited first!");
3746                 }
3747                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
3748                 return nativeResponseValue;
3749         }
3750         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
3751         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
3752                 if(!isWasmInitialized) {
3753                         throw new Error("initializeWasm() must be awaited first!");
3754                 }
3755                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
3756                 return nativeResponseValue;
3757         }
3758         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
3759         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
3760                 if(!isWasmInitialized) {
3761                         throw new Error("initializeWasm() must be awaited first!");
3762                 }
3763                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
3764                 return nativeResponseValue;
3765         }
3766         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
3767         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
3768                 if(!isWasmInitialized) {
3769                         throw new Error("initializeWasm() must be awaited first!");
3770                 }
3771                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
3772                 // debug statements here
3773         }
3774         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
3775         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
3776                 if(!isWasmInitialized) {
3777                         throw new Error("initializeWasm() must be awaited first!");
3778                 }
3779                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
3780                 return nativeResponseValue;
3781         }
3782         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
3783         export function CResult_InitDecodeErrorZ_ok(o: number): number {
3784                 if(!isWasmInitialized) {
3785                         throw new Error("initializeWasm() must be awaited first!");
3786                 }
3787                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
3788                 return nativeResponseValue;
3789         }
3790         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
3791         export function CResult_InitDecodeErrorZ_err(e: number): number {
3792                 if(!isWasmInitialized) {
3793                         throw new Error("initializeWasm() must be awaited first!");
3794                 }
3795                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
3796                 return nativeResponseValue;
3797         }
3798         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
3799         export function CResult_InitDecodeErrorZ_free(_res: number): void {
3800                 if(!isWasmInitialized) {
3801                         throw new Error("initializeWasm() must be awaited first!");
3802                 }
3803                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
3804                 // debug statements here
3805         }
3806         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
3807         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
3808                 if(!isWasmInitialized) {
3809                         throw new Error("initializeWasm() must be awaited first!");
3810                 }
3811                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
3812                 return nativeResponseValue;
3813         }
3814         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
3815         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
3816                 if(!isWasmInitialized) {
3817                         throw new Error("initializeWasm() must be awaited first!");
3818                 }
3819                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
3820                 return nativeResponseValue;
3821         }
3822         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
3823         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
3824                 if(!isWasmInitialized) {
3825                         throw new Error("initializeWasm() must be awaited first!");
3826                 }
3827                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
3828                 return nativeResponseValue;
3829         }
3830         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
3831         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
3832                 if(!isWasmInitialized) {
3833                         throw new Error("initializeWasm() must be awaited first!");
3834                 }
3835                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
3836                 // debug statements here
3837         }
3838         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
3839         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
3840                 if(!isWasmInitialized) {
3841                         throw new Error("initializeWasm() must be awaited first!");
3842                 }
3843                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
3844                 return nativeResponseValue;
3845         }
3846         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
3847         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
3848                 if(!isWasmInitialized) {
3849                         throw new Error("initializeWasm() must be awaited first!");
3850                 }
3851                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
3852                 return nativeResponseValue;
3853         }
3854         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
3855         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
3856                 if(!isWasmInitialized) {
3857                         throw new Error("initializeWasm() must be awaited first!");
3858                 }
3859                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
3860                 return nativeResponseValue;
3861         }
3862         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
3863         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
3864                 if(!isWasmInitialized) {
3865                         throw new Error("initializeWasm() must be awaited first!");
3866                 }
3867                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
3868                 // debug statements here
3869         }
3870         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
3871         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
3872                 if(!isWasmInitialized) {
3873                         throw new Error("initializeWasm() must be awaited first!");
3874                 }
3875                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
3876                 return nativeResponseValue;
3877         }
3878         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
3879         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
3880                 if(!isWasmInitialized) {
3881                         throw new Error("initializeWasm() must be awaited first!");
3882                 }
3883                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
3884                 return nativeResponseValue;
3885         }
3886         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
3887         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
3888                 if(!isWasmInitialized) {
3889                         throw new Error("initializeWasm() must be awaited first!");
3890                 }
3891                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
3892                 return nativeResponseValue;
3893         }
3894         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
3895         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
3896                 if(!isWasmInitialized) {
3897                         throw new Error("initializeWasm() must be awaited first!");
3898                 }
3899                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
3900                 // debug statements here
3901         }
3902         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
3903         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
3904                 if(!isWasmInitialized) {
3905                         throw new Error("initializeWasm() must be awaited first!");
3906                 }
3907                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
3908                 return nativeResponseValue;
3909         }
3910         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
3911         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
3912                 if(!isWasmInitialized) {
3913                         throw new Error("initializeWasm() must be awaited first!");
3914                 }
3915                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
3916                 return nativeResponseValue;
3917         }
3918         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3919         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
3920                 if(!isWasmInitialized) {
3921                         throw new Error("initializeWasm() must be awaited first!");
3922                 }
3923                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
3924                 return nativeResponseValue;
3925         }
3926         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
3927         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
3928                 if(!isWasmInitialized) {
3929                         throw new Error("initializeWasm() must be awaited first!");
3930                 }
3931                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
3932                 // debug statements here
3933         }
3934         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
3935         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
3936                 if(!isWasmInitialized) {
3937                         throw new Error("initializeWasm() must be awaited first!");
3938                 }
3939                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
3940                 return nativeResponseValue;
3941         }
3942         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
3943         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
3944                 if(!isWasmInitialized) {
3945                         throw new Error("initializeWasm() must be awaited first!");
3946                 }
3947                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
3948                 return nativeResponseValue;
3949         }
3950         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3951         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
3952                 if(!isWasmInitialized) {
3953                         throw new Error("initializeWasm() must be awaited first!");
3954                 }
3955                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
3956                 return nativeResponseValue;
3957         }
3958         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
3959         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
3960                 if(!isWasmInitialized) {
3961                         throw new Error("initializeWasm() must be awaited first!");
3962                 }
3963                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
3964                 // debug statements here
3965         }
3966         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
3967         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
3968                 if(!isWasmInitialized) {
3969                         throw new Error("initializeWasm() must be awaited first!");
3970                 }
3971                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
3972                 return nativeResponseValue;
3973         }
3974         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
3975         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
3976                 if(!isWasmInitialized) {
3977                         throw new Error("initializeWasm() must be awaited first!");
3978                 }
3979                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
3980                 return nativeResponseValue;
3981         }
3982         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
3983         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
3984                 if(!isWasmInitialized) {
3985                         throw new Error("initializeWasm() must be awaited first!");
3986                 }
3987                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
3988                 return nativeResponseValue;
3989         }
3990         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
3991         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
3992                 if(!isWasmInitialized) {
3993                         throw new Error("initializeWasm() must be awaited first!");
3994                 }
3995                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
3996                 // debug statements here
3997         }
3998         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
3999         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
4000                 if(!isWasmInitialized) {
4001                         throw new Error("initializeWasm() must be awaited first!");
4002                 }
4003                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
4004                 return nativeResponseValue;
4005         }
4006         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
4007         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
4008                 if(!isWasmInitialized) {
4009                         throw new Error("initializeWasm() must be awaited first!");
4010                 }
4011                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
4012                 return nativeResponseValue;
4013         }
4014         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
4015         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
4016                 if(!isWasmInitialized) {
4017                         throw new Error("initializeWasm() must be awaited first!");
4018                 }
4019                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
4020                 return nativeResponseValue;
4021         }
4022         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
4023         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
4024                 if(!isWasmInitialized) {
4025                         throw new Error("initializeWasm() must be awaited first!");
4026                 }
4027                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
4028                 // debug statements here
4029         }
4030         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
4031         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
4032                 if(!isWasmInitialized) {
4033                         throw new Error("initializeWasm() must be awaited first!");
4034                 }
4035                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
4036                 return nativeResponseValue;
4037         }
4038         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
4039         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
4040                 if(!isWasmInitialized) {
4041                         throw new Error("initializeWasm() must be awaited first!");
4042                 }
4043                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
4044                 return nativeResponseValue;
4045         }
4046         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
4047         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
4048                 if(!isWasmInitialized) {
4049                         throw new Error("initializeWasm() must be awaited first!");
4050                 }
4051                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
4052                 return nativeResponseValue;
4053         }
4054         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
4055         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
4056                 if(!isWasmInitialized) {
4057                         throw new Error("initializeWasm() must be awaited first!");
4058                 }
4059                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
4060                 // debug statements here
4061         }
4062         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
4063         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
4064                 if(!isWasmInitialized) {
4065                         throw new Error("initializeWasm() must be awaited first!");
4066                 }
4067                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
4068                 return nativeResponseValue;
4069         }
4070         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
4071         export function CResult_PingDecodeErrorZ_ok(o: number): number {
4072                 if(!isWasmInitialized) {
4073                         throw new Error("initializeWasm() must be awaited first!");
4074                 }
4075                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
4076                 return nativeResponseValue;
4077         }
4078         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
4079         export function CResult_PingDecodeErrorZ_err(e: number): number {
4080                 if(!isWasmInitialized) {
4081                         throw new Error("initializeWasm() must be awaited first!");
4082                 }
4083                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
4084                 return nativeResponseValue;
4085         }
4086         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
4087         export function CResult_PingDecodeErrorZ_free(_res: number): void {
4088                 if(!isWasmInitialized) {
4089                         throw new Error("initializeWasm() must be awaited first!");
4090                 }
4091                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
4092                 // debug statements here
4093         }
4094         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
4095         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
4096                 if(!isWasmInitialized) {
4097                         throw new Error("initializeWasm() must be awaited first!");
4098                 }
4099                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
4100                 return nativeResponseValue;
4101         }
4102         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
4103         export function CResult_PongDecodeErrorZ_ok(o: number): number {
4104                 if(!isWasmInitialized) {
4105                         throw new Error("initializeWasm() must be awaited first!");
4106                 }
4107                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
4108                 return nativeResponseValue;
4109         }
4110         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
4111         export function CResult_PongDecodeErrorZ_err(e: number): number {
4112                 if(!isWasmInitialized) {
4113                         throw new Error("initializeWasm() must be awaited first!");
4114                 }
4115                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
4116                 return nativeResponseValue;
4117         }
4118         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
4119         export function CResult_PongDecodeErrorZ_free(_res: number): void {
4120                 if(!isWasmInitialized) {
4121                         throw new Error("initializeWasm() must be awaited first!");
4122                 }
4123                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
4124                 // debug statements here
4125         }
4126         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
4127         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
4128                 if(!isWasmInitialized) {
4129                         throw new Error("initializeWasm() must be awaited first!");
4130                 }
4131                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
4132                 return nativeResponseValue;
4133         }
4134         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
4135         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
4136                 if(!isWasmInitialized) {
4137                         throw new Error("initializeWasm() must be awaited first!");
4138                 }
4139                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
4140                 return nativeResponseValue;
4141         }
4142         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4143         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
4144                 if(!isWasmInitialized) {
4145                         throw new Error("initializeWasm() must be awaited first!");
4146                 }
4147                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
4148                 return nativeResponseValue;
4149         }
4150         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
4151         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
4152                 if(!isWasmInitialized) {
4153                         throw new Error("initializeWasm() must be awaited first!");
4154                 }
4155                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
4156                 // debug statements here
4157         }
4158         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4159         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
4160                 if(!isWasmInitialized) {
4161                         throw new Error("initializeWasm() must be awaited first!");
4162                 }
4163                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
4164                 return nativeResponseValue;
4165         }
4166         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
4167         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
4168                 if(!isWasmInitialized) {
4169                         throw new Error("initializeWasm() must be awaited first!");
4170                 }
4171                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
4172                 return nativeResponseValue;
4173         }
4174         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4175         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
4176                 if(!isWasmInitialized) {
4177                         throw new Error("initializeWasm() must be awaited first!");
4178                 }
4179                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
4180                 return nativeResponseValue;
4181         }
4182         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
4183         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
4184                 if(!isWasmInitialized) {
4185                         throw new Error("initializeWasm() must be awaited first!");
4186                 }
4187                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
4188                 // debug statements here
4189         }
4190         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4191         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
4192                 if(!isWasmInitialized) {
4193                         throw new Error("initializeWasm() must be awaited first!");
4194                 }
4195                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
4196                 return nativeResponseValue;
4197         }
4198         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
4199         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
4200                 if(!isWasmInitialized) {
4201                         throw new Error("initializeWasm() must be awaited first!");
4202                 }
4203                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
4204                 return nativeResponseValue;
4205         }
4206         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4207         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
4208                 if(!isWasmInitialized) {
4209                         throw new Error("initializeWasm() must be awaited first!");
4210                 }
4211                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
4212                 return nativeResponseValue;
4213         }
4214         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
4215         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
4216                 if(!isWasmInitialized) {
4217                         throw new Error("initializeWasm() must be awaited first!");
4218                 }
4219                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
4220                 // debug statements here
4221         }
4222         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4223         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
4224                 if(!isWasmInitialized) {
4225                         throw new Error("initializeWasm() must be awaited first!");
4226                 }
4227                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
4228                 return nativeResponseValue;
4229         }
4230         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
4231         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
4232                 if(!isWasmInitialized) {
4233                         throw new Error("initializeWasm() must be awaited first!");
4234                 }
4235                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
4236                 return nativeResponseValue;
4237         }
4238         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4239         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
4240                 if(!isWasmInitialized) {
4241                         throw new Error("initializeWasm() must be awaited first!");
4242                 }
4243                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
4244                 return nativeResponseValue;
4245         }
4246         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
4247         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
4248                 if(!isWasmInitialized) {
4249                         throw new Error("initializeWasm() must be awaited first!");
4250                 }
4251                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
4252                 // debug statements here
4253         }
4254         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4255         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
4256                 if(!isWasmInitialized) {
4257                         throw new Error("initializeWasm() must be awaited first!");
4258                 }
4259                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
4260                 return nativeResponseValue;
4261         }
4262         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
4263         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
4264                 if(!isWasmInitialized) {
4265                         throw new Error("initializeWasm() must be awaited first!");
4266                 }
4267                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
4268                 return nativeResponseValue;
4269         }
4270         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
4271         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
4272                 if(!isWasmInitialized) {
4273                         throw new Error("initializeWasm() must be awaited first!");
4274                 }
4275                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
4276                 return nativeResponseValue;
4277         }
4278         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
4279         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
4280                 if(!isWasmInitialized) {
4281                         throw new Error("initializeWasm() must be awaited first!");
4282                 }
4283                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
4284                 // debug statements here
4285         }
4286         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
4287         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
4288                 if(!isWasmInitialized) {
4289                         throw new Error("initializeWasm() must be awaited first!");
4290                 }
4291                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
4292                 return nativeResponseValue;
4293         }
4294         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
4295         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
4296                 if(!isWasmInitialized) {
4297                         throw new Error("initializeWasm() must be awaited first!");
4298                 }
4299                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
4300                 return nativeResponseValue;
4301         }
4302         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4303         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
4304                 if(!isWasmInitialized) {
4305                         throw new Error("initializeWasm() must be awaited first!");
4306                 }
4307                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
4308                 return nativeResponseValue;
4309         }
4310         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
4311         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
4312                 if(!isWasmInitialized) {
4313                         throw new Error("initializeWasm() must be awaited first!");
4314                 }
4315                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
4316                 // debug statements here
4317         }
4318         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4319         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4320                 if(!isWasmInitialized) {
4321                         throw new Error("initializeWasm() must be awaited first!");
4322                 }
4323                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
4324                 return nativeResponseValue;
4325         }
4326         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
4327         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
4328                 if(!isWasmInitialized) {
4329                         throw new Error("initializeWasm() must be awaited first!");
4330                 }
4331                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
4332                 return nativeResponseValue;
4333         }
4334         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4335         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
4336                 if(!isWasmInitialized) {
4337                         throw new Error("initializeWasm() must be awaited first!");
4338                 }
4339                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
4340                 return nativeResponseValue;
4341         }
4342         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
4343         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
4344                 if(!isWasmInitialized) {
4345                         throw new Error("initializeWasm() must be awaited first!");
4346                 }
4347                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
4348                 // debug statements here
4349         }
4350         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4351         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4352                 if(!isWasmInitialized) {
4353                         throw new Error("initializeWasm() must be awaited first!");
4354                 }
4355                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
4356                 return nativeResponseValue;
4357         }
4358         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
4359         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
4360                 if(!isWasmInitialized) {
4361                         throw new Error("initializeWasm() must be awaited first!");
4362                 }
4363                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
4364                 return nativeResponseValue;
4365         }
4366         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
4367         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
4368                 if(!isWasmInitialized) {
4369                         throw new Error("initializeWasm() must be awaited first!");
4370                 }
4371                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
4372                 return nativeResponseValue;
4373         }
4374         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
4375         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
4376                 if(!isWasmInitialized) {
4377                         throw new Error("initializeWasm() must be awaited first!");
4378                 }
4379                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
4380                 // debug statements here
4381         }
4382         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
4383         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
4384                 if(!isWasmInitialized) {
4385                         throw new Error("initializeWasm() must be awaited first!");
4386                 }
4387                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
4388                 return nativeResponseValue;
4389         }
4390         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
4391         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
4392                 if(!isWasmInitialized) {
4393                         throw new Error("initializeWasm() must be awaited first!");
4394                 }
4395                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
4396                 return nativeResponseValue;
4397         }
4398         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
4399         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
4400                 if(!isWasmInitialized) {
4401                         throw new Error("initializeWasm() must be awaited first!");
4402                 }
4403                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
4404                 return nativeResponseValue;
4405         }
4406         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
4407         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
4408                 if(!isWasmInitialized) {
4409                         throw new Error("initializeWasm() must be awaited first!");
4410                 }
4411                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
4412                 // debug statements here
4413         }
4414         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
4415         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
4416                 if(!isWasmInitialized) {
4417                         throw new Error("initializeWasm() must be awaited first!");
4418                 }
4419                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
4420                 return nativeResponseValue;
4421         }
4422         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
4423         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
4424                 if(!isWasmInitialized) {
4425                         throw new Error("initializeWasm() must be awaited first!");
4426                 }
4427                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
4428                 return nativeResponseValue;
4429         }
4430         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4431         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
4432                 if(!isWasmInitialized) {
4433                         throw new Error("initializeWasm() must be awaited first!");
4434                 }
4435                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
4436                 return nativeResponseValue;
4437         }
4438         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
4439         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
4440                 if(!isWasmInitialized) {
4441                         throw new Error("initializeWasm() must be awaited first!");
4442                 }
4443                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
4444                 // debug statements here
4445         }
4446         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4447         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
4448                 if(!isWasmInitialized) {
4449                         throw new Error("initializeWasm() must be awaited first!");
4450                 }
4451                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
4452                 return nativeResponseValue;
4453         }
4454         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
4455         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
4456                 if(!isWasmInitialized) {
4457                         throw new Error("initializeWasm() must be awaited first!");
4458                 }
4459                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
4460                 return nativeResponseValue;
4461         }
4462         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4463         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
4464                 if(!isWasmInitialized) {
4465                         throw new Error("initializeWasm() must be awaited first!");
4466                 }
4467                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
4468                 return nativeResponseValue;
4469         }
4470         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
4471         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
4472                 if(!isWasmInitialized) {
4473                         throw new Error("initializeWasm() must be awaited first!");
4474                 }
4475                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
4476                 // debug statements here
4477         }
4478         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4479         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
4480                 if(!isWasmInitialized) {
4481                         throw new Error("initializeWasm() must be awaited first!");
4482                 }
4483                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
4484                 return nativeResponseValue;
4485         }
4486         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
4487         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
4488                 if(!isWasmInitialized) {
4489                         throw new Error("initializeWasm() must be awaited first!");
4490                 }
4491                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
4492                 return nativeResponseValue;
4493         }
4494         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
4495         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
4496                 if(!isWasmInitialized) {
4497                         throw new Error("initializeWasm() must be awaited first!");
4498                 }
4499                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
4500                 return nativeResponseValue;
4501         }
4502         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
4503         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
4504                 if(!isWasmInitialized) {
4505                         throw new Error("initializeWasm() must be awaited first!");
4506                 }
4507                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
4508                 // debug statements here
4509         }
4510         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
4511         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
4512                 if(!isWasmInitialized) {
4513                         throw new Error("initializeWasm() must be awaited first!");
4514                 }
4515                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
4516                 return nativeResponseValue;
4517         }
4518         // void Event_free(struct LDKEvent this_ptr);
4519         export function Event_free(this_ptr: number): void {
4520                 if(!isWasmInitialized) {
4521                         throw new Error("initializeWasm() must be awaited first!");
4522                 }
4523                 const nativeResponseValue = wasm.Event_free(this_ptr);
4524                 // debug statements here
4525         }
4526         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
4527         export function Event_clone(orig: number): number {
4528                 if(!isWasmInitialized) {
4529                         throw new Error("initializeWasm() must be awaited first!");
4530                 }
4531                 const nativeResponseValue = wasm.Event_clone(orig);
4532                 return nativeResponseValue;
4533         }
4534         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
4535         export function Event_write(obj: number): Uint8Array {
4536                 if(!isWasmInitialized) {
4537                         throw new Error("initializeWasm() must be awaited first!");
4538                 }
4539                 const nativeResponseValue = wasm.Event_write(obj);
4540                 return decodeArray(nativeResponseValue);
4541         }
4542         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
4543         export function MessageSendEvent_free(this_ptr: number): void {
4544                 if(!isWasmInitialized) {
4545                         throw new Error("initializeWasm() must be awaited first!");
4546                 }
4547                 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
4548                 // debug statements here
4549         }
4550         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
4551         export function MessageSendEvent_clone(orig: number): number {
4552                 if(!isWasmInitialized) {
4553                         throw new Error("initializeWasm() must be awaited first!");
4554                 }
4555                 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
4556                 return nativeResponseValue;
4557         }
4558         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
4559         export function MessageSendEventsProvider_free(this_ptr: number): void {
4560                 if(!isWasmInitialized) {
4561                         throw new Error("initializeWasm() must be awaited first!");
4562                 }
4563                 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
4564                 // debug statements here
4565         }
4566         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
4567         export function EventsProvider_free(this_ptr: number): void {
4568                 if(!isWasmInitialized) {
4569                         throw new Error("initializeWasm() must be awaited first!");
4570                 }
4571                 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
4572                 // debug statements here
4573         }
4574         // void APIError_free(struct LDKAPIError this_ptr);
4575         export function APIError_free(this_ptr: number): void {
4576                 if(!isWasmInitialized) {
4577                         throw new Error("initializeWasm() must be awaited first!");
4578                 }
4579                 const nativeResponseValue = wasm.APIError_free(this_ptr);
4580                 // debug statements here
4581         }
4582         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
4583         export function APIError_clone(orig: number): number {
4584                 if(!isWasmInitialized) {
4585                         throw new Error("initializeWasm() must be awaited first!");
4586                 }
4587                 const nativeResponseValue = wasm.APIError_clone(orig);
4588                 return nativeResponseValue;
4589         }
4590         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
4591         export function Level_clone(orig: number): LDKLevel {
4592                 if(!isWasmInitialized) {
4593                         throw new Error("initializeWasm() must be awaited first!");
4594                 }
4595                 const nativeResponseValue = wasm.Level_clone(orig);
4596                 return nativeResponseValue;
4597         }
4598         // MUST_USE_RES enum LDKLevel Level_max(void);
4599         export function Level_max(): LDKLevel {
4600                 if(!isWasmInitialized) {
4601                         throw new Error("initializeWasm() must be awaited first!");
4602                 }
4603                 const nativeResponseValue = wasm.Level_max();
4604                 return nativeResponseValue;
4605         }
4606         // void Logger_free(struct LDKLogger this_ptr);
4607         export function Logger_free(this_ptr: number): void {
4608                 if(!isWasmInitialized) {
4609                         throw new Error("initializeWasm() must be awaited first!");
4610                 }
4611                 const nativeResponseValue = wasm.Logger_free(this_ptr);
4612                 // debug statements here
4613         }
4614         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
4615         export function ChannelHandshakeConfig_free(this_obj: number): void {
4616                 if(!isWasmInitialized) {
4617                         throw new Error("initializeWasm() must be awaited first!");
4618                 }
4619                 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
4620                 // debug statements here
4621         }
4622         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4623         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
4624                 if(!isWasmInitialized) {
4625                         throw new Error("initializeWasm() must be awaited first!");
4626                 }
4627                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
4628                 return nativeResponseValue;
4629         }
4630         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
4631         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
4632                 if(!isWasmInitialized) {
4633                         throw new Error("initializeWasm() must be awaited first!");
4634                 }
4635                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
4636                 // debug statements here
4637         }
4638         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4639         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
4640                 if(!isWasmInitialized) {
4641                         throw new Error("initializeWasm() must be awaited first!");
4642                 }
4643                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
4644                 return nativeResponseValue;
4645         }
4646         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
4647         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
4648                 if(!isWasmInitialized) {
4649                         throw new Error("initializeWasm() must be awaited first!");
4650                 }
4651                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
4652                 // debug statements here
4653         }
4654         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4655         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
4656                 if(!isWasmInitialized) {
4657                         throw new Error("initializeWasm() must be awaited first!");
4658                 }
4659                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
4660                 return nativeResponseValue;
4661         }
4662         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
4663         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
4664                 if(!isWasmInitialized) {
4665                         throw new Error("initializeWasm() must be awaited first!");
4666                 }
4667                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
4668                 // debug statements here
4669         }
4670         // 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);
4671         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
4672                 if(!isWasmInitialized) {
4673                         throw new Error("initializeWasm() must be awaited first!");
4674                 }
4675                 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
4676                 return nativeResponseValue;
4677         }
4678         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
4679         export function ChannelHandshakeConfig_clone(orig: number): number {
4680                 if(!isWasmInitialized) {
4681                         throw new Error("initializeWasm() must be awaited first!");
4682                 }
4683                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
4684                 return nativeResponseValue;
4685         }
4686         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
4687         export function ChannelHandshakeConfig_default(): number {
4688                 if(!isWasmInitialized) {
4689                         throw new Error("initializeWasm() must be awaited first!");
4690                 }
4691                 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
4692                 return nativeResponseValue;
4693         }
4694         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
4695         export function ChannelHandshakeLimits_free(this_obj: number): void {
4696                 if(!isWasmInitialized) {
4697                         throw new Error("initializeWasm() must be awaited first!");
4698                 }
4699                 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
4700                 // debug statements here
4701         }
4702         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4703         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
4704                 if(!isWasmInitialized) {
4705                         throw new Error("initializeWasm() must be awaited first!");
4706                 }
4707                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
4708                 return nativeResponseValue;
4709         }
4710         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4711         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
4712                 if(!isWasmInitialized) {
4713                         throw new Error("initializeWasm() must be awaited first!");
4714                 }
4715                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
4716                 // debug statements here
4717         }
4718         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4719         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
4720                 if(!isWasmInitialized) {
4721                         throw new Error("initializeWasm() must be awaited first!");
4722                 }
4723                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
4724                 return nativeResponseValue;
4725         }
4726         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4727         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
4728                 if(!isWasmInitialized) {
4729                         throw new Error("initializeWasm() must be awaited first!");
4730                 }
4731                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
4732                 // debug statements here
4733         }
4734         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4735         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
4736                 if(!isWasmInitialized) {
4737                         throw new Error("initializeWasm() must be awaited first!");
4738                 }
4739                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
4740                 return nativeResponseValue;
4741         }
4742         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4743         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
4744                 if(!isWasmInitialized) {
4745                         throw new Error("initializeWasm() must be awaited first!");
4746                 }
4747                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
4748                 // debug statements here
4749         }
4750         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4751         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
4752                 if(!isWasmInitialized) {
4753                         throw new Error("initializeWasm() must be awaited first!");
4754                 }
4755                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
4756                 return nativeResponseValue;
4757         }
4758         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4759         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
4760                 if(!isWasmInitialized) {
4761                         throw new Error("initializeWasm() must be awaited first!");
4762                 }
4763                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
4764                 // debug statements here
4765         }
4766         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4767         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
4768                 if(!isWasmInitialized) {
4769                         throw new Error("initializeWasm() must be awaited first!");
4770                 }
4771                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
4772                 return nativeResponseValue;
4773         }
4774         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4775         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
4776                 if(!isWasmInitialized) {
4777                         throw new Error("initializeWasm() must be awaited first!");
4778                 }
4779                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
4780                 // debug statements here
4781         }
4782         // uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4783         export function ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr: number): number {
4784                 if(!isWasmInitialized) {
4785                         throw new Error("initializeWasm() must be awaited first!");
4786                 }
4787                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr);
4788                 return nativeResponseValue;
4789         }
4790         // void ChannelHandshakeLimits_set_min_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4791         export function ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr: number, val: number): void {
4792                 if(!isWasmInitialized) {
4793                         throw new Error("initializeWasm() must be awaited first!");
4794                 }
4795                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr, val);
4796                 // debug statements here
4797         }
4798         // uint64_t ChannelHandshakeLimits_get_max_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4799         export function ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr: number): number {
4800                 if(!isWasmInitialized) {
4801                         throw new Error("initializeWasm() must be awaited first!");
4802                 }
4803                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr);
4804                 return nativeResponseValue;
4805         }
4806         // void ChannelHandshakeLimits_set_max_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4807         export function ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr: number, val: number): void {
4808                 if(!isWasmInitialized) {
4809                         throw new Error("initializeWasm() must be awaited first!");
4810                 }
4811                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr, val);
4812                 // debug statements here
4813         }
4814         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4815         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
4816                 if(!isWasmInitialized) {
4817                         throw new Error("initializeWasm() must be awaited first!");
4818                 }
4819                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
4820                 return nativeResponseValue;
4821         }
4822         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
4823         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
4824                 if(!isWasmInitialized) {
4825                         throw new Error("initializeWasm() must be awaited first!");
4826                 }
4827                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
4828                 // debug statements here
4829         }
4830         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4831         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
4832                 if(!isWasmInitialized) {
4833                         throw new Error("initializeWasm() must be awaited first!");
4834                 }
4835                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
4836                 return nativeResponseValue;
4837         }
4838         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
4839         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
4840                 if(!isWasmInitialized) {
4841                         throw new Error("initializeWasm() must be awaited first!");
4842                 }
4843                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
4844                 // debug statements here
4845         }
4846         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4847         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
4848                 if(!isWasmInitialized) {
4849                         throw new Error("initializeWasm() must be awaited first!");
4850                 }
4851                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
4852                 return nativeResponseValue;
4853         }
4854         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4855         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
4856                 if(!isWasmInitialized) {
4857                         throw new Error("initializeWasm() must be awaited first!");
4858                 }
4859                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
4860                 // debug statements here
4861         }
4862         // 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, uint64_t min_dust_limit_satoshis_arg, uint64_t max_dust_limit_satoshis_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg);
4863         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, min_dust_limit_satoshis_arg: number, max_dust_limit_satoshis_arg: number, max_minimum_depth_arg: number, force_announced_channel_preference_arg: boolean, their_to_self_delay_arg: number): number {
4864                 if(!isWasmInitialized) {
4865                         throw new Error("initializeWasm() must be awaited first!");
4866                 }
4867                 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, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
4868                 return nativeResponseValue;
4869         }
4870         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
4871         export function ChannelHandshakeLimits_clone(orig: number): number {
4872                 if(!isWasmInitialized) {
4873                         throw new Error("initializeWasm() must be awaited first!");
4874                 }
4875                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
4876                 return nativeResponseValue;
4877         }
4878         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
4879         export function ChannelHandshakeLimits_default(): number {
4880                 if(!isWasmInitialized) {
4881                         throw new Error("initializeWasm() must be awaited first!");
4882                 }
4883                 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
4884                 return nativeResponseValue;
4885         }
4886         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
4887         export function ChannelConfig_free(this_obj: number): void {
4888                 if(!isWasmInitialized) {
4889                         throw new Error("initializeWasm() must be awaited first!");
4890                 }
4891                 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
4892                 // debug statements here
4893         }
4894         // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4895         export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
4896                 if(!isWasmInitialized) {
4897                         throw new Error("initializeWasm() must be awaited first!");
4898                 }
4899                 const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
4900                 return nativeResponseValue;
4901         }
4902         // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
4903         export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
4904                 if(!isWasmInitialized) {
4905                         throw new Error("initializeWasm() must be awaited first!");
4906                 }
4907                 const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
4908                 // debug statements here
4909         }
4910         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4911         export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
4912                 if(!isWasmInitialized) {
4913                         throw new Error("initializeWasm() must be awaited first!");
4914                 }
4915                 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
4916                 return nativeResponseValue;
4917         }
4918         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
4919         export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
4920                 if(!isWasmInitialized) {
4921                         throw new Error("initializeWasm() must be awaited first!");
4922                 }
4923                 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
4924                 // debug statements here
4925         }
4926         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4927         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
4928                 if(!isWasmInitialized) {
4929                         throw new Error("initializeWasm() must be awaited first!");
4930                 }
4931                 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
4932                 return nativeResponseValue;
4933         }
4934         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
4935         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
4936                 if(!isWasmInitialized) {
4937                         throw new Error("initializeWasm() must be awaited first!");
4938                 }
4939                 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
4940                 // debug statements here
4941         }
4942         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4943         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
4944                 if(!isWasmInitialized) {
4945                         throw new Error("initializeWasm() must be awaited first!");
4946                 }
4947                 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
4948                 return nativeResponseValue;
4949         }
4950         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
4951         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
4952                 if(!isWasmInitialized) {
4953                         throw new Error("initializeWasm() must be awaited first!");
4954                 }
4955                 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
4956                 // debug statements here
4957         }
4958         // 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);
4959         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 {
4960                 if(!isWasmInitialized) {
4961                         throw new Error("initializeWasm() must be awaited first!");
4962                 }
4963                 const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
4964                 return nativeResponseValue;
4965         }
4966         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
4967         export function ChannelConfig_clone(orig: number): number {
4968                 if(!isWasmInitialized) {
4969                         throw new Error("initializeWasm() must be awaited first!");
4970                 }
4971                 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
4972                 return nativeResponseValue;
4973         }
4974         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
4975         export function ChannelConfig_default(): number {
4976                 if(!isWasmInitialized) {
4977                         throw new Error("initializeWasm() must be awaited first!");
4978                 }
4979                 const nativeResponseValue = wasm.ChannelConfig_default();
4980                 return nativeResponseValue;
4981         }
4982         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
4983         export function ChannelConfig_write(obj: number): Uint8Array {
4984                 if(!isWasmInitialized) {
4985                         throw new Error("initializeWasm() must be awaited first!");
4986                 }
4987                 const nativeResponseValue = wasm.ChannelConfig_write(obj);
4988                 return decodeArray(nativeResponseValue);
4989         }
4990         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
4991         export function ChannelConfig_read(ser: Uint8Array): number {
4992                 if(!isWasmInitialized) {
4993                         throw new Error("initializeWasm() must be awaited first!");
4994                 }
4995                 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
4996                 return nativeResponseValue;
4997         }
4998         // void UserConfig_free(struct LDKUserConfig this_obj);
4999         export function UserConfig_free(this_obj: number): void {
5000                 if(!isWasmInitialized) {
5001                         throw new Error("initializeWasm() must be awaited first!");
5002                 }
5003                 const nativeResponseValue = wasm.UserConfig_free(this_obj);
5004                 // debug statements here
5005         }
5006         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5007         export function UserConfig_get_own_channel_config(this_ptr: number): number {
5008                 if(!isWasmInitialized) {
5009                         throw new Error("initializeWasm() must be awaited first!");
5010                 }
5011                 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
5012                 return nativeResponseValue;
5013         }
5014         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
5015         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
5016                 if(!isWasmInitialized) {
5017                         throw new Error("initializeWasm() must be awaited first!");
5018                 }
5019                 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
5020                 // debug statements here
5021         }
5022         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5023         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
5024                 if(!isWasmInitialized) {
5025                         throw new Error("initializeWasm() must be awaited first!");
5026                 }
5027                 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
5028                 return nativeResponseValue;
5029         }
5030         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
5031         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
5032                 if(!isWasmInitialized) {
5033                         throw new Error("initializeWasm() must be awaited first!");
5034                 }
5035                 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
5036                 // debug statements here
5037         }
5038         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5039         export function UserConfig_get_channel_options(this_ptr: number): number {
5040                 if(!isWasmInitialized) {
5041                         throw new Error("initializeWasm() must be awaited first!");
5042                 }
5043                 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
5044                 return nativeResponseValue;
5045         }
5046         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
5047         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
5048                 if(!isWasmInitialized) {
5049                         throw new Error("initializeWasm() must be awaited first!");
5050                 }
5051                 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
5052                 // debug statements here
5053         }
5054         // 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);
5055         export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
5056                 if(!isWasmInitialized) {
5057                         throw new Error("initializeWasm() must be awaited first!");
5058                 }
5059                 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
5060                 return nativeResponseValue;
5061         }
5062         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
5063         export function UserConfig_clone(orig: number): number {
5064                 if(!isWasmInitialized) {
5065                         throw new Error("initializeWasm() must be awaited first!");
5066                 }
5067                 const nativeResponseValue = wasm.UserConfig_clone(orig);
5068                 return nativeResponseValue;
5069         }
5070         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
5071         export function UserConfig_default(): number {
5072                 if(!isWasmInitialized) {
5073                         throw new Error("initializeWasm() must be awaited first!");
5074                 }
5075                 const nativeResponseValue = wasm.UserConfig_default();
5076                 return nativeResponseValue;
5077         }
5078         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
5079         export function AccessError_clone(orig: number): LDKAccessError {
5080                 if(!isWasmInitialized) {
5081                         throw new Error("initializeWasm() must be awaited first!");
5082                 }
5083                 const nativeResponseValue = wasm.AccessError_clone(orig);
5084                 return nativeResponseValue;
5085         }
5086         // void Access_free(struct LDKAccess this_ptr);
5087         export function Access_free(this_ptr: number): void {
5088                 if(!isWasmInitialized) {
5089                         throw new Error("initializeWasm() must be awaited first!");
5090                 }
5091                 const nativeResponseValue = wasm.Access_free(this_ptr);
5092                 // debug statements here
5093         }
5094         // void Listen_free(struct LDKListen this_ptr);
5095         export function Listen_free(this_ptr: number): void {
5096                 if(!isWasmInitialized) {
5097                         throw new Error("initializeWasm() must be awaited first!");
5098                 }
5099                 const nativeResponseValue = wasm.Listen_free(this_ptr);
5100                 // debug statements here
5101         }
5102         // void Watch_free(struct LDKWatch this_ptr);
5103         export function Watch_free(this_ptr: number): void {
5104                 if(!isWasmInitialized) {
5105                         throw new Error("initializeWasm() must be awaited first!");
5106                 }
5107                 const nativeResponseValue = wasm.Watch_free(this_ptr);
5108                 // debug statements here
5109         }
5110         // void Filter_free(struct LDKFilter this_ptr);
5111         export function Filter_free(this_ptr: number): void {
5112                 if(!isWasmInitialized) {
5113                         throw new Error("initializeWasm() must be awaited first!");
5114                 }
5115                 const nativeResponseValue = wasm.Filter_free(this_ptr);
5116                 // debug statements here
5117         }
5118         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
5119         export function BroadcasterInterface_free(this_ptr: number): void {
5120                 if(!isWasmInitialized) {
5121                         throw new Error("initializeWasm() must be awaited first!");
5122                 }
5123                 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
5124                 // debug statements here
5125         }
5126         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
5127         export function ConfirmationTarget_clone(orig: number): LDKConfirmationTarget {
5128                 if(!isWasmInitialized) {
5129                         throw new Error("initializeWasm() must be awaited first!");
5130                 }
5131                 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
5132                 return nativeResponseValue;
5133         }
5134         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
5135         export function FeeEstimator_free(this_ptr: number): void {
5136                 if(!isWasmInitialized) {
5137                         throw new Error("initializeWasm() must be awaited first!");
5138                 }
5139                 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
5140                 // debug statements here
5141         }
5142         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
5143         export function ChainMonitor_free(this_obj: number): void {
5144                 if(!isWasmInitialized) {
5145                         throw new Error("initializeWasm() must be awaited first!");
5146                 }
5147                 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
5148                 // debug statements here
5149         }
5150         // void ChainMonitor_block_connected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
5151         export function ChainMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
5152                 if(!isWasmInitialized) {
5153                         throw new Error("initializeWasm() must be awaited first!");
5154                 }
5155                 const nativeResponseValue = wasm.ChainMonitor_block_connected(this_arg, encodeArray(header), txdata, height);
5156                 // debug statements here
5157         }
5158         // void ChainMonitor_block_disconnected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t disconnected_height);
5159         export function ChainMonitor_block_disconnected(this_arg: number, header: Uint8Array, disconnected_height: number): void {
5160                 if(!isWasmInitialized) {
5161                         throw new Error("initializeWasm() must be awaited first!");
5162                 }
5163                 const nativeResponseValue = wasm.ChainMonitor_block_disconnected(this_arg, encodeArray(header), disconnected_height);
5164                 // debug statements here
5165         }
5166         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
5167         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
5168                 if(!isWasmInitialized) {
5169                         throw new Error("initializeWasm() must be awaited first!");
5170                 }
5171                 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
5172                 return nativeResponseValue;
5173         }
5174         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5175         export function ChainMonitor_as_Watch(this_arg: number): number {
5176                 if(!isWasmInitialized) {
5177                         throw new Error("initializeWasm() must be awaited first!");
5178                 }
5179                 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
5180                 return nativeResponseValue;
5181         }
5182         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5183         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
5184                 if(!isWasmInitialized) {
5185                         throw new Error("initializeWasm() must be awaited first!");
5186                 }
5187                 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
5188                 return nativeResponseValue;
5189         }
5190         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
5191         export function ChannelMonitorUpdate_free(this_obj: number): void {
5192                 if(!isWasmInitialized) {
5193                         throw new Error("initializeWasm() must be awaited first!");
5194                 }
5195                 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
5196                 // debug statements here
5197         }
5198         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
5199         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
5200                 if(!isWasmInitialized) {
5201                         throw new Error("initializeWasm() must be awaited first!");
5202                 }
5203                 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
5204                 return nativeResponseValue;
5205         }
5206         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
5207         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
5208                 if(!isWasmInitialized) {
5209                         throw new Error("initializeWasm() must be awaited first!");
5210                 }
5211                 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
5212                 // debug statements here
5213         }
5214         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
5215         export function ChannelMonitorUpdate_clone(orig: number): number {
5216                 if(!isWasmInitialized) {
5217                         throw new Error("initializeWasm() must be awaited first!");
5218                 }
5219                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
5220                 return nativeResponseValue;
5221         }
5222         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
5223         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
5224                 if(!isWasmInitialized) {
5225                         throw new Error("initializeWasm() must be awaited first!");
5226                 }
5227                 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
5228                 return decodeArray(nativeResponseValue);
5229         }
5230         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
5231         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
5232                 if(!isWasmInitialized) {
5233                         throw new Error("initializeWasm() must be awaited first!");
5234                 }
5235                 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
5236                 return nativeResponseValue;
5237         }
5238         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
5239         export function ChannelMonitorUpdateErr_clone(orig: number): LDKChannelMonitorUpdateErr {
5240                 if(!isWasmInitialized) {
5241                         throw new Error("initializeWasm() must be awaited first!");
5242                 }
5243                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
5244                 return nativeResponseValue;
5245         }
5246         // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
5247         export function MonitorUpdateError_free(this_obj: number): void {
5248                 if(!isWasmInitialized) {
5249                         throw new Error("initializeWasm() must be awaited first!");
5250                 }
5251                 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
5252                 // debug statements here
5253         }
5254         // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
5255         export function MonitorUpdateError_clone(orig: number): number {
5256                 if(!isWasmInitialized) {
5257                         throw new Error("initializeWasm() must be awaited first!");
5258                 }
5259                 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
5260                 return nativeResponseValue;
5261         }
5262         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
5263         export function MonitorEvent_free(this_ptr: number): void {
5264                 if(!isWasmInitialized) {
5265                         throw new Error("initializeWasm() must be awaited first!");
5266                 }
5267                 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
5268                 // debug statements here
5269         }
5270         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
5271         export function MonitorEvent_clone(orig: number): number {
5272                 if(!isWasmInitialized) {
5273                         throw new Error("initializeWasm() must be awaited first!");
5274                 }
5275                 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
5276                 return nativeResponseValue;
5277         }
5278         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
5279         export function HTLCUpdate_free(this_obj: number): void {
5280                 if(!isWasmInitialized) {
5281                         throw new Error("initializeWasm() must be awaited first!");
5282                 }
5283                 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
5284                 // debug statements here
5285         }
5286         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
5287         export function HTLCUpdate_clone(orig: number): number {
5288                 if(!isWasmInitialized) {
5289                         throw new Error("initializeWasm() must be awaited first!");
5290                 }
5291                 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
5292                 return nativeResponseValue;
5293         }
5294         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
5295         export function HTLCUpdate_write(obj: number): Uint8Array {
5296                 if(!isWasmInitialized) {
5297                         throw new Error("initializeWasm() must be awaited first!");
5298                 }
5299                 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
5300                 return decodeArray(nativeResponseValue);
5301         }
5302         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
5303         export function HTLCUpdate_read(ser: Uint8Array): number {
5304                 if(!isWasmInitialized) {
5305                         throw new Error("initializeWasm() must be awaited first!");
5306                 }
5307                 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
5308                 return nativeResponseValue;
5309         }
5310         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
5311         export function ChannelMonitor_free(this_obj: number): void {
5312                 if(!isWasmInitialized) {
5313                         throw new Error("initializeWasm() must be awaited first!");
5314                 }
5315                 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
5316                 // debug statements here
5317         }
5318         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
5319         export function ChannelMonitor_clone(orig: number): number {
5320                 if(!isWasmInitialized) {
5321                         throw new Error("initializeWasm() must be awaited first!");
5322                 }
5323                 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
5324                 return nativeResponseValue;
5325         }
5326         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
5327         export function ChannelMonitor_write(obj: number): Uint8Array {
5328                 if(!isWasmInitialized) {
5329                         throw new Error("initializeWasm() must be awaited first!");
5330                 }
5331                 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
5332                 return decodeArray(nativeResponseValue);
5333         }
5334         // 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);
5335         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
5336                 if(!isWasmInitialized) {
5337                         throw new Error("initializeWasm() must be awaited first!");
5338                 }
5339                 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
5340                 return nativeResponseValue;
5341         }
5342         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5343         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
5344                 if(!isWasmInitialized) {
5345                         throw new Error("initializeWasm() must be awaited first!");
5346                 }
5347                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
5348                 return nativeResponseValue;
5349         }
5350         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5351         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
5352                 if(!isWasmInitialized) {
5353                         throw new Error("initializeWasm() must be awaited first!");
5354                 }
5355                 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
5356                 return nativeResponseValue;
5357         }
5358         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5359         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
5360                 if(!isWasmInitialized) {
5361                         throw new Error("initializeWasm() must be awaited first!");
5362                 }
5363                 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
5364                 return nativeResponseValue;
5365         }
5366         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
5367         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
5368                 if(!isWasmInitialized) {
5369                         throw new Error("initializeWasm() must be awaited first!");
5370                 }
5371                 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
5372                 // debug statements here
5373         }
5374         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5375         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
5376                 if(!isWasmInitialized) {
5377                         throw new Error("initializeWasm() must be awaited first!");
5378                 }
5379                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
5380                 return nativeResponseValue;
5381         }
5382         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5383         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
5384                 if(!isWasmInitialized) {
5385                         throw new Error("initializeWasm() must be awaited first!");
5386                 }
5387                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
5388                 return nativeResponseValue;
5389         }
5390         // 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);
5391         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
5392                 if(!isWasmInitialized) {
5393                         throw new Error("initializeWasm() must be awaited first!");
5394                 }
5395                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
5396                 return nativeResponseValue;
5397         }
5398         // 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);
5399         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
5400                 if(!isWasmInitialized) {
5401                         throw new Error("initializeWasm() must be awaited first!");
5402                 }
5403                 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
5404                 return nativeResponseValue;
5405         }
5406         // 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);
5407         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
5408                 if(!isWasmInitialized) {
5409                         throw new Error("initializeWasm() must be awaited first!");
5410                 }
5411                 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
5412                 // debug statements here
5413         }
5414         // void Persist_free(struct LDKPersist this_ptr);
5415         export function Persist_free(this_ptr: number): void {
5416                 if(!isWasmInitialized) {
5417                         throw new Error("initializeWasm() must be awaited first!");
5418                 }
5419                 const nativeResponseValue = wasm.Persist_free(this_ptr);
5420                 // debug statements here
5421         }
5422         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
5423         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
5424                 if(!isWasmInitialized) {
5425                         throw new Error("initializeWasm() must be awaited first!");
5426                 }
5427                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
5428                 return nativeResponseValue;
5429         }
5430         // void OutPoint_free(struct LDKOutPoint this_obj);
5431         export function OutPoint_free(this_obj: number): void {
5432                 if(!isWasmInitialized) {
5433                         throw new Error("initializeWasm() must be awaited first!");
5434                 }
5435                 const nativeResponseValue = wasm.OutPoint_free(this_obj);
5436                 // debug statements here
5437         }
5438         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
5439         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
5440                 if(!isWasmInitialized) {
5441                         throw new Error("initializeWasm() must be awaited first!");
5442                 }
5443                 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
5444                 return decodeArray(nativeResponseValue);
5445         }
5446         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5447         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
5448                 if(!isWasmInitialized) {
5449                         throw new Error("initializeWasm() must be awaited first!");
5450                 }
5451                 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
5452                 // debug statements here
5453         }
5454         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
5455         export function OutPoint_get_index(this_ptr: number): number {
5456                 if(!isWasmInitialized) {
5457                         throw new Error("initializeWasm() must be awaited first!");
5458                 }
5459                 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
5460                 return nativeResponseValue;
5461         }
5462         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
5463         export function OutPoint_set_index(this_ptr: number, val: number): void {
5464                 if(!isWasmInitialized) {
5465                         throw new Error("initializeWasm() must be awaited first!");
5466                 }
5467                 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
5468                 // debug statements here
5469         }
5470         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
5471         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
5472                 if(!isWasmInitialized) {
5473                         throw new Error("initializeWasm() must be awaited first!");
5474                 }
5475                 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
5476                 return nativeResponseValue;
5477         }
5478         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
5479         export function OutPoint_clone(orig: number): number {
5480                 if(!isWasmInitialized) {
5481                         throw new Error("initializeWasm() must be awaited first!");
5482                 }
5483                 const nativeResponseValue = wasm.OutPoint_clone(orig);
5484                 return nativeResponseValue;
5485         }
5486         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
5487         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
5488                 if(!isWasmInitialized) {
5489                         throw new Error("initializeWasm() must be awaited first!");
5490                 }
5491                 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
5492                 return decodeArray(nativeResponseValue);
5493         }
5494         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
5495         export function OutPoint_write(obj: number): Uint8Array {
5496                 if(!isWasmInitialized) {
5497                         throw new Error("initializeWasm() must be awaited first!");
5498                 }
5499                 const nativeResponseValue = wasm.OutPoint_write(obj);
5500                 return decodeArray(nativeResponseValue);
5501         }
5502         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
5503         export function OutPoint_read(ser: Uint8Array): number {
5504                 if(!isWasmInitialized) {
5505                         throw new Error("initializeWasm() must be awaited first!");
5506                 }
5507                 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
5508                 return nativeResponseValue;
5509         }
5510         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
5511         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
5512                 if(!isWasmInitialized) {
5513                         throw new Error("initializeWasm() must be awaited first!");
5514                 }
5515                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
5516                 // debug statements here
5517         }
5518         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5519         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5520                 if(!isWasmInitialized) {
5521                         throw new Error("initializeWasm() must be awaited first!");
5522                 }
5523                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
5524                 return nativeResponseValue;
5525         }
5526         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5527         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5528                 if(!isWasmInitialized) {
5529                         throw new Error("initializeWasm() must be awaited first!");
5530                 }
5531                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5532                 // debug statements here
5533         }
5534         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5535         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
5536                 if(!isWasmInitialized) {
5537                         throw new Error("initializeWasm() must be awaited first!");
5538                 }
5539                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
5540                 return decodeArray(nativeResponseValue);
5541         }
5542         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5543         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5544                 if(!isWasmInitialized) {
5545                         throw new Error("initializeWasm() must be awaited first!");
5546                 }
5547                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
5548                 // debug statements here
5549         }
5550         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5551         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
5552                 if(!isWasmInitialized) {
5553                         throw new Error("initializeWasm() must be awaited first!");
5554                 }
5555                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
5556                 return nativeResponseValue;
5557         }
5558         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
5559         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
5560                 if(!isWasmInitialized) {
5561                         throw new Error("initializeWasm() must be awaited first!");
5562                 }
5563                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
5564                 // debug statements here
5565         }
5566         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5567         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5568                 if(!isWasmInitialized) {
5569                         throw new Error("initializeWasm() must be awaited first!");
5570                 }
5571                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
5572                 // debug statements here
5573         }
5574         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5575         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
5576                 if(!isWasmInitialized) {
5577                         throw new Error("initializeWasm() must be awaited first!");
5578                 }
5579                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
5580                 return decodeArray(nativeResponseValue);
5581         }
5582         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5583         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
5584                 if(!isWasmInitialized) {
5585                         throw new Error("initializeWasm() must be awaited first!");
5586                 }
5587                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
5588                 // debug statements here
5589         }
5590         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5591         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5592                 if(!isWasmInitialized) {
5593                         throw new Error("initializeWasm() must be awaited first!");
5594                 }
5595                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5596                 return decodeArray(nativeResponseValue);
5597         }
5598         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5599         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
5600                 if(!isWasmInitialized) {
5601                         throw new Error("initializeWasm() must be awaited first!");
5602                 }
5603                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5604                 // debug statements here
5605         }
5606         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5607         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5608                 if(!isWasmInitialized) {
5609                         throw new Error("initializeWasm() must be awaited first!");
5610                 }
5611                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5612                 return nativeResponseValue;
5613         }
5614         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5615         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
5616                 if(!isWasmInitialized) {
5617                         throw new Error("initializeWasm() must be awaited first!");
5618                 }
5619                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5620                 // debug statements here
5621         }
5622         // 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);
5623         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 {
5624                 if(!isWasmInitialized) {
5625                         throw new Error("initializeWasm() must be awaited first!");
5626                 }
5627                 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);
5628                 return nativeResponseValue;
5629         }
5630         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
5631         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
5632                 if(!isWasmInitialized) {
5633                         throw new Error("initializeWasm() must be awaited first!");
5634                 }
5635                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
5636                 return nativeResponseValue;
5637         }
5638         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
5639         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
5640                 if(!isWasmInitialized) {
5641                         throw new Error("initializeWasm() must be awaited first!");
5642                 }
5643                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
5644                 // debug statements here
5645         }
5646         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5647         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5648                 if(!isWasmInitialized) {
5649                         throw new Error("initializeWasm() must be awaited first!");
5650                 }
5651                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
5652                 return nativeResponseValue;
5653         }
5654         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5655         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5656                 if(!isWasmInitialized) {
5657                         throw new Error("initializeWasm() must be awaited first!");
5658                 }
5659                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5660                 // debug statements here
5661         }
5662         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5663         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5664                 if(!isWasmInitialized) {
5665                         throw new Error("initializeWasm() must be awaited first!");
5666                 }
5667                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
5668                 // debug statements here
5669         }
5670         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5671         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5672                 if(!isWasmInitialized) {
5673                         throw new Error("initializeWasm() must be awaited first!");
5674                 }
5675                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5676                 return decodeArray(nativeResponseValue);
5677         }
5678         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5679         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
5680                 if(!isWasmInitialized) {
5681                         throw new Error("initializeWasm() must be awaited first!");
5682                 }
5683                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5684                 // debug statements here
5685         }
5686         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5687         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5688                 if(!isWasmInitialized) {
5689                         throw new Error("initializeWasm() must be awaited first!");
5690                 }
5691                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5692                 return nativeResponseValue;
5693         }
5694         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5695         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
5696                 if(!isWasmInitialized) {
5697                         throw new Error("initializeWasm() must be awaited first!");
5698                 }
5699                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5700                 // debug statements here
5701         }
5702         // 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);
5703         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
5704                 if(!isWasmInitialized) {
5705                         throw new Error("initializeWasm() must be awaited first!");
5706                 }
5707                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
5708                 return nativeResponseValue;
5709         }
5710         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
5711         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
5712                 if(!isWasmInitialized) {
5713                         throw new Error("initializeWasm() must be awaited first!");
5714                 }
5715                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
5716                 return nativeResponseValue;
5717         }
5718         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
5719         export function SpendableOutputDescriptor_free(this_ptr: number): void {
5720                 if(!isWasmInitialized) {
5721                         throw new Error("initializeWasm() must be awaited first!");
5722                 }
5723                 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
5724                 // debug statements here
5725         }
5726         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
5727         export function SpendableOutputDescriptor_clone(orig: number): number {
5728                 if(!isWasmInitialized) {
5729                         throw new Error("initializeWasm() must be awaited first!");
5730                 }
5731                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
5732                 return nativeResponseValue;
5733         }
5734         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
5735         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
5736                 if(!isWasmInitialized) {
5737                         throw new Error("initializeWasm() must be awaited first!");
5738                 }
5739                 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
5740                 return decodeArray(nativeResponseValue);
5741         }
5742         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
5743         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
5744                 if(!isWasmInitialized) {
5745                         throw new Error("initializeWasm() must be awaited first!");
5746                 }
5747                 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
5748                 return nativeResponseValue;
5749         }
5750         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
5751         export function Sign_clone(orig: number): number {
5752                 if(!isWasmInitialized) {
5753                         throw new Error("initializeWasm() must be awaited first!");
5754                 }
5755                 const nativeResponseValue = wasm.Sign_clone(orig);
5756                 return nativeResponseValue;
5757         }
5758         // void Sign_free(struct LDKSign this_ptr);
5759         export function Sign_free(this_ptr: number): void {
5760                 if(!isWasmInitialized) {
5761                         throw new Error("initializeWasm() must be awaited first!");
5762                 }
5763                 const nativeResponseValue = wasm.Sign_free(this_ptr);
5764                 // debug statements here
5765         }
5766         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
5767         export function KeysInterface_free(this_ptr: number): void {
5768                 if(!isWasmInitialized) {
5769                         throw new Error("initializeWasm() must be awaited first!");
5770                 }
5771                 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
5772                 // debug statements here
5773         }
5774         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
5775         export function InMemorySigner_free(this_obj: number): void {
5776                 if(!isWasmInitialized) {
5777                         throw new Error("initializeWasm() must be awaited first!");
5778                 }
5779                 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
5780                 // debug statements here
5781         }
5782         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5783         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
5784                 if(!isWasmInitialized) {
5785                         throw new Error("initializeWasm() must be awaited first!");
5786                 }
5787                 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
5788                 return decodeArray(nativeResponseValue);
5789         }
5790         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5791         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
5792                 if(!isWasmInitialized) {
5793                         throw new Error("initializeWasm() must be awaited first!");
5794                 }
5795                 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
5796                 // debug statements here
5797         }
5798         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5799         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
5800                 if(!isWasmInitialized) {
5801                         throw new Error("initializeWasm() must be awaited first!");
5802                 }
5803                 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
5804                 return decodeArray(nativeResponseValue);
5805         }
5806         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5807         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
5808                 if(!isWasmInitialized) {
5809                         throw new Error("initializeWasm() must be awaited first!");
5810                 }
5811                 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
5812                 // debug statements here
5813         }
5814         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5815         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
5816                 if(!isWasmInitialized) {
5817                         throw new Error("initializeWasm() must be awaited first!");
5818                 }
5819                 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
5820                 return decodeArray(nativeResponseValue);
5821         }
5822         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5823         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
5824                 if(!isWasmInitialized) {
5825                         throw new Error("initializeWasm() must be awaited first!");
5826                 }
5827                 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
5828                 // debug statements here
5829         }
5830         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5831         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
5832                 if(!isWasmInitialized) {
5833                         throw new Error("initializeWasm() must be awaited first!");
5834                 }
5835                 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
5836                 return decodeArray(nativeResponseValue);
5837         }
5838         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5839         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
5840                 if(!isWasmInitialized) {
5841                         throw new Error("initializeWasm() must be awaited first!");
5842                 }
5843                 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
5844                 // debug statements here
5845         }
5846         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5847         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
5848                 if(!isWasmInitialized) {
5849                         throw new Error("initializeWasm() must be awaited first!");
5850                 }
5851                 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
5852                 return decodeArray(nativeResponseValue);
5853         }
5854         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5855         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
5856                 if(!isWasmInitialized) {
5857                         throw new Error("initializeWasm() must be awaited first!");
5858                 }
5859                 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
5860                 // debug statements here
5861         }
5862         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5863         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
5864                 if(!isWasmInitialized) {
5865                         throw new Error("initializeWasm() must be awaited first!");
5866                 }
5867                 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
5868                 return decodeArray(nativeResponseValue);
5869         }
5870         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5871         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
5872                 if(!isWasmInitialized) {
5873                         throw new Error("initializeWasm() must be awaited first!");
5874                 }
5875                 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
5876                 // debug statements here
5877         }
5878         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
5879         export function InMemorySigner_clone(orig: number): number {
5880                 if(!isWasmInitialized) {
5881                         throw new Error("initializeWasm() must be awaited first!");
5882                 }
5883                 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
5884                 return nativeResponseValue;
5885         }
5886         // 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);
5887         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 {
5888                 if(!isWasmInitialized) {
5889                         throw new Error("initializeWasm() must be awaited first!");
5890                 }
5891                 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));
5892                 return nativeResponseValue;
5893         }
5894         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5895         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
5896                 if(!isWasmInitialized) {
5897                         throw new Error("initializeWasm() must be awaited first!");
5898                 }
5899                 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
5900                 return nativeResponseValue;
5901         }
5902         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5903         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
5904                 if(!isWasmInitialized) {
5905                         throw new Error("initializeWasm() must be awaited first!");
5906                 }
5907                 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
5908                 return nativeResponseValue;
5909         }
5910         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5911         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
5912                 if(!isWasmInitialized) {
5913                         throw new Error("initializeWasm() must be awaited first!");
5914                 }
5915                 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
5916                 return nativeResponseValue;
5917         }
5918         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5919         export function InMemorySigner_is_outbound(this_arg: number): boolean {
5920                 if(!isWasmInitialized) {
5921                         throw new Error("initializeWasm() must be awaited first!");
5922                 }
5923                 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
5924                 return nativeResponseValue;
5925         }
5926         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5927         export function InMemorySigner_funding_outpoint(this_arg: number): number {
5928                 if(!isWasmInitialized) {
5929                         throw new Error("initializeWasm() must be awaited first!");
5930                 }
5931                 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
5932                 return nativeResponseValue;
5933         }
5934         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5935         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
5936                 if(!isWasmInitialized) {
5937                         throw new Error("initializeWasm() must be awaited first!");
5938                 }
5939                 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
5940                 return nativeResponseValue;
5941         }
5942         // 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);
5943         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
5944                 if(!isWasmInitialized) {
5945                         throw new Error("initializeWasm() must be awaited first!");
5946                 }
5947                 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
5948                 return nativeResponseValue;
5949         }
5950         // 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);
5951         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
5952                 if(!isWasmInitialized) {
5953                         throw new Error("initializeWasm() must be awaited first!");
5954                 }
5955                 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
5956                 return nativeResponseValue;
5957         }
5958         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5959         export function InMemorySigner_as_Sign(this_arg: number): number {
5960                 if(!isWasmInitialized) {
5961                         throw new Error("initializeWasm() must be awaited first!");
5962                 }
5963                 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
5964                 return nativeResponseValue;
5965         }
5966         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
5967         export function InMemorySigner_write(obj: number): Uint8Array {
5968                 if(!isWasmInitialized) {
5969                         throw new Error("initializeWasm() must be awaited first!");
5970                 }
5971                 const nativeResponseValue = wasm.InMemorySigner_write(obj);
5972                 return decodeArray(nativeResponseValue);
5973         }
5974         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
5975         export function InMemorySigner_read(ser: Uint8Array): number {
5976                 if(!isWasmInitialized) {
5977                         throw new Error("initializeWasm() must be awaited first!");
5978                 }
5979                 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
5980                 return nativeResponseValue;
5981         }
5982         // void KeysManager_free(struct LDKKeysManager this_obj);
5983         export function KeysManager_free(this_obj: number): void {
5984                 if(!isWasmInitialized) {
5985                         throw new Error("initializeWasm() must be awaited first!");
5986                 }
5987                 const nativeResponseValue = wasm.KeysManager_free(this_obj);
5988                 // debug statements here
5989         }
5990         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
5991         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
5992                 if(!isWasmInitialized) {
5993                         throw new Error("initializeWasm() must be awaited first!");
5994                 }
5995                 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
5996                 return nativeResponseValue;
5997         }
5998         // 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]);
5999         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
6000                 if(!isWasmInitialized) {
6001                         throw new Error("initializeWasm() must be awaited first!");
6002                 }
6003                 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
6004                 return nativeResponseValue;
6005         }
6006         // 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);
6007         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
6008                 if(!isWasmInitialized) {
6009                         throw new Error("initializeWasm() must be awaited first!");
6010                 }
6011                 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
6012                 return nativeResponseValue;
6013         }
6014         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
6015         export function KeysManager_as_KeysInterface(this_arg: number): number {
6016                 if(!isWasmInitialized) {
6017                         throw new Error("initializeWasm() must be awaited first!");
6018                 }
6019                 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
6020                 return nativeResponseValue;
6021         }
6022         // void ChannelManager_free(struct LDKChannelManager this_obj);
6023         export function ChannelManager_free(this_obj: number): void {
6024                 if(!isWasmInitialized) {
6025                         throw new Error("initializeWasm() must be awaited first!");
6026                 }
6027                 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
6028                 // debug statements here
6029         }
6030         // void ChainParameters_free(struct LDKChainParameters this_obj);
6031         export function ChainParameters_free(this_obj: number): void {
6032                 if(!isWasmInitialized) {
6033                         throw new Error("initializeWasm() must be awaited first!");
6034                 }
6035                 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
6036                 // debug statements here
6037         }
6038         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
6039         export function ChainParameters_get_network(this_ptr: number): LDKNetwork {
6040                 if(!isWasmInitialized) {
6041                         throw new Error("initializeWasm() must be awaited first!");
6042                 }
6043                 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
6044                 return nativeResponseValue;
6045         }
6046         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
6047         export function ChainParameters_set_network(this_ptr: number, val: LDKNetwork): void {
6048                 if(!isWasmInitialized) {
6049                         throw new Error("initializeWasm() must be awaited first!");
6050                 }
6051                 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
6052                 // debug statements here
6053         }
6054         // const uint8_t (*ChainParameters_get_latest_hash(const struct LDKChainParameters *NONNULL_PTR this_ptr))[32];
6055         export function ChainParameters_get_latest_hash(this_ptr: number): Uint8Array {
6056                 if(!isWasmInitialized) {
6057                         throw new Error("initializeWasm() must be awaited first!");
6058                 }
6059                 const nativeResponseValue = wasm.ChainParameters_get_latest_hash(this_ptr);
6060                 return decodeArray(nativeResponseValue);
6061         }
6062         // void ChainParameters_set_latest_hash(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6063         export function ChainParameters_set_latest_hash(this_ptr: number, val: Uint8Array): void {
6064                 if(!isWasmInitialized) {
6065                         throw new Error("initializeWasm() must be awaited first!");
6066                 }
6067                 const nativeResponseValue = wasm.ChainParameters_set_latest_hash(this_ptr, encodeArray(val));
6068                 // debug statements here
6069         }
6070         // uintptr_t ChainParameters_get_latest_height(const struct LDKChainParameters *NONNULL_PTR this_ptr);
6071         export function ChainParameters_get_latest_height(this_ptr: number): number {
6072                 if(!isWasmInitialized) {
6073                         throw new Error("initializeWasm() must be awaited first!");
6074                 }
6075                 const nativeResponseValue = wasm.ChainParameters_get_latest_height(this_ptr);
6076                 return nativeResponseValue;
6077         }
6078         // void ChainParameters_set_latest_height(struct LDKChainParameters *NONNULL_PTR this_ptr, uintptr_t val);
6079         export function ChainParameters_set_latest_height(this_ptr: number, val: number): void {
6080                 if(!isWasmInitialized) {
6081                         throw new Error("initializeWasm() must be awaited first!");
6082                 }
6083                 const nativeResponseValue = wasm.ChainParameters_set_latest_height(this_ptr, val);
6084                 // debug statements here
6085         }
6086         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKThirtyTwoBytes latest_hash_arg, uintptr_t latest_height_arg);
6087         export function ChainParameters_new(network_arg: LDKNetwork, latest_hash_arg: Uint8Array, latest_height_arg: number): number {
6088                 if(!isWasmInitialized) {
6089                         throw new Error("initializeWasm() must be awaited first!");
6090                 }
6091                 const nativeResponseValue = wasm.ChainParameters_new(network_arg, encodeArray(latest_hash_arg), latest_height_arg);
6092                 return nativeResponseValue;
6093         }
6094         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
6095         export function ChannelDetails_free(this_obj: number): void {
6096                 if(!isWasmInitialized) {
6097                         throw new Error("initializeWasm() must be awaited first!");
6098                 }
6099                 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
6100                 // debug statements here
6101         }
6102         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
6103         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
6104                 if(!isWasmInitialized) {
6105                         throw new Error("initializeWasm() must be awaited first!");
6106                 }
6107                 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
6108                 return decodeArray(nativeResponseValue);
6109         }
6110         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6111         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
6112                 if(!isWasmInitialized) {
6113                         throw new Error("initializeWasm() must be awaited first!");
6114                 }
6115                 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
6116                 // debug statements here
6117         }
6118         // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6119         export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
6120                 if(!isWasmInitialized) {
6121                         throw new Error("initializeWasm() must be awaited first!");
6122                 }
6123                 const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
6124                 return decodeArray(nativeResponseValue);
6125         }
6126         // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6127         export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
6128                 if(!isWasmInitialized) {
6129                         throw new Error("initializeWasm() must be awaited first!");
6130                 }
6131                 const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
6132                 // debug statements here
6133         }
6134         // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6135         export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
6136                 if(!isWasmInitialized) {
6137                         throw new Error("initializeWasm() must be awaited first!");
6138                 }
6139                 const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
6140                 return nativeResponseValue;
6141         }
6142         // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6143         export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
6144                 if(!isWasmInitialized) {
6145                         throw new Error("initializeWasm() must be awaited first!");
6146                 }
6147                 const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
6148                 // debug statements here
6149         }
6150         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6151         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
6152                 if(!isWasmInitialized) {
6153                         throw new Error("initializeWasm() must be awaited first!");
6154                 }
6155                 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
6156                 return nativeResponseValue;
6157         }
6158         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6159         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
6160                 if(!isWasmInitialized) {
6161                         throw new Error("initializeWasm() must be awaited first!");
6162                 }
6163                 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
6164                 // debug statements here
6165         }
6166         // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6167         export function ChannelDetails_get_user_id(this_ptr: number): number {
6168                 if(!isWasmInitialized) {
6169                         throw new Error("initializeWasm() must be awaited first!");
6170                 }
6171                 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
6172                 return nativeResponseValue;
6173         }
6174         // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6175         export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
6176                 if(!isWasmInitialized) {
6177                         throw new Error("initializeWasm() must be awaited first!");
6178                 }
6179                 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
6180                 // debug statements here
6181         }
6182         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6183         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
6184                 if(!isWasmInitialized) {
6185                         throw new Error("initializeWasm() must be awaited first!");
6186                 }
6187                 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
6188                 return nativeResponseValue;
6189         }
6190         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6191         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
6192                 if(!isWasmInitialized) {
6193                         throw new Error("initializeWasm() must be awaited first!");
6194                 }
6195                 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
6196                 // debug statements here
6197         }
6198         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6199         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
6200                 if(!isWasmInitialized) {
6201                         throw new Error("initializeWasm() must be awaited first!");
6202                 }
6203                 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
6204                 return nativeResponseValue;
6205         }
6206         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6207         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
6208                 if(!isWasmInitialized) {
6209                         throw new Error("initializeWasm() must be awaited first!");
6210                 }
6211                 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
6212                 // debug statements here
6213         }
6214         // bool ChannelDetails_get_is_live(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6215         export function ChannelDetails_get_is_live(this_ptr: number): boolean {
6216                 if(!isWasmInitialized) {
6217                         throw new Error("initializeWasm() must be awaited first!");
6218                 }
6219                 const nativeResponseValue = wasm.ChannelDetails_get_is_live(this_ptr);
6220                 return nativeResponseValue;
6221         }
6222         // void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
6223         export function ChannelDetails_set_is_live(this_ptr: number, val: boolean): void {
6224                 if(!isWasmInitialized) {
6225                         throw new Error("initializeWasm() must be awaited first!");
6226                 }
6227                 const nativeResponseValue = wasm.ChannelDetails_set_is_live(this_ptr, val);
6228                 // debug statements here
6229         }
6230         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
6231         export function ChannelDetails_clone(orig: number): number {
6232                 if(!isWasmInitialized) {
6233                         throw new Error("initializeWasm() must be awaited first!");
6234                 }
6235                 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
6236                 return nativeResponseValue;
6237         }
6238         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
6239         export function PaymentSendFailure_free(this_ptr: number): void {
6240                 if(!isWasmInitialized) {
6241                         throw new Error("initializeWasm() must be awaited first!");
6242                 }
6243                 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
6244                 // debug statements here
6245         }
6246         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
6247         export function PaymentSendFailure_clone(orig: number): number {
6248                 if(!isWasmInitialized) {
6249                         throw new Error("initializeWasm() must be awaited first!");
6250                 }
6251                 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
6252                 return nativeResponseValue;
6253         }
6254         // 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);
6255         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
6256                 if(!isWasmInitialized) {
6257                         throw new Error("initializeWasm() must be awaited first!");
6258                 }
6259                 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
6260                 return nativeResponseValue;
6261         }
6262         // 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);
6263         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 {
6264                 if(!isWasmInitialized) {
6265                         throw new Error("initializeWasm() must be awaited first!");
6266                 }
6267                 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
6268                 return nativeResponseValue;
6269         }
6270         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6271         export function ChannelManager_list_channels(this_arg: number): number[] {
6272                 if(!isWasmInitialized) {
6273                         throw new Error("initializeWasm() must be awaited first!");
6274                 }
6275                 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
6276                 return nativeResponseValue;
6277         }
6278         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6279         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
6280                 if(!isWasmInitialized) {
6281                         throw new Error("initializeWasm() must be awaited first!");
6282                 }
6283                 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
6284                 return nativeResponseValue;
6285         }
6286         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6287         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
6288                 if(!isWasmInitialized) {
6289                         throw new Error("initializeWasm() must be awaited first!");
6290                 }
6291                 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
6292                 return nativeResponseValue;
6293         }
6294         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6295         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
6296                 if(!isWasmInitialized) {
6297                         throw new Error("initializeWasm() must be awaited first!");
6298                 }
6299                 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
6300                 return nativeResponseValue;
6301         }
6302         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6303         export function ChannelManager_force_close_all_channels(this_arg: number): void {
6304                 if(!isWasmInitialized) {
6305                         throw new Error("initializeWasm() must be awaited first!");
6306                 }
6307                 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
6308                 // debug statements here
6309         }
6310         // 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);
6311         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
6312                 if(!isWasmInitialized) {
6313                         throw new Error("initializeWasm() must be awaited first!");
6314                 }
6315                 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
6316                 return nativeResponseValue;
6317         }
6318         // void ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKOutPoint funding_txo);
6319         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_txo: number): void {
6320                 if(!isWasmInitialized) {
6321                         throw new Error("initializeWasm() must be awaited first!");
6322                 }
6323                 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), funding_txo);
6324                 // debug statements here
6325         }
6326         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
6327         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
6328                 if(!isWasmInitialized) {
6329                         throw new Error("initializeWasm() must be awaited first!");
6330                 }
6331                 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
6332                 // debug statements here
6333         }
6334         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
6335         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
6336                 if(!isWasmInitialized) {
6337                         throw new Error("initializeWasm() must be awaited first!");
6338                 }
6339                 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
6340                 // debug statements here
6341         }
6342         // void ChannelManager_timer_chan_freshness_every_min(const struct LDKChannelManager *NONNULL_PTR this_arg);
6343         export function ChannelManager_timer_chan_freshness_every_min(this_arg: number): void {
6344                 if(!isWasmInitialized) {
6345                         throw new Error("initializeWasm() must be awaited first!");
6346                 }
6347                 const nativeResponseValue = wasm.ChannelManager_timer_chan_freshness_every_min(this_arg);
6348                 // debug statements here
6349         }
6350         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32], struct LDKThirtyTwoBytes payment_secret);
6351         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): boolean {
6352                 if(!isWasmInitialized) {
6353                         throw new Error("initializeWasm() must be awaited first!");
6354                 }
6355                 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash), encodeArray(payment_secret));
6356                 return nativeResponseValue;
6357         }
6358         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t expected_amount);
6359         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array, payment_secret: Uint8Array, expected_amount: number): boolean {
6360                 if(!isWasmInitialized) {
6361                         throw new Error("initializeWasm() must be awaited first!");
6362                 }
6363                 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage), encodeArray(payment_secret), expected_amount);
6364                 return nativeResponseValue;
6365         }
6366         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
6367         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
6368                 if(!isWasmInitialized) {
6369                         throw new Error("initializeWasm() must be awaited first!");
6370                 }
6371                 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
6372                 return decodeArray(nativeResponseValue);
6373         }
6374         // 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);
6375         export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
6376                 if(!isWasmInitialized) {
6377                         throw new Error("initializeWasm() must be awaited first!");
6378                 }
6379                 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
6380                 // debug statements here
6381         }
6382         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6383         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
6384                 if(!isWasmInitialized) {
6385                         throw new Error("initializeWasm() must be awaited first!");
6386                 }
6387                 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
6388                 return nativeResponseValue;
6389         }
6390         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6391         export function ChannelManager_as_EventsProvider(this_arg: number): number {
6392                 if(!isWasmInitialized) {
6393                         throw new Error("initializeWasm() must be awaited first!");
6394                 }
6395                 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
6396                 return nativeResponseValue;
6397         }
6398         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
6399         export function ChannelManager_as_Listen(this_arg: number): number {
6400                 if(!isWasmInitialized) {
6401                         throw new Error("initializeWasm() must be awaited first!");
6402                 }
6403                 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
6404                 return nativeResponseValue;
6405         }
6406         // void ChannelManager_block_connected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
6407         export function ChannelManager_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
6408                 if(!isWasmInitialized) {
6409                         throw new Error("initializeWasm() must be awaited first!");
6410                 }
6411                 const nativeResponseValue = wasm.ChannelManager_block_connected(this_arg, encodeArray(header), txdata, height);
6412                 // debug statements here
6413         }
6414         // void ChannelManager_block_disconnected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80]);
6415         export function ChannelManager_block_disconnected(this_arg: number, header: Uint8Array): void {
6416                 if(!isWasmInitialized) {
6417                         throw new Error("initializeWasm() must be awaited first!");
6418                 }
6419                 const nativeResponseValue = wasm.ChannelManager_block_disconnected(this_arg, encodeArray(header));
6420                 // debug statements here
6421         }
6422         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
6423         export function ChannelManager_await_persistable_update(this_arg: number): void {
6424                 if(!isWasmInitialized) {
6425                         throw new Error("initializeWasm() must be awaited first!");
6426                 }
6427                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
6428                 // debug statements here
6429         }
6430         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
6431         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
6432                 if(!isWasmInitialized) {
6433                         throw new Error("initializeWasm() must be awaited first!");
6434                 }
6435                 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
6436                 return nativeResponseValue;
6437         }
6438         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
6439         export function ChannelManager_write(obj: number): Uint8Array {
6440                 if(!isWasmInitialized) {
6441                         throw new Error("initializeWasm() must be awaited first!");
6442                 }
6443                 const nativeResponseValue = wasm.ChannelManager_write(obj);
6444                 return decodeArray(nativeResponseValue);
6445         }
6446         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
6447         export function ChannelManagerReadArgs_free(this_obj: number): void {
6448                 if(!isWasmInitialized) {
6449                         throw new Error("initializeWasm() must be awaited first!");
6450                 }
6451                 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
6452                 // debug statements here
6453         }
6454         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6455         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
6456                 if(!isWasmInitialized) {
6457                         throw new Error("initializeWasm() must be awaited first!");
6458                 }
6459                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
6460                 return nativeResponseValue;
6461         }
6462         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
6463         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
6464                 if(!isWasmInitialized) {
6465                         throw new Error("initializeWasm() must be awaited first!");
6466                 }
6467                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
6468                 // debug statements here
6469         }
6470         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6471         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
6472                 if(!isWasmInitialized) {
6473                         throw new Error("initializeWasm() must be awaited first!");
6474                 }
6475                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
6476                 return nativeResponseValue;
6477         }
6478         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
6479         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
6480                 if(!isWasmInitialized) {
6481                         throw new Error("initializeWasm() must be awaited first!");
6482                 }
6483                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
6484                 // debug statements here
6485         }
6486         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6487         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
6488                 if(!isWasmInitialized) {
6489                         throw new Error("initializeWasm() must be awaited first!");
6490                 }
6491                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
6492                 return nativeResponseValue;
6493         }
6494         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
6495         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
6496                 if(!isWasmInitialized) {
6497                         throw new Error("initializeWasm() must be awaited first!");
6498                 }
6499                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
6500                 // debug statements here
6501         }
6502         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6503         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
6504                 if(!isWasmInitialized) {
6505                         throw new Error("initializeWasm() must be awaited first!");
6506                 }
6507                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
6508                 return nativeResponseValue;
6509         }
6510         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
6511         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
6512                 if(!isWasmInitialized) {
6513                         throw new Error("initializeWasm() must be awaited first!");
6514                 }
6515                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
6516                 // debug statements here
6517         }
6518         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6519         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
6520                 if(!isWasmInitialized) {
6521                         throw new Error("initializeWasm() must be awaited first!");
6522                 }
6523                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
6524                 return nativeResponseValue;
6525         }
6526         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
6527         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
6528                 if(!isWasmInitialized) {
6529                         throw new Error("initializeWasm() must be awaited first!");
6530                 }
6531                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
6532                 // debug statements here
6533         }
6534         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6535         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
6536                 if(!isWasmInitialized) {
6537                         throw new Error("initializeWasm() must be awaited first!");
6538                 }
6539                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
6540                 return nativeResponseValue;
6541         }
6542         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
6543         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
6544                 if(!isWasmInitialized) {
6545                         throw new Error("initializeWasm() must be awaited first!");
6546                 }
6547                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
6548                 // debug statements here
6549         }
6550         // 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);
6551         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 {
6552                 if(!isWasmInitialized) {
6553                         throw new Error("initializeWasm() must be awaited first!");
6554                 }
6555                 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
6556                 return nativeResponseValue;
6557         }
6558         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
6559         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
6560                 if(!isWasmInitialized) {
6561                         throw new Error("initializeWasm() must be awaited first!");
6562                 }
6563                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
6564                 return nativeResponseValue;
6565         }
6566         // void DecodeError_free(struct LDKDecodeError this_obj);
6567         export function DecodeError_free(this_obj: number): void {
6568                 if(!isWasmInitialized) {
6569                         throw new Error("initializeWasm() must be awaited first!");
6570                 }
6571                 const nativeResponseValue = wasm.DecodeError_free(this_obj);
6572                 // debug statements here
6573         }
6574         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
6575         export function DecodeError_clone(orig: number): number {
6576                 if(!isWasmInitialized) {
6577                         throw new Error("initializeWasm() must be awaited first!");
6578                 }
6579                 const nativeResponseValue = wasm.DecodeError_clone(orig);
6580                 return nativeResponseValue;
6581         }
6582         // void Init_free(struct LDKInit this_obj);
6583         export function Init_free(this_obj: number): void {
6584                 if(!isWasmInitialized) {
6585                         throw new Error("initializeWasm() must be awaited first!");
6586                 }
6587                 const nativeResponseValue = wasm.Init_free(this_obj);
6588                 // debug statements here
6589         }
6590         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
6591         export function Init_get_features(this_ptr: number): number {
6592                 if(!isWasmInitialized) {
6593                         throw new Error("initializeWasm() must be awaited first!");
6594                 }
6595                 const nativeResponseValue = wasm.Init_get_features(this_ptr);
6596                 return nativeResponseValue;
6597         }
6598         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6599         export function Init_set_features(this_ptr: number, val: number): void {
6600                 if(!isWasmInitialized) {
6601                         throw new Error("initializeWasm() must be awaited first!");
6602                 }
6603                 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
6604                 // debug statements here
6605         }
6606         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
6607         export function Init_new(features_arg: number): number {
6608                 if(!isWasmInitialized) {
6609                         throw new Error("initializeWasm() must be awaited first!");
6610                 }
6611                 const nativeResponseValue = wasm.Init_new(features_arg);
6612                 return nativeResponseValue;
6613         }
6614         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
6615         export function Init_clone(orig: number): number {
6616                 if(!isWasmInitialized) {
6617                         throw new Error("initializeWasm() must be awaited first!");
6618                 }
6619                 const nativeResponseValue = wasm.Init_clone(orig);
6620                 return nativeResponseValue;
6621         }
6622         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
6623         export function ErrorMessage_free(this_obj: number): void {
6624                 if(!isWasmInitialized) {
6625                         throw new Error("initializeWasm() must be awaited first!");
6626                 }
6627                 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
6628                 // debug statements here
6629         }
6630         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
6631         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
6632                 if(!isWasmInitialized) {
6633                         throw new Error("initializeWasm() must be awaited first!");
6634                 }
6635                 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
6636                 return decodeArray(nativeResponseValue);
6637         }
6638         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6639         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
6640                 if(!isWasmInitialized) {
6641                         throw new Error("initializeWasm() must be awaited first!");
6642                 }
6643                 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
6644                 // debug statements here
6645         }
6646         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
6647         export function ErrorMessage_get_data(this_ptr: number): String {
6648                 if(!isWasmInitialized) {
6649                         throw new Error("initializeWasm() must be awaited first!");
6650                 }
6651                 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
6652                 return nativeResponseValue;
6653         }
6654         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
6655         export function ErrorMessage_set_data(this_ptr: number, val: Uint8Array): void {
6656                 if(!isWasmInitialized) {
6657                         throw new Error("initializeWasm() must be awaited first!");
6658                 }
6659                 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, encodeArray(val));
6660                 // debug statements here
6661         }
6662         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
6663         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: Uint8Array): number {
6664                 if(!isWasmInitialized) {
6665                         throw new Error("initializeWasm() must be awaited first!");
6666                 }
6667                 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), encodeArray(data_arg));
6668                 return nativeResponseValue;
6669         }
6670         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
6671         export function ErrorMessage_clone(orig: number): number {
6672                 if(!isWasmInitialized) {
6673                         throw new Error("initializeWasm() must be awaited first!");
6674                 }
6675                 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
6676                 return nativeResponseValue;
6677         }
6678         // void Ping_free(struct LDKPing this_obj);
6679         export function Ping_free(this_obj: number): void {
6680                 if(!isWasmInitialized) {
6681                         throw new Error("initializeWasm() must be awaited first!");
6682                 }
6683                 const nativeResponseValue = wasm.Ping_free(this_obj);
6684                 // debug statements here
6685         }
6686         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
6687         export function Ping_get_ponglen(this_ptr: number): number {
6688                 if(!isWasmInitialized) {
6689                         throw new Error("initializeWasm() must be awaited first!");
6690                 }
6691                 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
6692                 return nativeResponseValue;
6693         }
6694         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6695         export function Ping_set_ponglen(this_ptr: number, val: number): void {
6696                 if(!isWasmInitialized) {
6697                         throw new Error("initializeWasm() must be awaited first!");
6698                 }
6699                 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
6700                 // debug statements here
6701         }
6702         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
6703         export function Ping_get_byteslen(this_ptr: number): number {
6704                 if(!isWasmInitialized) {
6705                         throw new Error("initializeWasm() must be awaited first!");
6706                 }
6707                 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
6708                 return nativeResponseValue;
6709         }
6710         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6711         export function Ping_set_byteslen(this_ptr: number, val: number): void {
6712                 if(!isWasmInitialized) {
6713                         throw new Error("initializeWasm() must be awaited first!");
6714                 }
6715                 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
6716                 // debug statements here
6717         }
6718         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
6719         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
6720                 if(!isWasmInitialized) {
6721                         throw new Error("initializeWasm() must be awaited first!");
6722                 }
6723                 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
6724                 return nativeResponseValue;
6725         }
6726         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
6727         export function Ping_clone(orig: number): number {
6728                 if(!isWasmInitialized) {
6729                         throw new Error("initializeWasm() must be awaited first!");
6730                 }
6731                 const nativeResponseValue = wasm.Ping_clone(orig);
6732                 return nativeResponseValue;
6733         }
6734         // void Pong_free(struct LDKPong this_obj);
6735         export function Pong_free(this_obj: number): void {
6736                 if(!isWasmInitialized) {
6737                         throw new Error("initializeWasm() must be awaited first!");
6738                 }
6739                 const nativeResponseValue = wasm.Pong_free(this_obj);
6740                 // debug statements here
6741         }
6742         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
6743         export function Pong_get_byteslen(this_ptr: number): number {
6744                 if(!isWasmInitialized) {
6745                         throw new Error("initializeWasm() must be awaited first!");
6746                 }
6747                 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
6748                 return nativeResponseValue;
6749         }
6750         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
6751         export function Pong_set_byteslen(this_ptr: number, val: number): void {
6752                 if(!isWasmInitialized) {
6753                         throw new Error("initializeWasm() must be awaited first!");
6754                 }
6755                 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
6756                 // debug statements here
6757         }
6758         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
6759         export function Pong_new(byteslen_arg: number): number {
6760                 if(!isWasmInitialized) {
6761                         throw new Error("initializeWasm() must be awaited first!");
6762                 }
6763                 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
6764                 return nativeResponseValue;
6765         }
6766         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
6767         export function Pong_clone(orig: number): number {
6768                 if(!isWasmInitialized) {
6769                         throw new Error("initializeWasm() must be awaited first!");
6770                 }
6771                 const nativeResponseValue = wasm.Pong_clone(orig);
6772                 return nativeResponseValue;
6773         }
6774         // void OpenChannel_free(struct LDKOpenChannel this_obj);
6775         export function OpenChannel_free(this_obj: number): void {
6776                 if(!isWasmInitialized) {
6777                         throw new Error("initializeWasm() must be awaited first!");
6778                 }
6779                 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
6780                 // debug statements here
6781         }
6782         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
6783         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
6784                 if(!isWasmInitialized) {
6785                         throw new Error("initializeWasm() must be awaited first!");
6786                 }
6787                 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
6788                 return decodeArray(nativeResponseValue);
6789         }
6790         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6791         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6792                 if(!isWasmInitialized) {
6793                         throw new Error("initializeWasm() must be awaited first!");
6794                 }
6795                 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
6796                 // debug statements here
6797         }
6798         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
6799         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
6800                 if(!isWasmInitialized) {
6801                         throw new Error("initializeWasm() must be awaited first!");
6802                 }
6803                 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
6804                 return decodeArray(nativeResponseValue);
6805         }
6806         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6807         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
6808                 if(!isWasmInitialized) {
6809                         throw new Error("initializeWasm() must be awaited first!");
6810                 }
6811                 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
6812                 // debug statements here
6813         }
6814         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6815         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
6816                 if(!isWasmInitialized) {
6817                         throw new Error("initializeWasm() must be awaited first!");
6818                 }
6819                 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
6820                 return nativeResponseValue;
6821         }
6822         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6823         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
6824                 if(!isWasmInitialized) {
6825                         throw new Error("initializeWasm() must be awaited first!");
6826                 }
6827                 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
6828                 // debug statements here
6829         }
6830         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6831         export function OpenChannel_get_push_msat(this_ptr: number): number {
6832                 if(!isWasmInitialized) {
6833                         throw new Error("initializeWasm() must be awaited first!");
6834                 }
6835                 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
6836                 return nativeResponseValue;
6837         }
6838         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6839         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
6840                 if(!isWasmInitialized) {
6841                         throw new Error("initializeWasm() must be awaited first!");
6842                 }
6843                 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
6844                 // debug statements here
6845         }
6846         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6847         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
6848                 if(!isWasmInitialized) {
6849                         throw new Error("initializeWasm() must be awaited first!");
6850                 }
6851                 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
6852                 return nativeResponseValue;
6853         }
6854         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6855         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
6856                 if(!isWasmInitialized) {
6857                         throw new Error("initializeWasm() must be awaited first!");
6858                 }
6859                 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
6860                 // debug statements here
6861         }
6862         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6863         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
6864                 if(!isWasmInitialized) {
6865                         throw new Error("initializeWasm() must be awaited first!");
6866                 }
6867                 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
6868                 return nativeResponseValue;
6869         }
6870         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6871         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
6872                 if(!isWasmInitialized) {
6873                         throw new Error("initializeWasm() must be awaited first!");
6874                 }
6875                 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
6876                 // debug statements here
6877         }
6878         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6879         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
6880                 if(!isWasmInitialized) {
6881                         throw new Error("initializeWasm() must be awaited first!");
6882                 }
6883                 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
6884                 return nativeResponseValue;
6885         }
6886         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6887         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
6888                 if(!isWasmInitialized) {
6889                         throw new Error("initializeWasm() must be awaited first!");
6890                 }
6891                 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
6892                 // debug statements here
6893         }
6894         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6895         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
6896                 if(!isWasmInitialized) {
6897                         throw new Error("initializeWasm() must be awaited first!");
6898                 }
6899                 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
6900                 return nativeResponseValue;
6901         }
6902         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6903         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
6904                 if(!isWasmInitialized) {
6905                         throw new Error("initializeWasm() must be awaited first!");
6906                 }
6907                 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
6908                 // debug statements here
6909         }
6910         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6911         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
6912                 if(!isWasmInitialized) {
6913                         throw new Error("initializeWasm() must be awaited first!");
6914                 }
6915                 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
6916                 return nativeResponseValue;
6917         }
6918         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
6919         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
6920                 if(!isWasmInitialized) {
6921                         throw new Error("initializeWasm() must be awaited first!");
6922                 }
6923                 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
6924                 // debug statements here
6925         }
6926         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6927         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
6928                 if(!isWasmInitialized) {
6929                         throw new Error("initializeWasm() must be awaited first!");
6930                 }
6931                 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
6932                 return nativeResponseValue;
6933         }
6934         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
6935         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
6936                 if(!isWasmInitialized) {
6937                         throw new Error("initializeWasm() must be awaited first!");
6938                 }
6939                 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
6940                 // debug statements here
6941         }
6942         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6943         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
6944                 if(!isWasmInitialized) {
6945                         throw new Error("initializeWasm() must be awaited first!");
6946                 }
6947                 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
6948                 return nativeResponseValue;
6949         }
6950         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
6951         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
6952                 if(!isWasmInitialized) {
6953                         throw new Error("initializeWasm() must be awaited first!");
6954                 }
6955                 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
6956                 // debug statements here
6957         }
6958         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6959         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
6960                 if(!isWasmInitialized) {
6961                         throw new Error("initializeWasm() must be awaited first!");
6962                 }
6963                 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
6964                 return decodeArray(nativeResponseValue);
6965         }
6966         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6967         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
6968                 if(!isWasmInitialized) {
6969                         throw new Error("initializeWasm() must be awaited first!");
6970                 }
6971                 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
6972                 // debug statements here
6973         }
6974         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6975         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
6976                 if(!isWasmInitialized) {
6977                         throw new Error("initializeWasm() must be awaited first!");
6978                 }
6979                 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
6980                 return decodeArray(nativeResponseValue);
6981         }
6982         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6983         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
6984                 if(!isWasmInitialized) {
6985                         throw new Error("initializeWasm() must be awaited first!");
6986                 }
6987                 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
6988                 // debug statements here
6989         }
6990         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6991         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
6992                 if(!isWasmInitialized) {
6993                         throw new Error("initializeWasm() must be awaited first!");
6994                 }
6995                 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
6996                 return decodeArray(nativeResponseValue);
6997         }
6998         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6999         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
7000                 if(!isWasmInitialized) {
7001                         throw new Error("initializeWasm() must be awaited first!");
7002                 }
7003                 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
7004                 // debug statements here
7005         }
7006         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7007         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
7008                 if(!isWasmInitialized) {
7009                         throw new Error("initializeWasm() must be awaited first!");
7010                 }
7011                 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
7012                 return decodeArray(nativeResponseValue);
7013         }
7014         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7015         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
7016                 if(!isWasmInitialized) {
7017                         throw new Error("initializeWasm() must be awaited first!");
7018                 }
7019                 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
7020                 // debug statements here
7021         }
7022         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7023         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
7024                 if(!isWasmInitialized) {
7025                         throw new Error("initializeWasm() must be awaited first!");
7026                 }
7027                 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
7028                 return decodeArray(nativeResponseValue);
7029         }
7030         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7031         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7032                 if(!isWasmInitialized) {
7033                         throw new Error("initializeWasm() must be awaited first!");
7034                 }
7035                 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7036                 // debug statements here
7037         }
7038         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7039         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7040                 if(!isWasmInitialized) {
7041                         throw new Error("initializeWasm() must be awaited first!");
7042                 }
7043                 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
7044                 return decodeArray(nativeResponseValue);
7045         }
7046         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7047         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7048                 if(!isWasmInitialized) {
7049                         throw new Error("initializeWasm() must be awaited first!");
7050                 }
7051                 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7052                 // debug statements here
7053         }
7054         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7055         export function OpenChannel_get_channel_flags(this_ptr: number): number {
7056                 if(!isWasmInitialized) {
7057                         throw new Error("initializeWasm() must be awaited first!");
7058                 }
7059                 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
7060                 return nativeResponseValue;
7061         }
7062         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
7063         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
7064                 if(!isWasmInitialized) {
7065                         throw new Error("initializeWasm() must be awaited first!");
7066                 }
7067                 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
7068                 // debug statements here
7069         }
7070         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
7071         export function OpenChannel_clone(orig: number): number {
7072                 if(!isWasmInitialized) {
7073                         throw new Error("initializeWasm() must be awaited first!");
7074                 }
7075                 const nativeResponseValue = wasm.OpenChannel_clone(orig);
7076                 return nativeResponseValue;
7077         }
7078         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
7079         export function AcceptChannel_free(this_obj: number): void {
7080                 if(!isWasmInitialized) {
7081                         throw new Error("initializeWasm() must be awaited first!");
7082                 }
7083                 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
7084                 // debug statements here
7085         }
7086         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
7087         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
7088                 if(!isWasmInitialized) {
7089                         throw new Error("initializeWasm() must be awaited first!");
7090                 }
7091                 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
7092                 return decodeArray(nativeResponseValue);
7093         }
7094         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7095         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7096                 if(!isWasmInitialized) {
7097                         throw new Error("initializeWasm() must be awaited first!");
7098                 }
7099                 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
7100                 // debug statements here
7101         }
7102         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7103         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
7104                 if(!isWasmInitialized) {
7105                         throw new Error("initializeWasm() must be awaited first!");
7106                 }
7107                 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
7108                 return nativeResponseValue;
7109         }
7110         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7111         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
7112                 if(!isWasmInitialized) {
7113                         throw new Error("initializeWasm() must be awaited first!");
7114                 }
7115                 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
7116                 // debug statements here
7117         }
7118         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7119         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
7120                 if(!isWasmInitialized) {
7121                         throw new Error("initializeWasm() must be awaited first!");
7122                 }
7123                 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
7124                 return nativeResponseValue;
7125         }
7126         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7127         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7128                 if(!isWasmInitialized) {
7129                         throw new Error("initializeWasm() must be awaited first!");
7130                 }
7131                 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
7132                 // debug statements here
7133         }
7134         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7135         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
7136                 if(!isWasmInitialized) {
7137                         throw new Error("initializeWasm() must be awaited first!");
7138                 }
7139                 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
7140                 return nativeResponseValue;
7141         }
7142         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7143         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
7144                 if(!isWasmInitialized) {
7145                         throw new Error("initializeWasm() must be awaited first!");
7146                 }
7147                 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
7148                 // debug statements here
7149         }
7150         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7151         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
7152                 if(!isWasmInitialized) {
7153                         throw new Error("initializeWasm() must be awaited first!");
7154                 }
7155                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
7156                 return nativeResponseValue;
7157         }
7158         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7159         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
7160                 if(!isWasmInitialized) {
7161                         throw new Error("initializeWasm() must be awaited first!");
7162                 }
7163                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
7164                 // debug statements here
7165         }
7166         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7167         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
7168                 if(!isWasmInitialized) {
7169                         throw new Error("initializeWasm() must be awaited first!");
7170                 }
7171                 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
7172                 return nativeResponseValue;
7173         }
7174         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
7175         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
7176                 if(!isWasmInitialized) {
7177                         throw new Error("initializeWasm() must be awaited first!");
7178                 }
7179                 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
7180                 // debug statements here
7181         }
7182         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7183         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
7184                 if(!isWasmInitialized) {
7185                         throw new Error("initializeWasm() must be awaited first!");
7186                 }
7187                 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
7188                 return nativeResponseValue;
7189         }
7190         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7191         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
7192                 if(!isWasmInitialized) {
7193                         throw new Error("initializeWasm() must be awaited first!");
7194                 }
7195                 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
7196                 // debug statements here
7197         }
7198         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7199         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
7200                 if(!isWasmInitialized) {
7201                         throw new Error("initializeWasm() must be awaited first!");
7202                 }
7203                 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
7204                 return nativeResponseValue;
7205         }
7206         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7207         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
7208                 if(!isWasmInitialized) {
7209                         throw new Error("initializeWasm() must be awaited first!");
7210                 }
7211                 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
7212                 // debug statements here
7213         }
7214         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7215         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
7216                 if(!isWasmInitialized) {
7217                         throw new Error("initializeWasm() must be awaited first!");
7218                 }
7219                 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
7220                 return decodeArray(nativeResponseValue);
7221         }
7222         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7223         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
7224                 if(!isWasmInitialized) {
7225                         throw new Error("initializeWasm() must be awaited first!");
7226                 }
7227                 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
7228                 // debug statements here
7229         }
7230         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7231         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
7232                 if(!isWasmInitialized) {
7233                         throw new Error("initializeWasm() must be awaited first!");
7234                 }
7235                 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
7236                 return decodeArray(nativeResponseValue);
7237         }
7238         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7239         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
7240                 if(!isWasmInitialized) {
7241                         throw new Error("initializeWasm() must be awaited first!");
7242                 }
7243                 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
7244                 // debug statements here
7245         }
7246         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7247         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
7248                 if(!isWasmInitialized) {
7249                         throw new Error("initializeWasm() must be awaited first!");
7250                 }
7251                 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
7252                 return decodeArray(nativeResponseValue);
7253         }
7254         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7255         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
7256                 if(!isWasmInitialized) {
7257                         throw new Error("initializeWasm() must be awaited first!");
7258                 }
7259                 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
7260                 // debug statements here
7261         }
7262         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7263         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
7264                 if(!isWasmInitialized) {
7265                         throw new Error("initializeWasm() must be awaited first!");
7266                 }
7267                 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
7268                 return decodeArray(nativeResponseValue);
7269         }
7270         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7271         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
7272                 if(!isWasmInitialized) {
7273                         throw new Error("initializeWasm() must be awaited first!");
7274                 }
7275                 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
7276                 // debug statements here
7277         }
7278         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7279         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
7280                 if(!isWasmInitialized) {
7281                         throw new Error("initializeWasm() must be awaited first!");
7282                 }
7283                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
7284                 return decodeArray(nativeResponseValue);
7285         }
7286         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7287         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7288                 if(!isWasmInitialized) {
7289                         throw new Error("initializeWasm() must be awaited first!");
7290                 }
7291                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7292                 // debug statements here
7293         }
7294         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7295         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7296                 if(!isWasmInitialized) {
7297                         throw new Error("initializeWasm() must be awaited first!");
7298                 }
7299                 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
7300                 return decodeArray(nativeResponseValue);
7301         }
7302         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7303         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7304                 if(!isWasmInitialized) {
7305                         throw new Error("initializeWasm() must be awaited first!");
7306                 }
7307                 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7308                 // debug statements here
7309         }
7310         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
7311         export function AcceptChannel_clone(orig: number): number {
7312                 if(!isWasmInitialized) {
7313                         throw new Error("initializeWasm() must be awaited first!");
7314                 }
7315                 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
7316                 return nativeResponseValue;
7317         }
7318         // void FundingCreated_free(struct LDKFundingCreated this_obj);
7319         export function FundingCreated_free(this_obj: number): void {
7320                 if(!isWasmInitialized) {
7321                         throw new Error("initializeWasm() must be awaited first!");
7322                 }
7323                 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
7324                 // debug statements here
7325         }
7326         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7327         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
7328                 if(!isWasmInitialized) {
7329                         throw new Error("initializeWasm() must be awaited first!");
7330                 }
7331                 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
7332                 return decodeArray(nativeResponseValue);
7333         }
7334         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7335         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7336                 if(!isWasmInitialized) {
7337                         throw new Error("initializeWasm() must be awaited first!");
7338                 }
7339                 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
7340                 // debug statements here
7341         }
7342         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7343         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
7344                 if(!isWasmInitialized) {
7345                         throw new Error("initializeWasm() must be awaited first!");
7346                 }
7347                 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
7348                 return decodeArray(nativeResponseValue);
7349         }
7350         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7351         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
7352                 if(!isWasmInitialized) {
7353                         throw new Error("initializeWasm() must be awaited first!");
7354                 }
7355                 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
7356                 // debug statements here
7357         }
7358         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7359         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
7360                 if(!isWasmInitialized) {
7361                         throw new Error("initializeWasm() must be awaited first!");
7362                 }
7363                 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
7364                 return nativeResponseValue;
7365         }
7366         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
7367         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
7368                 if(!isWasmInitialized) {
7369                         throw new Error("initializeWasm() must be awaited first!");
7370                 }
7371                 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
7372                 // debug statements here
7373         }
7374         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7375         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
7376                 if(!isWasmInitialized) {
7377                         throw new Error("initializeWasm() must be awaited first!");
7378                 }
7379                 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
7380                 return decodeArray(nativeResponseValue);
7381         }
7382         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
7383         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
7384                 if(!isWasmInitialized) {
7385                         throw new Error("initializeWasm() must be awaited first!");
7386                 }
7387                 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
7388                 // debug statements here
7389         }
7390         // 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);
7391         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
7392                 if(!isWasmInitialized) {
7393                         throw new Error("initializeWasm() must be awaited first!");
7394                 }
7395                 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
7396                 return nativeResponseValue;
7397         }
7398         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
7399         export function FundingCreated_clone(orig: number): number {
7400                 if(!isWasmInitialized) {
7401                         throw new Error("initializeWasm() must be awaited first!");
7402                 }
7403                 const nativeResponseValue = wasm.FundingCreated_clone(orig);
7404                 return nativeResponseValue;
7405         }
7406         // void FundingSigned_free(struct LDKFundingSigned this_obj);
7407         export function FundingSigned_free(this_obj: number): void {
7408                 if(!isWasmInitialized) {
7409                         throw new Error("initializeWasm() must be awaited first!");
7410                 }
7411                 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
7412                 // debug statements here
7413         }
7414         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
7415         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
7416                 if(!isWasmInitialized) {
7417                         throw new Error("initializeWasm() must be awaited first!");
7418                 }
7419                 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
7420                 return decodeArray(nativeResponseValue);
7421         }
7422         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7423         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7424                 if(!isWasmInitialized) {
7425                         throw new Error("initializeWasm() must be awaited first!");
7426                 }
7427                 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
7428                 // debug statements here
7429         }
7430         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
7431         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
7432                 if(!isWasmInitialized) {
7433                         throw new Error("initializeWasm() must be awaited first!");
7434                 }
7435                 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
7436                 return decodeArray(nativeResponseValue);
7437         }
7438         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7439         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7440                 if(!isWasmInitialized) {
7441                         throw new Error("initializeWasm() must be awaited first!");
7442                 }
7443                 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
7444                 // debug statements here
7445         }
7446         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
7447         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
7448                 if(!isWasmInitialized) {
7449                         throw new Error("initializeWasm() must be awaited first!");
7450                 }
7451                 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
7452                 return nativeResponseValue;
7453         }
7454         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
7455         export function FundingSigned_clone(orig: number): number {
7456                 if(!isWasmInitialized) {
7457                         throw new Error("initializeWasm() must be awaited first!");
7458                 }
7459                 const nativeResponseValue = wasm.FundingSigned_clone(orig);
7460                 return nativeResponseValue;
7461         }
7462         // void FundingLocked_free(struct LDKFundingLocked this_obj);
7463         export function FundingLocked_free(this_obj: number): void {
7464                 if(!isWasmInitialized) {
7465                         throw new Error("initializeWasm() must be awaited first!");
7466                 }
7467                 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
7468                 // debug statements here
7469         }
7470         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
7471         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
7472                 if(!isWasmInitialized) {
7473                         throw new Error("initializeWasm() must be awaited first!");
7474                 }
7475                 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
7476                 return decodeArray(nativeResponseValue);
7477         }
7478         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7479         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
7480                 if(!isWasmInitialized) {
7481                         throw new Error("initializeWasm() must be awaited first!");
7482                 }
7483                 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
7484                 // debug statements here
7485         }
7486         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
7487         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
7488                 if(!isWasmInitialized) {
7489                         throw new Error("initializeWasm() must be awaited first!");
7490                 }
7491                 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
7492                 return decodeArray(nativeResponseValue);
7493         }
7494         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7495         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7496                 if(!isWasmInitialized) {
7497                         throw new Error("initializeWasm() must be awaited first!");
7498                 }
7499                 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
7500                 // debug statements here
7501         }
7502         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
7503         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
7504                 if(!isWasmInitialized) {
7505                         throw new Error("initializeWasm() must be awaited first!");
7506                 }
7507                 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
7508                 return nativeResponseValue;
7509         }
7510         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
7511         export function FundingLocked_clone(orig: number): number {
7512                 if(!isWasmInitialized) {
7513                         throw new Error("initializeWasm() must be awaited first!");
7514                 }
7515                 const nativeResponseValue = wasm.FundingLocked_clone(orig);
7516                 return nativeResponseValue;
7517         }
7518         // void Shutdown_free(struct LDKShutdown this_obj);
7519         export function Shutdown_free(this_obj: number): void {
7520                 if(!isWasmInitialized) {
7521                         throw new Error("initializeWasm() must be awaited first!");
7522                 }
7523                 const nativeResponseValue = wasm.Shutdown_free(this_obj);
7524                 // debug statements here
7525         }
7526         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
7527         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
7528                 if(!isWasmInitialized) {
7529                         throw new Error("initializeWasm() must be awaited first!");
7530                 }
7531                 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
7532                 return decodeArray(nativeResponseValue);
7533         }
7534         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7535         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
7536                 if(!isWasmInitialized) {
7537                         throw new Error("initializeWasm() must be awaited first!");
7538                 }
7539                 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
7540                 // debug statements here
7541         }
7542         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
7543         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
7544                 if(!isWasmInitialized) {
7545                         throw new Error("initializeWasm() must be awaited first!");
7546                 }
7547                 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
7548                 return decodeArray(nativeResponseValue);
7549         }
7550         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7551         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
7552                 if(!isWasmInitialized) {
7553                         throw new Error("initializeWasm() must be awaited first!");
7554                 }
7555                 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
7556                 // debug statements here
7557         }
7558         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
7559         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
7560                 if(!isWasmInitialized) {
7561                         throw new Error("initializeWasm() must be awaited first!");
7562                 }
7563                 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
7564                 return nativeResponseValue;
7565         }
7566         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
7567         export function Shutdown_clone(orig: number): number {
7568                 if(!isWasmInitialized) {
7569                         throw new Error("initializeWasm() must be awaited first!");
7570                 }
7571                 const nativeResponseValue = wasm.Shutdown_clone(orig);
7572                 return nativeResponseValue;
7573         }
7574         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
7575         export function ClosingSigned_free(this_obj: number): void {
7576                 if(!isWasmInitialized) {
7577                         throw new Error("initializeWasm() must be awaited first!");
7578                 }
7579                 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
7580                 // debug statements here
7581         }
7582         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
7583         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
7584                 if(!isWasmInitialized) {
7585                         throw new Error("initializeWasm() must be awaited first!");
7586                 }
7587                 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
7588                 return decodeArray(nativeResponseValue);
7589         }
7590         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7591         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7592                 if(!isWasmInitialized) {
7593                         throw new Error("initializeWasm() must be awaited first!");
7594                 }
7595                 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
7596                 // debug statements here
7597         }
7598         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
7599         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
7600                 if(!isWasmInitialized) {
7601                         throw new Error("initializeWasm() must be awaited first!");
7602                 }
7603                 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
7604                 return nativeResponseValue;
7605         }
7606         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
7607         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
7608                 if(!isWasmInitialized) {
7609                         throw new Error("initializeWasm() must be awaited first!");
7610                 }
7611                 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
7612                 // debug statements here
7613         }
7614         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
7615         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
7616                 if(!isWasmInitialized) {
7617                         throw new Error("initializeWasm() must be awaited first!");
7618                 }
7619                 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
7620                 return decodeArray(nativeResponseValue);
7621         }
7622         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7623         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7624                 if(!isWasmInitialized) {
7625                         throw new Error("initializeWasm() must be awaited first!");
7626                 }
7627                 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
7628                 // debug statements here
7629         }
7630         // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
7631         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
7632                 if(!isWasmInitialized) {
7633                         throw new Error("initializeWasm() must be awaited first!");
7634                 }
7635                 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
7636                 return nativeResponseValue;
7637         }
7638         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
7639         export function ClosingSigned_clone(orig: number): number {
7640                 if(!isWasmInitialized) {
7641                         throw new Error("initializeWasm() must be awaited first!");
7642                 }
7643                 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
7644                 return nativeResponseValue;
7645         }
7646         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
7647         export function UpdateAddHTLC_free(this_obj: number): void {
7648                 if(!isWasmInitialized) {
7649                         throw new Error("initializeWasm() must be awaited first!");
7650                 }
7651                 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
7652                 // debug statements here
7653         }
7654         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7655         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
7656                 if(!isWasmInitialized) {
7657                         throw new Error("initializeWasm() must be awaited first!");
7658                 }
7659                 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
7660                 return decodeArray(nativeResponseValue);
7661         }
7662         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7663         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7664                 if(!isWasmInitialized) {
7665                         throw new Error("initializeWasm() must be awaited first!");
7666                 }
7667                 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
7668                 // debug statements here
7669         }
7670         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7671         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
7672                 if(!isWasmInitialized) {
7673                         throw new Error("initializeWasm() must be awaited first!");
7674                 }
7675                 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
7676                 return nativeResponseValue;
7677         }
7678         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7679         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
7680                 if(!isWasmInitialized) {
7681                         throw new Error("initializeWasm() must be awaited first!");
7682                 }
7683                 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
7684                 // debug statements here
7685         }
7686         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7687         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
7688                 if(!isWasmInitialized) {
7689                         throw new Error("initializeWasm() must be awaited first!");
7690                 }
7691                 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
7692                 return nativeResponseValue;
7693         }
7694         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7695         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
7696                 if(!isWasmInitialized) {
7697                         throw new Error("initializeWasm() must be awaited first!");
7698                 }
7699                 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
7700                 // debug statements here
7701         }
7702         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7703         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
7704                 if(!isWasmInitialized) {
7705                         throw new Error("initializeWasm() must be awaited first!");
7706                 }
7707                 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
7708                 return decodeArray(nativeResponseValue);
7709         }
7710         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7711         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
7712                 if(!isWasmInitialized) {
7713                         throw new Error("initializeWasm() must be awaited first!");
7714                 }
7715                 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
7716                 // debug statements here
7717         }
7718         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7719         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
7720                 if(!isWasmInitialized) {
7721                         throw new Error("initializeWasm() must be awaited first!");
7722                 }
7723                 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
7724                 return nativeResponseValue;
7725         }
7726         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
7727         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
7728                 if(!isWasmInitialized) {
7729                         throw new Error("initializeWasm() must be awaited first!");
7730                 }
7731                 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
7732                 // debug statements here
7733         }
7734         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
7735         export function UpdateAddHTLC_clone(orig: number): number {
7736                 if(!isWasmInitialized) {
7737                         throw new Error("initializeWasm() must be awaited first!");
7738                 }
7739                 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
7740                 return nativeResponseValue;
7741         }
7742         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
7743         export function UpdateFulfillHTLC_free(this_obj: number): void {
7744                 if(!isWasmInitialized) {
7745                         throw new Error("initializeWasm() must be awaited first!");
7746                 }
7747                 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
7748                 // debug statements here
7749         }
7750         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
7751         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
7752                 if(!isWasmInitialized) {
7753                         throw new Error("initializeWasm() must be awaited first!");
7754                 }
7755                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
7756                 return decodeArray(nativeResponseValue);
7757         }
7758         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7759         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7760                 if(!isWasmInitialized) {
7761                         throw new Error("initializeWasm() must be awaited first!");
7762                 }
7763                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
7764                 // debug statements here
7765         }
7766         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
7767         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
7768                 if(!isWasmInitialized) {
7769                         throw new Error("initializeWasm() must be awaited first!");
7770                 }
7771                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
7772                 return nativeResponseValue;
7773         }
7774         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
7775         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
7776                 if(!isWasmInitialized) {
7777                         throw new Error("initializeWasm() must be awaited first!");
7778                 }
7779                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
7780                 // debug statements here
7781         }
7782         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
7783         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
7784                 if(!isWasmInitialized) {
7785                         throw new Error("initializeWasm() must be awaited first!");
7786                 }
7787                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
7788                 return decodeArray(nativeResponseValue);
7789         }
7790         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7791         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
7792                 if(!isWasmInitialized) {
7793                         throw new Error("initializeWasm() must be awaited first!");
7794                 }
7795                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
7796                 // debug statements here
7797         }
7798         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
7799         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
7800                 if(!isWasmInitialized) {
7801                         throw new Error("initializeWasm() must be awaited first!");
7802                 }
7803                 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
7804                 return nativeResponseValue;
7805         }
7806         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
7807         export function UpdateFulfillHTLC_clone(orig: number): number {
7808                 if(!isWasmInitialized) {
7809                         throw new Error("initializeWasm() must be awaited first!");
7810                 }
7811                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
7812                 return nativeResponseValue;
7813         }
7814         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
7815         export function UpdateFailHTLC_free(this_obj: number): void {
7816                 if(!isWasmInitialized) {
7817                         throw new Error("initializeWasm() must be awaited first!");
7818                 }
7819                 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
7820                 // debug statements here
7821         }
7822         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
7823         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
7824                 if(!isWasmInitialized) {
7825                         throw new Error("initializeWasm() must be awaited first!");
7826                 }
7827                 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
7828                 return decodeArray(nativeResponseValue);
7829         }
7830         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7831         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7832                 if(!isWasmInitialized) {
7833                         throw new Error("initializeWasm() must be awaited first!");
7834                 }
7835                 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
7836                 // debug statements here
7837         }
7838         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
7839         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
7840                 if(!isWasmInitialized) {
7841                         throw new Error("initializeWasm() must be awaited first!");
7842                 }
7843                 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
7844                 return nativeResponseValue;
7845         }
7846         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
7847         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
7848                 if(!isWasmInitialized) {
7849                         throw new Error("initializeWasm() must be awaited first!");
7850                 }
7851                 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
7852                 // debug statements here
7853         }
7854         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
7855         export function UpdateFailHTLC_clone(orig: number): number {
7856                 if(!isWasmInitialized) {
7857                         throw new Error("initializeWasm() must be awaited first!");
7858                 }
7859                 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
7860                 return nativeResponseValue;
7861         }
7862         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
7863         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
7864                 if(!isWasmInitialized) {
7865                         throw new Error("initializeWasm() must be awaited first!");
7866                 }
7867                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
7868                 // debug statements here
7869         }
7870         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
7871         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
7872                 if(!isWasmInitialized) {
7873                         throw new Error("initializeWasm() must be awaited first!");
7874                 }
7875                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
7876                 return decodeArray(nativeResponseValue);
7877         }
7878         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7879         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7880                 if(!isWasmInitialized) {
7881                         throw new Error("initializeWasm() must be awaited first!");
7882                 }
7883                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
7884                 // debug statements here
7885         }
7886         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
7887         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
7888                 if(!isWasmInitialized) {
7889                         throw new Error("initializeWasm() must be awaited first!");
7890                 }
7891                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
7892                 return nativeResponseValue;
7893         }
7894         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
7895         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
7896                 if(!isWasmInitialized) {
7897                         throw new Error("initializeWasm() must be awaited first!");
7898                 }
7899                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
7900                 // debug statements here
7901         }
7902         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
7903         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
7904                 if(!isWasmInitialized) {
7905                         throw new Error("initializeWasm() must be awaited first!");
7906                 }
7907                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
7908                 return nativeResponseValue;
7909         }
7910         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
7911         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
7912                 if(!isWasmInitialized) {
7913                         throw new Error("initializeWasm() must be awaited first!");
7914                 }
7915                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
7916                 // debug statements here
7917         }
7918         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
7919         export function UpdateFailMalformedHTLC_clone(orig: number): number {
7920                 if(!isWasmInitialized) {
7921                         throw new Error("initializeWasm() must be awaited first!");
7922                 }
7923                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
7924                 return nativeResponseValue;
7925         }
7926         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
7927         export function CommitmentSigned_free(this_obj: number): void {
7928                 if(!isWasmInitialized) {
7929                         throw new Error("initializeWasm() must be awaited first!");
7930                 }
7931                 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
7932                 // debug statements here
7933         }
7934         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
7935         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
7936                 if(!isWasmInitialized) {
7937                         throw new Error("initializeWasm() must be awaited first!");
7938                 }
7939                 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
7940                 return decodeArray(nativeResponseValue);
7941         }
7942         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7943         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7944                 if(!isWasmInitialized) {
7945                         throw new Error("initializeWasm() must be awaited first!");
7946                 }
7947                 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
7948                 // debug statements here
7949         }
7950         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
7951         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
7952                 if(!isWasmInitialized) {
7953                         throw new Error("initializeWasm() must be awaited first!");
7954                 }
7955                 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
7956                 return decodeArray(nativeResponseValue);
7957         }
7958         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7959         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7960                 if(!isWasmInitialized) {
7961                         throw new Error("initializeWasm() must be awaited first!");
7962                 }
7963                 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
7964                 // debug statements here
7965         }
7966         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
7967         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
7968                 if(!isWasmInitialized) {
7969                         throw new Error("initializeWasm() must be awaited first!");
7970                 }
7971                 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
7972                 // debug statements here
7973         }
7974         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
7975         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
7976                 if(!isWasmInitialized) {
7977                         throw new Error("initializeWasm() must be awaited first!");
7978                 }
7979                 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
7980                 return nativeResponseValue;
7981         }
7982         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
7983         export function CommitmentSigned_clone(orig: number): number {
7984                 if(!isWasmInitialized) {
7985                         throw new Error("initializeWasm() must be awaited first!");
7986                 }
7987                 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
7988                 return nativeResponseValue;
7989         }
7990         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
7991         export function RevokeAndACK_free(this_obj: number): void {
7992                 if(!isWasmInitialized) {
7993                         throw new Error("initializeWasm() must be awaited first!");
7994                 }
7995                 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
7996                 // debug statements here
7997         }
7998         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
7999         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
8000                 if(!isWasmInitialized) {
8001                         throw new Error("initializeWasm() must be awaited first!");
8002                 }
8003                 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
8004                 return decodeArray(nativeResponseValue);
8005         }
8006         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8007         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
8008                 if(!isWasmInitialized) {
8009                         throw new Error("initializeWasm() must be awaited first!");
8010                 }
8011                 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
8012                 // debug statements here
8013         }
8014         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
8015         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
8016                 if(!isWasmInitialized) {
8017                         throw new Error("initializeWasm() must be awaited first!");
8018                 }
8019                 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
8020                 return decodeArray(nativeResponseValue);
8021         }
8022         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8023         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
8024                 if(!isWasmInitialized) {
8025                         throw new Error("initializeWasm() must be awaited first!");
8026                 }
8027                 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
8028                 // debug statements here
8029         }
8030         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
8031         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
8032                 if(!isWasmInitialized) {
8033                         throw new Error("initializeWasm() must be awaited first!");
8034                 }
8035                 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
8036                 return decodeArray(nativeResponseValue);
8037         }
8038         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8039         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8040                 if(!isWasmInitialized) {
8041                         throw new Error("initializeWasm() must be awaited first!");
8042                 }
8043                 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
8044                 // debug statements here
8045         }
8046         // 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);
8047         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
8048                 if(!isWasmInitialized) {
8049                         throw new Error("initializeWasm() must be awaited first!");
8050                 }
8051                 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
8052                 return nativeResponseValue;
8053         }
8054         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
8055         export function RevokeAndACK_clone(orig: number): number {
8056                 if(!isWasmInitialized) {
8057                         throw new Error("initializeWasm() must be awaited first!");
8058                 }
8059                 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
8060                 return nativeResponseValue;
8061         }
8062         // void UpdateFee_free(struct LDKUpdateFee this_obj);
8063         export function UpdateFee_free(this_obj: number): void {
8064                 if(!isWasmInitialized) {
8065                         throw new Error("initializeWasm() must be awaited first!");
8066                 }
8067                 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
8068                 // debug statements here
8069         }
8070         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
8071         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
8072                 if(!isWasmInitialized) {
8073                         throw new Error("initializeWasm() must be awaited first!");
8074                 }
8075                 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
8076                 return decodeArray(nativeResponseValue);
8077         }
8078         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8079         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
8080                 if(!isWasmInitialized) {
8081                         throw new Error("initializeWasm() must be awaited first!");
8082                 }
8083                 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
8084                 // debug statements here
8085         }
8086         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
8087         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
8088                 if(!isWasmInitialized) {
8089                         throw new Error("initializeWasm() must be awaited first!");
8090                 }
8091                 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
8092                 return nativeResponseValue;
8093         }
8094         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
8095         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
8096                 if(!isWasmInitialized) {
8097                         throw new Error("initializeWasm() must be awaited first!");
8098                 }
8099                 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
8100                 // debug statements here
8101         }
8102         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
8103         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
8104                 if(!isWasmInitialized) {
8105                         throw new Error("initializeWasm() must be awaited first!");
8106                 }
8107                 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
8108                 return nativeResponseValue;
8109         }
8110         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
8111         export function UpdateFee_clone(orig: number): number {
8112                 if(!isWasmInitialized) {
8113                         throw new Error("initializeWasm() must be awaited first!");
8114                 }
8115                 const nativeResponseValue = wasm.UpdateFee_clone(orig);
8116                 return nativeResponseValue;
8117         }
8118         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
8119         export function DataLossProtect_free(this_obj: number): void {
8120                 if(!isWasmInitialized) {
8121                         throw new Error("initializeWasm() must be awaited first!");
8122                 }
8123                 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
8124                 // debug statements here
8125         }
8126         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
8127         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
8128                 if(!isWasmInitialized) {
8129                         throw new Error("initializeWasm() must be awaited first!");
8130                 }
8131                 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
8132                 return decodeArray(nativeResponseValue);
8133         }
8134         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8135         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
8136                 if(!isWasmInitialized) {
8137                         throw new Error("initializeWasm() must be awaited first!");
8138                 }
8139                 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
8140                 // debug statements here
8141         }
8142         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
8143         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
8144                 if(!isWasmInitialized) {
8145                         throw new Error("initializeWasm() must be awaited first!");
8146                 }
8147                 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
8148                 return decodeArray(nativeResponseValue);
8149         }
8150         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8151         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8152                 if(!isWasmInitialized) {
8153                         throw new Error("initializeWasm() must be awaited first!");
8154                 }
8155                 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
8156                 // debug statements here
8157         }
8158         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
8159         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
8160                 if(!isWasmInitialized) {
8161                         throw new Error("initializeWasm() must be awaited first!");
8162                 }
8163                 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
8164                 return nativeResponseValue;
8165         }
8166         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
8167         export function DataLossProtect_clone(orig: number): number {
8168                 if(!isWasmInitialized) {
8169                         throw new Error("initializeWasm() must be awaited first!");
8170                 }
8171                 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
8172                 return nativeResponseValue;
8173         }
8174         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
8175         export function ChannelReestablish_free(this_obj: number): void {
8176                 if(!isWasmInitialized) {
8177                         throw new Error("initializeWasm() must be awaited first!");
8178                 }
8179                 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
8180                 // debug statements here
8181         }
8182         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
8183         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
8184                 if(!isWasmInitialized) {
8185                         throw new Error("initializeWasm() must be awaited first!");
8186                 }
8187                 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
8188                 return decodeArray(nativeResponseValue);
8189         }
8190         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8191         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
8192                 if(!isWasmInitialized) {
8193                         throw new Error("initializeWasm() must be awaited first!");
8194                 }
8195                 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
8196                 // debug statements here
8197         }
8198         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8199         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
8200                 if(!isWasmInitialized) {
8201                         throw new Error("initializeWasm() must be awaited first!");
8202                 }
8203                 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
8204                 return nativeResponseValue;
8205         }
8206         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8207         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
8208                 if(!isWasmInitialized) {
8209                         throw new Error("initializeWasm() must be awaited first!");
8210                 }
8211                 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
8212                 // debug statements here
8213         }
8214         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8215         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
8216                 if(!isWasmInitialized) {
8217                         throw new Error("initializeWasm() must be awaited first!");
8218                 }
8219                 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
8220                 return nativeResponseValue;
8221         }
8222         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8223         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
8224                 if(!isWasmInitialized) {
8225                         throw new Error("initializeWasm() must be awaited first!");
8226                 }
8227                 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
8228                 // debug statements here
8229         }
8230         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
8231         export function ChannelReestablish_clone(orig: number): number {
8232                 if(!isWasmInitialized) {
8233                         throw new Error("initializeWasm() must be awaited first!");
8234                 }
8235                 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
8236                 return nativeResponseValue;
8237         }
8238         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
8239         export function AnnouncementSignatures_free(this_obj: number): void {
8240                 if(!isWasmInitialized) {
8241                         throw new Error("initializeWasm() must be awaited first!");
8242                 }
8243                 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
8244                 // debug statements here
8245         }
8246         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
8247         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
8248                 if(!isWasmInitialized) {
8249                         throw new Error("initializeWasm() must be awaited first!");
8250                 }
8251                 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
8252                 return decodeArray(nativeResponseValue);
8253         }
8254         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8255         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
8256                 if(!isWasmInitialized) {
8257                         throw new Error("initializeWasm() must be awaited first!");
8258                 }
8259                 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
8260                 // debug statements here
8261         }
8262         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8263         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
8264                 if(!isWasmInitialized) {
8265                         throw new Error("initializeWasm() must be awaited first!");
8266                 }
8267                 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
8268                 return nativeResponseValue;
8269         }
8270         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
8271         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
8272                 if(!isWasmInitialized) {
8273                         throw new Error("initializeWasm() must be awaited first!");
8274                 }
8275                 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
8276                 // debug statements here
8277         }
8278         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8279         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
8280                 if(!isWasmInitialized) {
8281                         throw new Error("initializeWasm() must be awaited first!");
8282                 }
8283                 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
8284                 return decodeArray(nativeResponseValue);
8285         }
8286         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8287         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
8288                 if(!isWasmInitialized) {
8289                         throw new Error("initializeWasm() must be awaited first!");
8290                 }
8291                 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
8292                 // debug statements here
8293         }
8294         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8295         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
8296                 if(!isWasmInitialized) {
8297                         throw new Error("initializeWasm() must be awaited first!");
8298                 }
8299                 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
8300                 return decodeArray(nativeResponseValue);
8301         }
8302         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8303         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
8304                 if(!isWasmInitialized) {
8305                         throw new Error("initializeWasm() must be awaited first!");
8306                 }
8307                 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
8308                 // debug statements here
8309         }
8310         // 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);
8311         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
8312                 if(!isWasmInitialized) {
8313                         throw new Error("initializeWasm() must be awaited first!");
8314                 }
8315                 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
8316                 return nativeResponseValue;
8317         }
8318         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
8319         export function AnnouncementSignatures_clone(orig: number): number {
8320                 if(!isWasmInitialized) {
8321                         throw new Error("initializeWasm() must be awaited first!");
8322                 }
8323                 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
8324                 return nativeResponseValue;
8325         }
8326         // void NetAddress_free(struct LDKNetAddress this_ptr);
8327         export function NetAddress_free(this_ptr: number): void {
8328                 if(!isWasmInitialized) {
8329                         throw new Error("initializeWasm() must be awaited first!");
8330                 }
8331                 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
8332                 // debug statements here
8333         }
8334         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
8335         export function NetAddress_clone(orig: number): number {
8336                 if(!isWasmInitialized) {
8337                         throw new Error("initializeWasm() must be awaited first!");
8338                 }
8339                 const nativeResponseValue = wasm.NetAddress_clone(orig);
8340                 return nativeResponseValue;
8341         }
8342         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
8343         export function NetAddress_write(obj: number): Uint8Array {
8344                 if(!isWasmInitialized) {
8345                         throw new Error("initializeWasm() must be awaited first!");
8346                 }
8347                 const nativeResponseValue = wasm.NetAddress_write(obj);
8348                 return decodeArray(nativeResponseValue);
8349         }
8350         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
8351         export function Result_read(ser: Uint8Array): number {
8352                 if(!isWasmInitialized) {
8353                         throw new Error("initializeWasm() must be awaited first!");
8354                 }
8355                 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
8356                 return nativeResponseValue;
8357         }
8358         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
8359         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
8360                 if(!isWasmInitialized) {
8361                         throw new Error("initializeWasm() must be awaited first!");
8362                 }
8363                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
8364                 // debug statements here
8365         }
8366         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8367         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
8368                 if(!isWasmInitialized) {
8369                         throw new Error("initializeWasm() must be awaited first!");
8370                 }
8371                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
8372                 return nativeResponseValue;
8373         }
8374         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
8375         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
8376                 if(!isWasmInitialized) {
8377                         throw new Error("initializeWasm() must be awaited first!");
8378                 }
8379                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
8380                 // debug statements here
8381         }
8382         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8383         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
8384                 if(!isWasmInitialized) {
8385                         throw new Error("initializeWasm() must be awaited first!");
8386                 }
8387                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
8388                 return nativeResponseValue;
8389         }
8390         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
8391         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
8392                 if(!isWasmInitialized) {
8393                         throw new Error("initializeWasm() must be awaited first!");
8394                 }
8395                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
8396                 // debug statements here
8397         }
8398         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8399         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
8400                 if(!isWasmInitialized) {
8401                         throw new Error("initializeWasm() must be awaited first!");
8402                 }
8403                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
8404                 return decodeArray(nativeResponseValue);
8405         }
8406         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8407         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
8408                 if(!isWasmInitialized) {
8409                         throw new Error("initializeWasm() must be awaited first!");
8410                 }
8411                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
8412                 // debug statements here
8413         }
8414         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
8415         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
8416                 if(!isWasmInitialized) {
8417                         throw new Error("initializeWasm() must be awaited first!");
8418                 }
8419                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
8420                 return decodeArray(nativeResponseValue);
8421         }
8422         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
8423         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
8424                 if(!isWasmInitialized) {
8425                         throw new Error("initializeWasm() must be awaited first!");
8426                 }
8427                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
8428                 // debug statements here
8429         }
8430         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
8431         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
8432                 if(!isWasmInitialized) {
8433                         throw new Error("initializeWasm() must be awaited first!");
8434                 }
8435                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
8436                 return decodeArray(nativeResponseValue);
8437         }
8438         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8439         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
8440                 if(!isWasmInitialized) {
8441                         throw new Error("initializeWasm() must be awaited first!");
8442                 }
8443                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
8444                 // debug statements here
8445         }
8446         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
8447         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
8448                 if(!isWasmInitialized) {
8449                         throw new Error("initializeWasm() must be awaited first!");
8450                 }
8451                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
8452                 // debug statements here
8453         }
8454         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
8455         export function UnsignedNodeAnnouncement_clone(orig: number): number {
8456                 if(!isWasmInitialized) {
8457                         throw new Error("initializeWasm() must be awaited first!");
8458                 }
8459                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
8460                 return nativeResponseValue;
8461         }
8462         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
8463         export function NodeAnnouncement_free(this_obj: number): void {
8464                 if(!isWasmInitialized) {
8465                         throw new Error("initializeWasm() must be awaited first!");
8466                 }
8467                 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
8468                 // debug statements here
8469         }
8470         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8471         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
8472                 if(!isWasmInitialized) {
8473                         throw new Error("initializeWasm() must be awaited first!");
8474                 }
8475                 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
8476                 return decodeArray(nativeResponseValue);
8477         }
8478         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8479         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
8480                 if(!isWasmInitialized) {
8481                         throw new Error("initializeWasm() must be awaited first!");
8482                 }
8483                 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
8484                 // debug statements here
8485         }
8486         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8487         export function NodeAnnouncement_get_contents(this_ptr: number): number {
8488                 if(!isWasmInitialized) {
8489                         throw new Error("initializeWasm() must be awaited first!");
8490                 }
8491                 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
8492                 return nativeResponseValue;
8493         }
8494         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
8495         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
8496                 if(!isWasmInitialized) {
8497                         throw new Error("initializeWasm() must be awaited first!");
8498                 }
8499                 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
8500                 // debug statements here
8501         }
8502         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
8503         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
8504                 if(!isWasmInitialized) {
8505                         throw new Error("initializeWasm() must be awaited first!");
8506                 }
8507                 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
8508                 return nativeResponseValue;
8509         }
8510         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
8511         export function NodeAnnouncement_clone(orig: number): number {
8512                 if(!isWasmInitialized) {
8513                         throw new Error("initializeWasm() must be awaited first!");
8514                 }
8515                 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
8516                 return nativeResponseValue;
8517         }
8518         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
8519         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
8520                 if(!isWasmInitialized) {
8521                         throw new Error("initializeWasm() must be awaited first!");
8522                 }
8523                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
8524                 // debug statements here
8525         }
8526         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8527         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
8528                 if(!isWasmInitialized) {
8529                         throw new Error("initializeWasm() must be awaited first!");
8530                 }
8531                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
8532                 return nativeResponseValue;
8533         }
8534         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
8535         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
8536                 if(!isWasmInitialized) {
8537                         throw new Error("initializeWasm() must be awaited first!");
8538                 }
8539                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
8540                 // debug statements here
8541         }
8542         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
8543         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
8544                 if(!isWasmInitialized) {
8545                         throw new Error("initializeWasm() must be awaited first!");
8546                 }
8547                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
8548                 return decodeArray(nativeResponseValue);
8549         }
8550         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8551         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8552                 if(!isWasmInitialized) {
8553                         throw new Error("initializeWasm() must be awaited first!");
8554                 }
8555                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
8556                 // debug statements here
8557         }
8558         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8559         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
8560                 if(!isWasmInitialized) {
8561                         throw new Error("initializeWasm() must be awaited first!");
8562                 }
8563                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
8564                 return nativeResponseValue;
8565         }
8566         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
8567         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
8568                 if(!isWasmInitialized) {
8569                         throw new Error("initializeWasm() must be awaited first!");
8570                 }
8571                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
8572                 // debug statements here
8573         }
8574         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8575         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
8576                 if(!isWasmInitialized) {
8577                         throw new Error("initializeWasm() must be awaited first!");
8578                 }
8579                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
8580                 return decodeArray(nativeResponseValue);
8581         }
8582         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8583         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
8584                 if(!isWasmInitialized) {
8585                         throw new Error("initializeWasm() must be awaited first!");
8586                 }
8587                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
8588                 // debug statements here
8589         }
8590         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8591         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
8592                 if(!isWasmInitialized) {
8593                         throw new Error("initializeWasm() must be awaited first!");
8594                 }
8595                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
8596                 return decodeArray(nativeResponseValue);
8597         }
8598         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8599         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
8600                 if(!isWasmInitialized) {
8601                         throw new Error("initializeWasm() must be awaited first!");
8602                 }
8603                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
8604                 // debug statements here
8605         }
8606         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8607         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
8608                 if(!isWasmInitialized) {
8609                         throw new Error("initializeWasm() must be awaited first!");
8610                 }
8611                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
8612                 return decodeArray(nativeResponseValue);
8613         }
8614         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8615         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
8616                 if(!isWasmInitialized) {
8617                         throw new Error("initializeWasm() must be awaited first!");
8618                 }
8619                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
8620                 // debug statements here
8621         }
8622         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8623         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
8624                 if(!isWasmInitialized) {
8625                         throw new Error("initializeWasm() must be awaited first!");
8626                 }
8627                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
8628                 return decodeArray(nativeResponseValue);
8629         }
8630         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8631         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
8632                 if(!isWasmInitialized) {
8633                         throw new Error("initializeWasm() must be awaited first!");
8634                 }
8635                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
8636                 // debug statements here
8637         }
8638         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
8639         export function UnsignedChannelAnnouncement_clone(orig: number): number {
8640                 if(!isWasmInitialized) {
8641                         throw new Error("initializeWasm() must be awaited first!");
8642                 }
8643                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
8644                 return nativeResponseValue;
8645         }
8646         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
8647         export function ChannelAnnouncement_free(this_obj: number): void {
8648                 if(!isWasmInitialized) {
8649                         throw new Error("initializeWasm() must be awaited first!");
8650                 }
8651                 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
8652                 // debug statements here
8653         }
8654         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8655         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
8656                 if(!isWasmInitialized) {
8657                         throw new Error("initializeWasm() must be awaited first!");
8658                 }
8659                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
8660                 return decodeArray(nativeResponseValue);
8661         }
8662         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8663         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
8664                 if(!isWasmInitialized) {
8665                         throw new Error("initializeWasm() must be awaited first!");
8666                 }
8667                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
8668                 // debug statements here
8669         }
8670         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8671         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
8672                 if(!isWasmInitialized) {
8673                         throw new Error("initializeWasm() must be awaited first!");
8674                 }
8675                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
8676                 return decodeArray(nativeResponseValue);
8677         }
8678         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8679         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
8680                 if(!isWasmInitialized) {
8681                         throw new Error("initializeWasm() must be awaited first!");
8682                 }
8683                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
8684                 // debug statements here
8685         }
8686         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8687         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
8688                 if(!isWasmInitialized) {
8689                         throw new Error("initializeWasm() must be awaited first!");
8690                 }
8691                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
8692                 return decodeArray(nativeResponseValue);
8693         }
8694         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8695         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
8696                 if(!isWasmInitialized) {
8697                         throw new Error("initializeWasm() must be awaited first!");
8698                 }
8699                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
8700                 // debug statements here
8701         }
8702         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8703         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
8704                 if(!isWasmInitialized) {
8705                         throw new Error("initializeWasm() must be awaited first!");
8706                 }
8707                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
8708                 return decodeArray(nativeResponseValue);
8709         }
8710         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8711         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
8712                 if(!isWasmInitialized) {
8713                         throw new Error("initializeWasm() must be awaited first!");
8714                 }
8715                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
8716                 // debug statements here
8717         }
8718         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8719         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
8720                 if(!isWasmInitialized) {
8721                         throw new Error("initializeWasm() must be awaited first!");
8722                 }
8723                 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
8724                 return nativeResponseValue;
8725         }
8726         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
8727         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
8728                 if(!isWasmInitialized) {
8729                         throw new Error("initializeWasm() must be awaited first!");
8730                 }
8731                 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
8732                 // debug statements here
8733         }
8734         // 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);
8735         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 {
8736                 if(!isWasmInitialized) {
8737                         throw new Error("initializeWasm() must be awaited first!");
8738                 }
8739                 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);
8740                 return nativeResponseValue;
8741         }
8742         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
8743         export function ChannelAnnouncement_clone(orig: number): number {
8744                 if(!isWasmInitialized) {
8745                         throw new Error("initializeWasm() must be awaited first!");
8746                 }
8747                 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
8748                 return nativeResponseValue;
8749         }
8750         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
8751         export function UnsignedChannelUpdate_free(this_obj: number): void {
8752                 if(!isWasmInitialized) {
8753                         throw new Error("initializeWasm() must be awaited first!");
8754                 }
8755                 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
8756                 // debug statements here
8757         }
8758         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
8759         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
8760                 if(!isWasmInitialized) {
8761                         throw new Error("initializeWasm() must be awaited first!");
8762                 }
8763                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
8764                 return decodeArray(nativeResponseValue);
8765         }
8766         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8767         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8768                 if(!isWasmInitialized) {
8769                         throw new Error("initializeWasm() must be awaited first!");
8770                 }
8771                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
8772                 // debug statements here
8773         }
8774         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8775         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
8776                 if(!isWasmInitialized) {
8777                         throw new Error("initializeWasm() must be awaited first!");
8778                 }
8779                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
8780                 return nativeResponseValue;
8781         }
8782         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
8783         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
8784                 if(!isWasmInitialized) {
8785                         throw new Error("initializeWasm() must be awaited first!");
8786                 }
8787                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
8788                 // debug statements here
8789         }
8790         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8791         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
8792                 if(!isWasmInitialized) {
8793                         throw new Error("initializeWasm() must be awaited first!");
8794                 }
8795                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
8796                 return nativeResponseValue;
8797         }
8798         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8799         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
8800                 if(!isWasmInitialized) {
8801                         throw new Error("initializeWasm() must be awaited first!");
8802                 }
8803                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
8804                 // debug statements here
8805         }
8806         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8807         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
8808                 if(!isWasmInitialized) {
8809                         throw new Error("initializeWasm() must be awaited first!");
8810                 }
8811                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
8812                 return nativeResponseValue;
8813         }
8814         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
8815         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
8816                 if(!isWasmInitialized) {
8817                         throw new Error("initializeWasm() must be awaited first!");
8818                 }
8819                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
8820                 // debug statements here
8821         }
8822         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8823         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
8824                 if(!isWasmInitialized) {
8825                         throw new Error("initializeWasm() must be awaited first!");
8826                 }
8827                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
8828                 return nativeResponseValue;
8829         }
8830         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
8831         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
8832                 if(!isWasmInitialized) {
8833                         throw new Error("initializeWasm() must be awaited first!");
8834                 }
8835                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
8836                 // debug statements here
8837         }
8838         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8839         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
8840                 if(!isWasmInitialized) {
8841                         throw new Error("initializeWasm() must be awaited first!");
8842                 }
8843                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
8844                 return nativeResponseValue;
8845         }
8846         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
8847         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
8848                 if(!isWasmInitialized) {
8849                         throw new Error("initializeWasm() must be awaited first!");
8850                 }
8851                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
8852                 // debug statements here
8853         }
8854         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8855         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
8856                 if(!isWasmInitialized) {
8857                         throw new Error("initializeWasm() must be awaited first!");
8858                 }
8859                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
8860                 return nativeResponseValue;
8861         }
8862         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8863         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
8864                 if(!isWasmInitialized) {
8865                         throw new Error("initializeWasm() must be awaited first!");
8866                 }
8867                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
8868                 // debug statements here
8869         }
8870         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8871         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
8872                 if(!isWasmInitialized) {
8873                         throw new Error("initializeWasm() must be awaited first!");
8874                 }
8875                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
8876                 return nativeResponseValue;
8877         }
8878         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8879         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
8880                 if(!isWasmInitialized) {
8881                         throw new Error("initializeWasm() must be awaited first!");
8882                 }
8883                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
8884                 // debug statements here
8885         }
8886         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
8887         export function UnsignedChannelUpdate_clone(orig: number): number {
8888                 if(!isWasmInitialized) {
8889                         throw new Error("initializeWasm() must be awaited first!");
8890                 }
8891                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
8892                 return nativeResponseValue;
8893         }
8894         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
8895         export function ChannelUpdate_free(this_obj: number): void {
8896                 if(!isWasmInitialized) {
8897                         throw new Error("initializeWasm() must be awaited first!");
8898                 }
8899                 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
8900                 // debug statements here
8901         }
8902         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
8903         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
8904                 if(!isWasmInitialized) {
8905                         throw new Error("initializeWasm() must be awaited first!");
8906                 }
8907                 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
8908                 return decodeArray(nativeResponseValue);
8909         }
8910         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
8911         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
8912                 if(!isWasmInitialized) {
8913                         throw new Error("initializeWasm() must be awaited first!");
8914                 }
8915                 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
8916                 // debug statements here
8917         }
8918         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
8919         export function ChannelUpdate_get_contents(this_ptr: number): number {
8920                 if(!isWasmInitialized) {
8921                         throw new Error("initializeWasm() must be awaited first!");
8922                 }
8923                 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
8924                 return nativeResponseValue;
8925         }
8926         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
8927         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
8928                 if(!isWasmInitialized) {
8929                         throw new Error("initializeWasm() must be awaited first!");
8930                 }
8931                 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
8932                 // debug statements here
8933         }
8934         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
8935         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
8936                 if(!isWasmInitialized) {
8937                         throw new Error("initializeWasm() must be awaited first!");
8938                 }
8939                 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
8940                 return nativeResponseValue;
8941         }
8942         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
8943         export function ChannelUpdate_clone(orig: number): number {
8944                 if(!isWasmInitialized) {
8945                         throw new Error("initializeWasm() must be awaited first!");
8946                 }
8947                 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
8948                 return nativeResponseValue;
8949         }
8950         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
8951         export function QueryChannelRange_free(this_obj: number): void {
8952                 if(!isWasmInitialized) {
8953                         throw new Error("initializeWasm() must be awaited first!");
8954                 }
8955                 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
8956                 // debug statements here
8957         }
8958         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
8959         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
8960                 if(!isWasmInitialized) {
8961                         throw new Error("initializeWasm() must be awaited first!");
8962                 }
8963                 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
8964                 return decodeArray(nativeResponseValue);
8965         }
8966         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8967         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8968                 if(!isWasmInitialized) {
8969                         throw new Error("initializeWasm() must be awaited first!");
8970                 }
8971                 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
8972                 // debug statements here
8973         }
8974         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
8975         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
8976                 if(!isWasmInitialized) {
8977                         throw new Error("initializeWasm() must be awaited first!");
8978                 }
8979                 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
8980                 return nativeResponseValue;
8981         }
8982         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8983         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
8984                 if(!isWasmInitialized) {
8985                         throw new Error("initializeWasm() must be awaited first!");
8986                 }
8987                 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
8988                 // debug statements here
8989         }
8990         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
8991         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
8992                 if(!isWasmInitialized) {
8993                         throw new Error("initializeWasm() must be awaited first!");
8994                 }
8995                 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
8996                 return nativeResponseValue;
8997         }
8998         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8999         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
9000                 if(!isWasmInitialized) {
9001                         throw new Error("initializeWasm() must be awaited first!");
9002                 }
9003                 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
9004                 // debug statements here
9005         }
9006         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
9007         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
9008                 if(!isWasmInitialized) {
9009                         throw new Error("initializeWasm() must be awaited first!");
9010                 }
9011                 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
9012                 return nativeResponseValue;
9013         }
9014         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
9015         export function QueryChannelRange_clone(orig: number): number {
9016                 if(!isWasmInitialized) {
9017                         throw new Error("initializeWasm() must be awaited first!");
9018                 }
9019                 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
9020                 return nativeResponseValue;
9021         }
9022         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
9023         export function ReplyChannelRange_free(this_obj: number): void {
9024                 if(!isWasmInitialized) {
9025                         throw new Error("initializeWasm() must be awaited first!");
9026                 }
9027                 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
9028                 // debug statements here
9029         }
9030         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
9031         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
9032                 if(!isWasmInitialized) {
9033                         throw new Error("initializeWasm() must be awaited first!");
9034                 }
9035                 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
9036                 return decodeArray(nativeResponseValue);
9037         }
9038         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9039         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9040                 if(!isWasmInitialized) {
9041                         throw new Error("initializeWasm() must be awaited first!");
9042                 }
9043                 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
9044                 // debug statements here
9045         }
9046         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9047         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
9048                 if(!isWasmInitialized) {
9049                         throw new Error("initializeWasm() must be awaited first!");
9050                 }
9051                 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
9052                 return nativeResponseValue;
9053         }
9054         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9055         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
9056                 if(!isWasmInitialized) {
9057                         throw new Error("initializeWasm() must be awaited first!");
9058                 }
9059                 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
9060                 // debug statements here
9061         }
9062         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9063         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
9064                 if(!isWasmInitialized) {
9065                         throw new Error("initializeWasm() must be awaited first!");
9066                 }
9067                 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
9068                 return nativeResponseValue;
9069         }
9070         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9071         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
9072                 if(!isWasmInitialized) {
9073                         throw new Error("initializeWasm() must be awaited first!");
9074                 }
9075                 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
9076                 // debug statements here
9077         }
9078         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9079         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
9080                 if(!isWasmInitialized) {
9081                         throw new Error("initializeWasm() must be awaited first!");
9082                 }
9083                 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
9084                 return nativeResponseValue;
9085         }
9086         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
9087         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
9088                 if(!isWasmInitialized) {
9089                         throw new Error("initializeWasm() must be awaited first!");
9090                 }
9091                 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
9092                 // debug statements here
9093         }
9094         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9095         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
9096                 if(!isWasmInitialized) {
9097                         throw new Error("initializeWasm() must be awaited first!");
9098                 }
9099                 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
9100                 // debug statements here
9101         }
9102         // 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);
9103         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 {
9104                 if(!isWasmInitialized) {
9105                         throw new Error("initializeWasm() must be awaited first!");
9106                 }
9107                 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
9108                 return nativeResponseValue;
9109         }
9110         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
9111         export function ReplyChannelRange_clone(orig: number): number {
9112                 if(!isWasmInitialized) {
9113                         throw new Error("initializeWasm() must be awaited first!");
9114                 }
9115                 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
9116                 return nativeResponseValue;
9117         }
9118         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
9119         export function QueryShortChannelIds_free(this_obj: number): void {
9120                 if(!isWasmInitialized) {
9121                         throw new Error("initializeWasm() must be awaited first!");
9122                 }
9123                 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
9124                 // debug statements here
9125         }
9126         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
9127         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
9128                 if(!isWasmInitialized) {
9129                         throw new Error("initializeWasm() must be awaited first!");
9130                 }
9131                 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
9132                 return decodeArray(nativeResponseValue);
9133         }
9134         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9135         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9136                 if(!isWasmInitialized) {
9137                         throw new Error("initializeWasm() must be awaited first!");
9138                 }
9139                 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
9140                 // debug statements here
9141         }
9142         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9143         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
9144                 if(!isWasmInitialized) {
9145                         throw new Error("initializeWasm() must be awaited first!");
9146                 }
9147                 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
9148                 // debug statements here
9149         }
9150         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
9151         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
9152                 if(!isWasmInitialized) {
9153                         throw new Error("initializeWasm() must be awaited first!");
9154                 }
9155                 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
9156                 return nativeResponseValue;
9157         }
9158         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
9159         export function QueryShortChannelIds_clone(orig: number): number {
9160                 if(!isWasmInitialized) {
9161                         throw new Error("initializeWasm() must be awaited first!");
9162                 }
9163                 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
9164                 return nativeResponseValue;
9165         }
9166         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
9167         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
9168                 if(!isWasmInitialized) {
9169                         throw new Error("initializeWasm() must be awaited first!");
9170                 }
9171                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
9172                 // debug statements here
9173         }
9174         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
9175         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
9176                 if(!isWasmInitialized) {
9177                         throw new Error("initializeWasm() must be awaited first!");
9178                 }
9179                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
9180                 return decodeArray(nativeResponseValue);
9181         }
9182         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9183         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9184                 if(!isWasmInitialized) {
9185                         throw new Error("initializeWasm() must be awaited first!");
9186                 }
9187                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
9188                 // debug statements here
9189         }
9190         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
9191         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
9192                 if(!isWasmInitialized) {
9193                         throw new Error("initializeWasm() must be awaited first!");
9194                 }
9195                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
9196                 return nativeResponseValue;
9197         }
9198         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
9199         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
9200                 if(!isWasmInitialized) {
9201                         throw new Error("initializeWasm() must be awaited first!");
9202                 }
9203                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
9204                 // debug statements here
9205         }
9206         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
9207         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
9208                 if(!isWasmInitialized) {
9209                         throw new Error("initializeWasm() must be awaited first!");
9210                 }
9211                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
9212                 return nativeResponseValue;
9213         }
9214         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
9215         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
9216                 if(!isWasmInitialized) {
9217                         throw new Error("initializeWasm() must be awaited first!");
9218                 }
9219                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
9220                 return nativeResponseValue;
9221         }
9222         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
9223         export function GossipTimestampFilter_free(this_obj: number): void {
9224                 if(!isWasmInitialized) {
9225                         throw new Error("initializeWasm() must be awaited first!");
9226                 }
9227                 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
9228                 // debug statements here
9229         }
9230         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
9231         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
9232                 if(!isWasmInitialized) {
9233                         throw new Error("initializeWasm() must be awaited first!");
9234                 }
9235                 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
9236                 return decodeArray(nativeResponseValue);
9237         }
9238         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9239         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9240                 if(!isWasmInitialized) {
9241                         throw new Error("initializeWasm() must be awaited first!");
9242                 }
9243                 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
9244                 // debug statements here
9245         }
9246         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9247         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
9248                 if(!isWasmInitialized) {
9249                         throw new Error("initializeWasm() must be awaited first!");
9250                 }
9251                 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
9252                 return nativeResponseValue;
9253         }
9254         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9255         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
9256                 if(!isWasmInitialized) {
9257                         throw new Error("initializeWasm() must be awaited first!");
9258                 }
9259                 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
9260                 // debug statements here
9261         }
9262         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9263         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
9264                 if(!isWasmInitialized) {
9265                         throw new Error("initializeWasm() must be awaited first!");
9266                 }
9267                 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
9268                 return nativeResponseValue;
9269         }
9270         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9271         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
9272                 if(!isWasmInitialized) {
9273                         throw new Error("initializeWasm() must be awaited first!");
9274                 }
9275                 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
9276                 // debug statements here
9277         }
9278         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
9279         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
9280                 if(!isWasmInitialized) {
9281                         throw new Error("initializeWasm() must be awaited first!");
9282                 }
9283                 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
9284                 return nativeResponseValue;
9285         }
9286         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
9287         export function GossipTimestampFilter_clone(orig: number): number {
9288                 if(!isWasmInitialized) {
9289                         throw new Error("initializeWasm() must be awaited first!");
9290                 }
9291                 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
9292                 return nativeResponseValue;
9293         }
9294         // void ErrorAction_free(struct LDKErrorAction this_ptr);
9295         export function ErrorAction_free(this_ptr: number): void {
9296                 if(!isWasmInitialized) {
9297                         throw new Error("initializeWasm() must be awaited first!");
9298                 }
9299                 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
9300                 // debug statements here
9301         }
9302         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
9303         export function ErrorAction_clone(orig: number): number {
9304                 if(!isWasmInitialized) {
9305                         throw new Error("initializeWasm() must be awaited first!");
9306                 }
9307                 const nativeResponseValue = wasm.ErrorAction_clone(orig);
9308                 return nativeResponseValue;
9309         }
9310         // void LightningError_free(struct LDKLightningError this_obj);
9311         export function LightningError_free(this_obj: number): void {
9312                 if(!isWasmInitialized) {
9313                         throw new Error("initializeWasm() must be awaited first!");
9314                 }
9315                 const nativeResponseValue = wasm.LightningError_free(this_obj);
9316                 // debug statements here
9317         }
9318         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
9319         export function LightningError_get_err(this_ptr: number): String {
9320                 if(!isWasmInitialized) {
9321                         throw new Error("initializeWasm() must be awaited first!");
9322                 }
9323                 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
9324                 return nativeResponseValue;
9325         }
9326         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
9327         export function LightningError_set_err(this_ptr: number, val: Uint8Array): void {
9328                 if(!isWasmInitialized) {
9329                         throw new Error("initializeWasm() must be awaited first!");
9330                 }
9331                 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, encodeArray(val));
9332                 // debug statements here
9333         }
9334         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
9335         export function LightningError_get_action(this_ptr: number): number {
9336                 if(!isWasmInitialized) {
9337                         throw new Error("initializeWasm() must be awaited first!");
9338                 }
9339                 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
9340                 return nativeResponseValue;
9341         }
9342         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
9343         export function LightningError_set_action(this_ptr: number, val: number): void {
9344                 if(!isWasmInitialized) {
9345                         throw new Error("initializeWasm() must be awaited first!");
9346                 }
9347                 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
9348                 // debug statements here
9349         }
9350         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKCVec_u8Z err_arg, struct LDKErrorAction action_arg);
9351         export function LightningError_new(err_arg: Uint8Array, action_arg: number): number {
9352                 if(!isWasmInitialized) {
9353                         throw new Error("initializeWasm() must be awaited first!");
9354                 }
9355                 const nativeResponseValue = wasm.LightningError_new(encodeArray(err_arg), action_arg);
9356                 return nativeResponseValue;
9357         }
9358         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
9359         export function LightningError_clone(orig: number): number {
9360                 if(!isWasmInitialized) {
9361                         throw new Error("initializeWasm() must be awaited first!");
9362                 }
9363                 const nativeResponseValue = wasm.LightningError_clone(orig);
9364                 return nativeResponseValue;
9365         }
9366         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
9367         export function CommitmentUpdate_free(this_obj: number): void {
9368                 if(!isWasmInitialized) {
9369                         throw new Error("initializeWasm() must be awaited first!");
9370                 }
9371                 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
9372                 // debug statements here
9373         }
9374         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
9375         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
9376                 if(!isWasmInitialized) {
9377                         throw new Error("initializeWasm() must be awaited first!");
9378                 }
9379                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
9380                 // debug statements here
9381         }
9382         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
9383         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
9384                 if(!isWasmInitialized) {
9385                         throw new Error("initializeWasm() must be awaited first!");
9386                 }
9387                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
9388                 // debug statements here
9389         }
9390         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
9391         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
9392                 if(!isWasmInitialized) {
9393                         throw new Error("initializeWasm() must be awaited first!");
9394                 }
9395                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
9396                 // debug statements here
9397         }
9398         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
9399         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
9400                 if(!isWasmInitialized) {
9401                         throw new Error("initializeWasm() must be awaited first!");
9402                 }
9403                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
9404                 // debug statements here
9405         }
9406         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9407         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
9408                 if(!isWasmInitialized) {
9409                         throw new Error("initializeWasm() must be awaited first!");
9410                 }
9411                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
9412                 return nativeResponseValue;
9413         }
9414         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
9415         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
9416                 if(!isWasmInitialized) {
9417                         throw new Error("initializeWasm() must be awaited first!");
9418                 }
9419                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
9420                 // debug statements here
9421         }
9422         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9423         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
9424                 if(!isWasmInitialized) {
9425                         throw new Error("initializeWasm() must be awaited first!");
9426                 }
9427                 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
9428                 return nativeResponseValue;
9429         }
9430         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
9431         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
9432                 if(!isWasmInitialized) {
9433                         throw new Error("initializeWasm() must be awaited first!");
9434                 }
9435                 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
9436                 // debug statements here
9437         }
9438         // 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);
9439         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 {
9440                 if(!isWasmInitialized) {
9441                         throw new Error("initializeWasm() must be awaited first!");
9442                 }
9443                 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);
9444                 return nativeResponseValue;
9445         }
9446         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
9447         export function CommitmentUpdate_clone(orig: number): number {
9448                 if(!isWasmInitialized) {
9449                         throw new Error("initializeWasm() must be awaited first!");
9450                 }
9451                 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
9452                 return nativeResponseValue;
9453         }
9454         // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
9455         export function HTLCFailChannelUpdate_free(this_ptr: number): void {
9456                 if(!isWasmInitialized) {
9457                         throw new Error("initializeWasm() must be awaited first!");
9458                 }
9459                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
9460                 // debug statements here
9461         }
9462         // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
9463         export function HTLCFailChannelUpdate_clone(orig: number): number {
9464                 if(!isWasmInitialized) {
9465                         throw new Error("initializeWasm() must be awaited first!");
9466                 }
9467                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
9468                 return nativeResponseValue;
9469         }
9470         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
9471         export function ChannelMessageHandler_free(this_ptr: number): void {
9472                 if(!isWasmInitialized) {
9473                         throw new Error("initializeWasm() must be awaited first!");
9474                 }
9475                 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
9476                 // debug statements here
9477         }
9478         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
9479         export function RoutingMessageHandler_free(this_ptr: number): void {
9480                 if(!isWasmInitialized) {
9481                         throw new Error("initializeWasm() must be awaited first!");
9482                 }
9483                 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
9484                 // debug statements here
9485         }
9486         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
9487         export function AcceptChannel_write(obj: number): Uint8Array {
9488                 if(!isWasmInitialized) {
9489                         throw new Error("initializeWasm() must be awaited first!");
9490                 }
9491                 const nativeResponseValue = wasm.AcceptChannel_write(obj);
9492                 return decodeArray(nativeResponseValue);
9493         }
9494         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
9495         export function AcceptChannel_read(ser: Uint8Array): number {
9496                 if(!isWasmInitialized) {
9497                         throw new Error("initializeWasm() must be awaited first!");
9498                 }
9499                 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
9500                 return nativeResponseValue;
9501         }
9502         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
9503         export function AnnouncementSignatures_write(obj: number): Uint8Array {
9504                 if(!isWasmInitialized) {
9505                         throw new Error("initializeWasm() must be awaited first!");
9506                 }
9507                 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
9508                 return decodeArray(nativeResponseValue);
9509         }
9510         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
9511         export function AnnouncementSignatures_read(ser: Uint8Array): number {
9512                 if(!isWasmInitialized) {
9513                         throw new Error("initializeWasm() must be awaited first!");
9514                 }
9515                 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
9516                 return nativeResponseValue;
9517         }
9518         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
9519         export function ChannelReestablish_write(obj: number): Uint8Array {
9520                 if(!isWasmInitialized) {
9521                         throw new Error("initializeWasm() must be awaited first!");
9522                 }
9523                 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
9524                 return decodeArray(nativeResponseValue);
9525         }
9526         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
9527         export function ChannelReestablish_read(ser: Uint8Array): number {
9528                 if(!isWasmInitialized) {
9529                         throw new Error("initializeWasm() must be awaited first!");
9530                 }
9531                 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
9532                 return nativeResponseValue;
9533         }
9534         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
9535         export function ClosingSigned_write(obj: number): Uint8Array {
9536                 if(!isWasmInitialized) {
9537                         throw new Error("initializeWasm() must be awaited first!");
9538                 }
9539                 const nativeResponseValue = wasm.ClosingSigned_write(obj);
9540                 return decodeArray(nativeResponseValue);
9541         }
9542         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
9543         export function ClosingSigned_read(ser: Uint8Array): number {
9544                 if(!isWasmInitialized) {
9545                         throw new Error("initializeWasm() must be awaited first!");
9546                 }
9547                 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
9548                 return nativeResponseValue;
9549         }
9550         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
9551         export function CommitmentSigned_write(obj: number): Uint8Array {
9552                 if(!isWasmInitialized) {
9553                         throw new Error("initializeWasm() must be awaited first!");
9554                 }
9555                 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
9556                 return decodeArray(nativeResponseValue);
9557         }
9558         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
9559         export function CommitmentSigned_read(ser: Uint8Array): number {
9560                 if(!isWasmInitialized) {
9561                         throw new Error("initializeWasm() must be awaited first!");
9562                 }
9563                 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
9564                 return nativeResponseValue;
9565         }
9566         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
9567         export function FundingCreated_write(obj: number): Uint8Array {
9568                 if(!isWasmInitialized) {
9569                         throw new Error("initializeWasm() must be awaited first!");
9570                 }
9571                 const nativeResponseValue = wasm.FundingCreated_write(obj);
9572                 return decodeArray(nativeResponseValue);
9573         }
9574         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
9575         export function FundingCreated_read(ser: Uint8Array): number {
9576                 if(!isWasmInitialized) {
9577                         throw new Error("initializeWasm() must be awaited first!");
9578                 }
9579                 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
9580                 return nativeResponseValue;
9581         }
9582         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
9583         export function FundingSigned_write(obj: number): Uint8Array {
9584                 if(!isWasmInitialized) {
9585                         throw new Error("initializeWasm() must be awaited first!");
9586                 }
9587                 const nativeResponseValue = wasm.FundingSigned_write(obj);
9588                 return decodeArray(nativeResponseValue);
9589         }
9590         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
9591         export function FundingSigned_read(ser: Uint8Array): number {
9592                 if(!isWasmInitialized) {
9593                         throw new Error("initializeWasm() must be awaited first!");
9594                 }
9595                 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
9596                 return nativeResponseValue;
9597         }
9598         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
9599         export function FundingLocked_write(obj: number): Uint8Array {
9600                 if(!isWasmInitialized) {
9601                         throw new Error("initializeWasm() must be awaited first!");
9602                 }
9603                 const nativeResponseValue = wasm.FundingLocked_write(obj);
9604                 return decodeArray(nativeResponseValue);
9605         }
9606         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
9607         export function FundingLocked_read(ser: Uint8Array): number {
9608                 if(!isWasmInitialized) {
9609                         throw new Error("initializeWasm() must be awaited first!");
9610                 }
9611                 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
9612                 return nativeResponseValue;
9613         }
9614         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
9615         export function Init_write(obj: number): Uint8Array {
9616                 if(!isWasmInitialized) {
9617                         throw new Error("initializeWasm() must be awaited first!");
9618                 }
9619                 const nativeResponseValue = wasm.Init_write(obj);
9620                 return decodeArray(nativeResponseValue);
9621         }
9622         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
9623         export function Init_read(ser: Uint8Array): number {
9624                 if(!isWasmInitialized) {
9625                         throw new Error("initializeWasm() must be awaited first!");
9626                 }
9627                 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
9628                 return nativeResponseValue;
9629         }
9630         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
9631         export function OpenChannel_write(obj: number): Uint8Array {
9632                 if(!isWasmInitialized) {
9633                         throw new Error("initializeWasm() must be awaited first!");
9634                 }
9635                 const nativeResponseValue = wasm.OpenChannel_write(obj);
9636                 return decodeArray(nativeResponseValue);
9637         }
9638         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
9639         export function OpenChannel_read(ser: Uint8Array): number {
9640                 if(!isWasmInitialized) {
9641                         throw new Error("initializeWasm() must be awaited first!");
9642                 }
9643                 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
9644                 return nativeResponseValue;
9645         }
9646         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
9647         export function RevokeAndACK_write(obj: number): Uint8Array {
9648                 if(!isWasmInitialized) {
9649                         throw new Error("initializeWasm() must be awaited first!");
9650                 }
9651                 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
9652                 return decodeArray(nativeResponseValue);
9653         }
9654         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
9655         export function RevokeAndACK_read(ser: Uint8Array): number {
9656                 if(!isWasmInitialized) {
9657                         throw new Error("initializeWasm() must be awaited first!");
9658                 }
9659                 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
9660                 return nativeResponseValue;
9661         }
9662         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
9663         export function Shutdown_write(obj: number): Uint8Array {
9664                 if(!isWasmInitialized) {
9665                         throw new Error("initializeWasm() must be awaited first!");
9666                 }
9667                 const nativeResponseValue = wasm.Shutdown_write(obj);
9668                 return decodeArray(nativeResponseValue);
9669         }
9670         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
9671         export function Shutdown_read(ser: Uint8Array): number {
9672                 if(!isWasmInitialized) {
9673                         throw new Error("initializeWasm() must be awaited first!");
9674                 }
9675                 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
9676                 return nativeResponseValue;
9677         }
9678         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
9679         export function UpdateFailHTLC_write(obj: number): Uint8Array {
9680                 if(!isWasmInitialized) {
9681                         throw new Error("initializeWasm() must be awaited first!");
9682                 }
9683                 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
9684                 return decodeArray(nativeResponseValue);
9685         }
9686         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
9687         export function UpdateFailHTLC_read(ser: Uint8Array): number {
9688                 if(!isWasmInitialized) {
9689                         throw new Error("initializeWasm() must be awaited first!");
9690                 }
9691                 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
9692                 return nativeResponseValue;
9693         }
9694         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
9695         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
9696                 if(!isWasmInitialized) {
9697                         throw new Error("initializeWasm() must be awaited first!");
9698                 }
9699                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
9700                 return decodeArray(nativeResponseValue);
9701         }
9702         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
9703         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
9704                 if(!isWasmInitialized) {
9705                         throw new Error("initializeWasm() must be awaited first!");
9706                 }
9707                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
9708                 return nativeResponseValue;
9709         }
9710         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
9711         export function UpdateFee_write(obj: number): Uint8Array {
9712                 if(!isWasmInitialized) {
9713                         throw new Error("initializeWasm() must be awaited first!");
9714                 }
9715                 const nativeResponseValue = wasm.UpdateFee_write(obj);
9716                 return decodeArray(nativeResponseValue);
9717         }
9718         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
9719         export function UpdateFee_read(ser: Uint8Array): number {
9720                 if(!isWasmInitialized) {
9721                         throw new Error("initializeWasm() must be awaited first!");
9722                 }
9723                 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
9724                 return nativeResponseValue;
9725         }
9726         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
9727         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
9728                 if(!isWasmInitialized) {
9729                         throw new Error("initializeWasm() must be awaited first!");
9730                 }
9731                 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
9732                 return decodeArray(nativeResponseValue);
9733         }
9734         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
9735         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
9736                 if(!isWasmInitialized) {
9737                         throw new Error("initializeWasm() must be awaited first!");
9738                 }
9739                 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
9740                 return nativeResponseValue;
9741         }
9742         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
9743         export function UpdateAddHTLC_write(obj: number): Uint8Array {
9744                 if(!isWasmInitialized) {
9745                         throw new Error("initializeWasm() must be awaited first!");
9746                 }
9747                 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
9748                 return decodeArray(nativeResponseValue);
9749         }
9750         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
9751         export function UpdateAddHTLC_read(ser: Uint8Array): number {
9752                 if(!isWasmInitialized) {
9753                         throw new Error("initializeWasm() must be awaited first!");
9754                 }
9755                 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
9756                 return nativeResponseValue;
9757         }
9758         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
9759         export function Ping_write(obj: number): Uint8Array {
9760                 if(!isWasmInitialized) {
9761                         throw new Error("initializeWasm() must be awaited first!");
9762                 }
9763                 const nativeResponseValue = wasm.Ping_write(obj);
9764                 return decodeArray(nativeResponseValue);
9765         }
9766         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
9767         export function Ping_read(ser: Uint8Array): number {
9768                 if(!isWasmInitialized) {
9769                         throw new Error("initializeWasm() must be awaited first!");
9770                 }
9771                 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
9772                 return nativeResponseValue;
9773         }
9774         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
9775         export function Pong_write(obj: number): Uint8Array {
9776                 if(!isWasmInitialized) {
9777                         throw new Error("initializeWasm() must be awaited first!");
9778                 }
9779                 const nativeResponseValue = wasm.Pong_write(obj);
9780                 return decodeArray(nativeResponseValue);
9781         }
9782         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
9783         export function Pong_read(ser: Uint8Array): number {
9784                 if(!isWasmInitialized) {
9785                         throw new Error("initializeWasm() must be awaited first!");
9786                 }
9787                 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
9788                 return nativeResponseValue;
9789         }
9790         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
9791         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
9792                 if(!isWasmInitialized) {
9793                         throw new Error("initializeWasm() must be awaited first!");
9794                 }
9795                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
9796                 return decodeArray(nativeResponseValue);
9797         }
9798         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
9799         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
9800                 if(!isWasmInitialized) {
9801                         throw new Error("initializeWasm() must be awaited first!");
9802                 }
9803                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
9804                 return nativeResponseValue;
9805         }
9806         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
9807         export function ChannelAnnouncement_write(obj: number): Uint8Array {
9808                 if(!isWasmInitialized) {
9809                         throw new Error("initializeWasm() must be awaited first!");
9810                 }
9811                 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
9812                 return decodeArray(nativeResponseValue);
9813         }
9814         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
9815         export function ChannelAnnouncement_read(ser: Uint8Array): number {
9816                 if(!isWasmInitialized) {
9817                         throw new Error("initializeWasm() must be awaited first!");
9818                 }
9819                 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
9820                 return nativeResponseValue;
9821         }
9822         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
9823         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
9824                 if(!isWasmInitialized) {
9825                         throw new Error("initializeWasm() must be awaited first!");
9826                 }
9827                 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
9828                 return decodeArray(nativeResponseValue);
9829         }
9830         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
9831         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
9832                 if(!isWasmInitialized) {
9833                         throw new Error("initializeWasm() must be awaited first!");
9834                 }
9835                 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
9836                 return nativeResponseValue;
9837         }
9838         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
9839         export function ChannelUpdate_write(obj: number): Uint8Array {
9840                 if(!isWasmInitialized) {
9841                         throw new Error("initializeWasm() must be awaited first!");
9842                 }
9843                 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
9844                 return decodeArray(nativeResponseValue);
9845         }
9846         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
9847         export function ChannelUpdate_read(ser: Uint8Array): number {
9848                 if(!isWasmInitialized) {
9849                         throw new Error("initializeWasm() must be awaited first!");
9850                 }
9851                 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
9852                 return nativeResponseValue;
9853         }
9854         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
9855         export function ErrorMessage_write(obj: number): Uint8Array {
9856                 if(!isWasmInitialized) {
9857                         throw new Error("initializeWasm() must be awaited first!");
9858                 }
9859                 const nativeResponseValue = wasm.ErrorMessage_write(obj);
9860                 return decodeArray(nativeResponseValue);
9861         }
9862         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
9863         export function ErrorMessage_read(ser: Uint8Array): number {
9864                 if(!isWasmInitialized) {
9865                         throw new Error("initializeWasm() must be awaited first!");
9866                 }
9867                 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
9868                 return nativeResponseValue;
9869         }
9870         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
9871         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
9872                 if(!isWasmInitialized) {
9873                         throw new Error("initializeWasm() must be awaited first!");
9874                 }
9875                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
9876                 return decodeArray(nativeResponseValue);
9877         }
9878         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
9879         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
9880                 if(!isWasmInitialized) {
9881                         throw new Error("initializeWasm() must be awaited first!");
9882                 }
9883                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
9884                 return nativeResponseValue;
9885         }
9886         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
9887         export function NodeAnnouncement_write(obj: number): Uint8Array {
9888                 if(!isWasmInitialized) {
9889                         throw new Error("initializeWasm() must be awaited first!");
9890                 }
9891                 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
9892                 return decodeArray(nativeResponseValue);
9893         }
9894         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
9895         export function NodeAnnouncement_read(ser: Uint8Array): number {
9896                 if(!isWasmInitialized) {
9897                         throw new Error("initializeWasm() must be awaited first!");
9898                 }
9899                 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
9900                 return nativeResponseValue;
9901         }
9902         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
9903         export function QueryShortChannelIds_read(ser: Uint8Array): number {
9904                 if(!isWasmInitialized) {
9905                         throw new Error("initializeWasm() must be awaited first!");
9906                 }
9907                 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
9908                 return nativeResponseValue;
9909         }
9910         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
9911         export function QueryShortChannelIds_write(obj: number): Uint8Array {
9912                 if(!isWasmInitialized) {
9913                         throw new Error("initializeWasm() must be awaited first!");
9914                 }
9915                 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
9916                 return decodeArray(nativeResponseValue);
9917         }
9918         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
9919         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
9920                 if(!isWasmInitialized) {
9921                         throw new Error("initializeWasm() must be awaited first!");
9922                 }
9923                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
9924                 return nativeResponseValue;
9925         }
9926         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
9927         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
9928                 if(!isWasmInitialized) {
9929                         throw new Error("initializeWasm() must be awaited first!");
9930                 }
9931                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
9932                 return decodeArray(nativeResponseValue);
9933         }
9934         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
9935         export function QueryChannelRange_end_blocknum(this_arg: number): number {
9936                 if(!isWasmInitialized) {
9937                         throw new Error("initializeWasm() must be awaited first!");
9938                 }
9939                 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
9940                 return nativeResponseValue;
9941         }
9942         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
9943         export function QueryChannelRange_read(ser: Uint8Array): number {
9944                 if(!isWasmInitialized) {
9945                         throw new Error("initializeWasm() must be awaited first!");
9946                 }
9947                 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
9948                 return nativeResponseValue;
9949         }
9950         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
9951         export function QueryChannelRange_write(obj: number): Uint8Array {
9952                 if(!isWasmInitialized) {
9953                         throw new Error("initializeWasm() must be awaited first!");
9954                 }
9955                 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
9956                 return decodeArray(nativeResponseValue);
9957         }
9958         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
9959         export function ReplyChannelRange_read(ser: Uint8Array): number {
9960                 if(!isWasmInitialized) {
9961                         throw new Error("initializeWasm() must be awaited first!");
9962                 }
9963                 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
9964                 return nativeResponseValue;
9965         }
9966         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
9967         export function ReplyChannelRange_write(obj: number): Uint8Array {
9968                 if(!isWasmInitialized) {
9969                         throw new Error("initializeWasm() must be awaited first!");
9970                 }
9971                 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
9972                 return decodeArray(nativeResponseValue);
9973         }
9974         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
9975         export function GossipTimestampFilter_read(ser: Uint8Array): number {
9976                 if(!isWasmInitialized) {
9977                         throw new Error("initializeWasm() must be awaited first!");
9978                 }
9979                 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
9980                 return nativeResponseValue;
9981         }
9982         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
9983         export function GossipTimestampFilter_write(obj: number): Uint8Array {
9984                 if(!isWasmInitialized) {
9985                         throw new Error("initializeWasm() must be awaited first!");
9986                 }
9987                 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
9988                 return decodeArray(nativeResponseValue);
9989         }
9990         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
9991         export function IgnoringMessageHandler_free(this_obj: number): void {
9992                 if(!isWasmInitialized) {
9993                         throw new Error("initializeWasm() must be awaited first!");
9994                 }
9995                 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
9996                 // debug statements here
9997         }
9998         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
9999         export function IgnoringMessageHandler_new(): number {
10000                 if(!isWasmInitialized) {
10001                         throw new Error("initializeWasm() must be awaited first!");
10002                 }
10003                 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
10004                 return nativeResponseValue;
10005         }
10006         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
10007         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
10008                 if(!isWasmInitialized) {
10009                         throw new Error("initializeWasm() must be awaited first!");
10010                 }
10011                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
10012                 return nativeResponseValue;
10013         }
10014         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
10015         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
10016                 if(!isWasmInitialized) {
10017                         throw new Error("initializeWasm() must be awaited first!");
10018                 }
10019                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
10020                 return nativeResponseValue;
10021         }
10022         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
10023         export function ErroringMessageHandler_free(this_obj: number): void {
10024                 if(!isWasmInitialized) {
10025                         throw new Error("initializeWasm() must be awaited first!");
10026                 }
10027                 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
10028                 // debug statements here
10029         }
10030         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
10031         export function ErroringMessageHandler_new(): number {
10032                 if(!isWasmInitialized) {
10033                         throw new Error("initializeWasm() must be awaited first!");
10034                 }
10035                 const nativeResponseValue = wasm.ErroringMessageHandler_new();
10036                 return nativeResponseValue;
10037         }
10038         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
10039         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
10040                 if(!isWasmInitialized) {
10041                         throw new Error("initializeWasm() must be awaited first!");
10042                 }
10043                 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
10044                 return nativeResponseValue;
10045         }
10046         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
10047         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
10048                 if(!isWasmInitialized) {
10049                         throw new Error("initializeWasm() must be awaited first!");
10050                 }
10051                 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
10052                 return nativeResponseValue;
10053         }
10054         // void MessageHandler_free(struct LDKMessageHandler this_obj);
10055         export function MessageHandler_free(this_obj: number): void {
10056                 if(!isWasmInitialized) {
10057                         throw new Error("initializeWasm() must be awaited first!");
10058                 }
10059                 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
10060                 // debug statements here
10061         }
10062         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
10063         export function MessageHandler_get_chan_handler(this_ptr: number): number {
10064                 if(!isWasmInitialized) {
10065                         throw new Error("initializeWasm() must be awaited first!");
10066                 }
10067                 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
10068                 return nativeResponseValue;
10069         }
10070         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
10071         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
10072                 if(!isWasmInitialized) {
10073                         throw new Error("initializeWasm() must be awaited first!");
10074                 }
10075                 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
10076                 // debug statements here
10077         }
10078         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
10079         export function MessageHandler_get_route_handler(this_ptr: number): number {
10080                 if(!isWasmInitialized) {
10081                         throw new Error("initializeWasm() must be awaited first!");
10082                 }
10083                 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
10084                 return nativeResponseValue;
10085         }
10086         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
10087         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
10088                 if(!isWasmInitialized) {
10089                         throw new Error("initializeWasm() must be awaited first!");
10090                 }
10091                 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
10092                 // debug statements here
10093         }
10094         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
10095         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
10096                 if(!isWasmInitialized) {
10097                         throw new Error("initializeWasm() must be awaited first!");
10098                 }
10099                 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
10100                 return nativeResponseValue;
10101         }
10102         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
10103         export function SocketDescriptor_clone(orig: number): number {
10104                 if(!isWasmInitialized) {
10105                         throw new Error("initializeWasm() must be awaited first!");
10106                 }
10107                 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
10108                 return nativeResponseValue;
10109         }
10110         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
10111         export function SocketDescriptor_free(this_ptr: number): void {
10112                 if(!isWasmInitialized) {
10113                         throw new Error("initializeWasm() must be awaited first!");
10114                 }
10115                 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
10116                 // debug statements here
10117         }
10118         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
10119         export function PeerHandleError_free(this_obj: number): void {
10120                 if(!isWasmInitialized) {
10121                         throw new Error("initializeWasm() must be awaited first!");
10122                 }
10123                 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
10124                 // debug statements here
10125         }
10126         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
10127         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
10128                 if(!isWasmInitialized) {
10129                         throw new Error("initializeWasm() must be awaited first!");
10130                 }
10131                 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
10132                 return nativeResponseValue;
10133         }
10134         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
10135         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
10136                 if(!isWasmInitialized) {
10137                         throw new Error("initializeWasm() must be awaited first!");
10138                 }
10139                 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
10140                 // debug statements here
10141         }
10142         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
10143         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
10144                 if(!isWasmInitialized) {
10145                         throw new Error("initializeWasm() must be awaited first!");
10146                 }
10147                 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
10148                 return nativeResponseValue;
10149         }
10150         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
10151         export function PeerHandleError_clone(orig: number): number {
10152                 if(!isWasmInitialized) {
10153                         throw new Error("initializeWasm() must be awaited first!");
10154                 }
10155                 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
10156                 return nativeResponseValue;
10157         }
10158         // void PeerManager_free(struct LDKPeerManager this_obj);
10159         export function PeerManager_free(this_obj: number): void {
10160                 if(!isWasmInitialized) {
10161                         throw new Error("initializeWasm() must be awaited first!");
10162                 }
10163                 const nativeResponseValue = wasm.PeerManager_free(this_obj);
10164                 // debug statements here
10165         }
10166         // 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);
10167         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
10168                 if(!isWasmInitialized) {
10169                         throw new Error("initializeWasm() must be awaited first!");
10170                 }
10171                 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
10172                 return nativeResponseValue;
10173         }
10174         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
10175         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
10176                 if(!isWasmInitialized) {
10177                         throw new Error("initializeWasm() must be awaited first!");
10178                 }
10179                 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
10180                 return nativeResponseValue;
10181         }
10182         // 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);
10183         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
10184                 if(!isWasmInitialized) {
10185                         throw new Error("initializeWasm() must be awaited first!");
10186                 }
10187                 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
10188                 return nativeResponseValue;
10189         }
10190         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
10191         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
10192                 if(!isWasmInitialized) {
10193                         throw new Error("initializeWasm() must be awaited first!");
10194                 }
10195                 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
10196                 return nativeResponseValue;
10197         }
10198         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10199         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
10200                 if(!isWasmInitialized) {
10201                         throw new Error("initializeWasm() must be awaited first!");
10202                 }
10203                 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
10204                 return nativeResponseValue;
10205         }
10206         // 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);
10207         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
10208                 if(!isWasmInitialized) {
10209                         throw new Error("initializeWasm() must be awaited first!");
10210                 }
10211                 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
10212                 return nativeResponseValue;
10213         }
10214         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
10215         export function PeerManager_process_events(this_arg: number): void {
10216                 if(!isWasmInitialized) {
10217                         throw new Error("initializeWasm() must be awaited first!");
10218                 }
10219                 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
10220                 // debug statements here
10221         }
10222         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10223         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
10224                 if(!isWasmInitialized) {
10225                         throw new Error("initializeWasm() must be awaited first!");
10226                 }
10227                 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
10228                 // debug statements here
10229         }
10230         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
10231         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
10232                 if(!isWasmInitialized) {
10233                         throw new Error("initializeWasm() must be awaited first!");
10234                 }
10235                 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
10236                 // debug statements here
10237         }
10238         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
10239         export function PeerManager_timer_tick_occurred(this_arg: number): void {
10240                 if(!isWasmInitialized) {
10241                         throw new Error("initializeWasm() must be awaited first!");
10242                 }
10243                 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
10244                 // debug statements here
10245         }
10246         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
10247         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
10248                 if(!isWasmInitialized) {
10249                         throw new Error("initializeWasm() must be awaited first!");
10250                 }
10251                 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
10252                 return decodeArray(nativeResponseValue);
10253         }
10254         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
10255         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
10256                 if(!isWasmInitialized) {
10257                         throw new Error("initializeWasm() must be awaited first!");
10258                 }
10259                 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
10260                 return nativeResponseValue;
10261         }
10262         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
10263         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
10264                 if(!isWasmInitialized) {
10265                         throw new Error("initializeWasm() must be awaited first!");
10266                 }
10267                 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
10268                 return nativeResponseValue;
10269         }
10270         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
10271         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
10272                 if(!isWasmInitialized) {
10273                         throw new Error("initializeWasm() must be awaited first!");
10274                 }
10275                 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
10276                 return nativeResponseValue;
10277         }
10278         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
10279         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
10280                 if(!isWasmInitialized) {
10281                         throw new Error("initializeWasm() must be awaited first!");
10282                 }
10283                 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
10284                 return nativeResponseValue;
10285         }
10286         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
10287         export function TxCreationKeys_free(this_obj: number): void {
10288                 if(!isWasmInitialized) {
10289                         throw new Error("initializeWasm() must be awaited first!");
10290                 }
10291                 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
10292                 // debug statements here
10293         }
10294         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10295         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
10296                 if(!isWasmInitialized) {
10297                         throw new Error("initializeWasm() must be awaited first!");
10298                 }
10299                 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
10300                 return decodeArray(nativeResponseValue);
10301         }
10302         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10303         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10304                 if(!isWasmInitialized) {
10305                         throw new Error("initializeWasm() must be awaited first!");
10306                 }
10307                 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
10308                 // debug statements here
10309         }
10310         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10311         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
10312                 if(!isWasmInitialized) {
10313                         throw new Error("initializeWasm() must be awaited first!");
10314                 }
10315                 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
10316                 return decodeArray(nativeResponseValue);
10317         }
10318         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10319         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
10320                 if(!isWasmInitialized) {
10321                         throw new Error("initializeWasm() must be awaited first!");
10322                 }
10323                 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
10324                 // debug statements here
10325         }
10326         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10327         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
10328                 if(!isWasmInitialized) {
10329                         throw new Error("initializeWasm() must be awaited first!");
10330                 }
10331                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
10332                 return decodeArray(nativeResponseValue);
10333         }
10334         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10335         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
10336                 if(!isWasmInitialized) {
10337                         throw new Error("initializeWasm() must be awaited first!");
10338                 }
10339                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
10340                 // debug statements here
10341         }
10342         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10343         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
10344                 if(!isWasmInitialized) {
10345                         throw new Error("initializeWasm() must be awaited first!");
10346                 }
10347                 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
10348                 return decodeArray(nativeResponseValue);
10349         }
10350         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10351         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
10352                 if(!isWasmInitialized) {
10353                         throw new Error("initializeWasm() must be awaited first!");
10354                 }
10355                 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
10356                 // debug statements here
10357         }
10358         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10359         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
10360                 if(!isWasmInitialized) {
10361                         throw new Error("initializeWasm() must be awaited first!");
10362                 }
10363                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
10364                 return decodeArray(nativeResponseValue);
10365         }
10366         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10367         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
10368                 if(!isWasmInitialized) {
10369                         throw new Error("initializeWasm() must be awaited first!");
10370                 }
10371                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
10372                 // debug statements here
10373         }
10374         // 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);
10375         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 {
10376                 if(!isWasmInitialized) {
10377                         throw new Error("initializeWasm() must be awaited first!");
10378                 }
10379                 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));
10380                 return nativeResponseValue;
10381         }
10382         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
10383         export function TxCreationKeys_clone(orig: number): number {
10384                 if(!isWasmInitialized) {
10385                         throw new Error("initializeWasm() must be awaited first!");
10386                 }
10387                 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
10388                 return nativeResponseValue;
10389         }
10390         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
10391         export function TxCreationKeys_write(obj: number): Uint8Array {
10392                 if(!isWasmInitialized) {
10393                         throw new Error("initializeWasm() must be awaited first!");
10394                 }
10395                 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
10396                 return decodeArray(nativeResponseValue);
10397         }
10398         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
10399         export function TxCreationKeys_read(ser: Uint8Array): number {
10400                 if(!isWasmInitialized) {
10401                         throw new Error("initializeWasm() must be awaited first!");
10402                 }
10403                 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
10404                 return nativeResponseValue;
10405         }
10406         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
10407         export function ChannelPublicKeys_free(this_obj: number): void {
10408                 if(!isWasmInitialized) {
10409                         throw new Error("initializeWasm() must be awaited first!");
10410                 }
10411                 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
10412                 // debug statements here
10413         }
10414         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10415         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
10416                 if(!isWasmInitialized) {
10417                         throw new Error("initializeWasm() must be awaited first!");
10418                 }
10419                 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
10420                 return decodeArray(nativeResponseValue);
10421         }
10422         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10423         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10424                 if(!isWasmInitialized) {
10425                         throw new Error("initializeWasm() must be awaited first!");
10426                 }
10427                 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
10428                 // debug statements here
10429         }
10430         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10431         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
10432                 if(!isWasmInitialized) {
10433                         throw new Error("initializeWasm() must be awaited first!");
10434                 }
10435                 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
10436                 return decodeArray(nativeResponseValue);
10437         }
10438         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10439         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10440                 if(!isWasmInitialized) {
10441                         throw new Error("initializeWasm() must be awaited first!");
10442                 }
10443                 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
10444                 // debug statements here
10445         }
10446         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10447         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
10448                 if(!isWasmInitialized) {
10449                         throw new Error("initializeWasm() must be awaited first!");
10450                 }
10451                 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
10452                 return decodeArray(nativeResponseValue);
10453         }
10454         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10455         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
10456                 if(!isWasmInitialized) {
10457                         throw new Error("initializeWasm() must be awaited first!");
10458                 }
10459                 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
10460                 // debug statements here
10461         }
10462         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10463         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10464                 if(!isWasmInitialized) {
10465                         throw new Error("initializeWasm() must be awaited first!");
10466                 }
10467                 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
10468                 return decodeArray(nativeResponseValue);
10469         }
10470         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10471         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10472                 if(!isWasmInitialized) {
10473                         throw new Error("initializeWasm() must be awaited first!");
10474                 }
10475                 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10476                 // debug statements here
10477         }
10478         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10479         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
10480                 if(!isWasmInitialized) {
10481                         throw new Error("initializeWasm() must be awaited first!");
10482                 }
10483                 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
10484                 return decodeArray(nativeResponseValue);
10485         }
10486         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10487         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10488                 if(!isWasmInitialized) {
10489                         throw new Error("initializeWasm() must be awaited first!");
10490                 }
10491                 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
10492                 // debug statements here
10493         }
10494         // 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);
10495         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 {
10496                 if(!isWasmInitialized) {
10497                         throw new Error("initializeWasm() must be awaited first!");
10498                 }
10499                 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));
10500                 return nativeResponseValue;
10501         }
10502         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
10503         export function ChannelPublicKeys_clone(orig: number): number {
10504                 if(!isWasmInitialized) {
10505                         throw new Error("initializeWasm() must be awaited first!");
10506                 }
10507                 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
10508                 return nativeResponseValue;
10509         }
10510         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
10511         export function ChannelPublicKeys_write(obj: number): Uint8Array {
10512                 if(!isWasmInitialized) {
10513                         throw new Error("initializeWasm() must be awaited first!");
10514                 }
10515                 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
10516                 return decodeArray(nativeResponseValue);
10517         }
10518         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
10519         export function ChannelPublicKeys_read(ser: Uint8Array): number {
10520                 if(!isWasmInitialized) {
10521                         throw new Error("initializeWasm() must be awaited first!");
10522                 }
10523                 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
10524                 return nativeResponseValue;
10525         }
10526         // 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);
10527         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 {
10528                 if(!isWasmInitialized) {
10529                         throw new Error("initializeWasm() must be awaited first!");
10530                 }
10531                 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));
10532                 return nativeResponseValue;
10533         }
10534         // 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);
10535         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
10536                 if(!isWasmInitialized) {
10537                         throw new Error("initializeWasm() must be awaited first!");
10538                 }
10539                 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
10540                 return nativeResponseValue;
10541         }
10542         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
10543         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
10544                 if(!isWasmInitialized) {
10545                         throw new Error("initializeWasm() must be awaited first!");
10546                 }
10547                 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
10548                 return decodeArray(nativeResponseValue);
10549         }
10550         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
10551         export function HTLCOutputInCommitment_free(this_obj: number): void {
10552                 if(!isWasmInitialized) {
10553                         throw new Error("initializeWasm() must be awaited first!");
10554                 }
10555                 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
10556                 // debug statements here
10557         }
10558         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10559         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
10560                 if(!isWasmInitialized) {
10561                         throw new Error("initializeWasm() must be awaited first!");
10562                 }
10563                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
10564                 return nativeResponseValue;
10565         }
10566         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
10567         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
10568                 if(!isWasmInitialized) {
10569                         throw new Error("initializeWasm() must be awaited first!");
10570                 }
10571                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
10572                 // debug statements here
10573         }
10574         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10575         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
10576                 if(!isWasmInitialized) {
10577                         throw new Error("initializeWasm() must be awaited first!");
10578                 }
10579                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
10580                 return nativeResponseValue;
10581         }
10582         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
10583         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
10584                 if(!isWasmInitialized) {
10585                         throw new Error("initializeWasm() must be awaited first!");
10586                 }
10587                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
10588                 // debug statements here
10589         }
10590         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10591         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
10592                 if(!isWasmInitialized) {
10593                         throw new Error("initializeWasm() must be awaited first!");
10594                 }
10595                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
10596                 return nativeResponseValue;
10597         }
10598         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
10599         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
10600                 if(!isWasmInitialized) {
10601                         throw new Error("initializeWasm() must be awaited first!");
10602                 }
10603                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
10604                 // debug statements here
10605         }
10606         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
10607         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
10608                 if(!isWasmInitialized) {
10609                         throw new Error("initializeWasm() must be awaited first!");
10610                 }
10611                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
10612                 return decodeArray(nativeResponseValue);
10613         }
10614         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10615         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
10616                 if(!isWasmInitialized) {
10617                         throw new Error("initializeWasm() must be awaited first!");
10618                 }
10619                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
10620                 // debug statements here
10621         }
10622         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
10623         export function HTLCOutputInCommitment_clone(orig: number): number {
10624                 if(!isWasmInitialized) {
10625                         throw new Error("initializeWasm() must be awaited first!");
10626                 }
10627                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
10628                 return nativeResponseValue;
10629         }
10630         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
10631         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
10632                 if(!isWasmInitialized) {
10633                         throw new Error("initializeWasm() must be awaited first!");
10634                 }
10635                 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
10636                 return decodeArray(nativeResponseValue);
10637         }
10638         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
10639         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
10640                 if(!isWasmInitialized) {
10641                         throw new Error("initializeWasm() must be awaited first!");
10642                 }
10643                 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
10644                 return nativeResponseValue;
10645         }
10646         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
10647         export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
10648                 if(!isWasmInitialized) {
10649                         throw new Error("initializeWasm() must be awaited first!");
10650                 }
10651                 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
10652                 return decodeArray(nativeResponseValue);
10653         }
10654         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
10655         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
10656                 if(!isWasmInitialized) {
10657                         throw new Error("initializeWasm() must be awaited first!");
10658                 }
10659                 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
10660                 return decodeArray(nativeResponseValue);
10661         }
10662         // struct LDKTransaction build_htlc_transaction(const uint8_t (*prev_hash)[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);
10663         export function build_htlc_transaction(prev_hash: Uint8Array, feerate_per_kw: number, contest_delay: number, htlc: number, broadcaster_delayed_payment_key: Uint8Array, revocation_key: Uint8Array): Uint8Array {
10664                 if(!isWasmInitialized) {
10665                         throw new Error("initializeWasm() must be awaited first!");
10666                 }
10667                 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(prev_hash), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
10668                 return decodeArray(nativeResponseValue);
10669         }
10670         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
10671         export function ChannelTransactionParameters_free(this_obj: number): void {
10672                 if(!isWasmInitialized) {
10673                         throw new Error("initializeWasm() must be awaited first!");
10674                 }
10675                 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
10676                 // debug statements here
10677         }
10678         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10679         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
10680                 if(!isWasmInitialized) {
10681                         throw new Error("initializeWasm() must be awaited first!");
10682                 }
10683                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
10684                 return nativeResponseValue;
10685         }
10686         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
10687         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
10688                 if(!isWasmInitialized) {
10689                         throw new Error("initializeWasm() must be awaited first!");
10690                 }
10691                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
10692                 // debug statements here
10693         }
10694         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10695         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
10696                 if(!isWasmInitialized) {
10697                         throw new Error("initializeWasm() must be awaited first!");
10698                 }
10699                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
10700                 return nativeResponseValue;
10701         }
10702         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
10703         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
10704                 if(!isWasmInitialized) {
10705                         throw new Error("initializeWasm() must be awaited first!");
10706                 }
10707                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
10708                 // debug statements here
10709         }
10710         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10711         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
10712                 if(!isWasmInitialized) {
10713                         throw new Error("initializeWasm() must be awaited first!");
10714                 }
10715                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
10716                 return nativeResponseValue;
10717         }
10718         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
10719         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
10720                 if(!isWasmInitialized) {
10721                         throw new Error("initializeWasm() must be awaited first!");
10722                 }
10723                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
10724                 // debug statements here
10725         }
10726         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10727         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
10728                 if(!isWasmInitialized) {
10729                         throw new Error("initializeWasm() must be awaited first!");
10730                 }
10731                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
10732                 return nativeResponseValue;
10733         }
10734         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
10735         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
10736                 if(!isWasmInitialized) {
10737                         throw new Error("initializeWasm() must be awaited first!");
10738                 }
10739                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
10740                 // debug statements here
10741         }
10742         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10743         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
10744                 if(!isWasmInitialized) {
10745                         throw new Error("initializeWasm() must be awaited first!");
10746                 }
10747                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
10748                 return nativeResponseValue;
10749         }
10750         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
10751         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
10752                 if(!isWasmInitialized) {
10753                         throw new Error("initializeWasm() must be awaited first!");
10754                 }
10755                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
10756                 // debug statements here
10757         }
10758         // 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);
10759         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 {
10760                 if(!isWasmInitialized) {
10761                         throw new Error("initializeWasm() must be awaited first!");
10762                 }
10763                 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
10764                 return nativeResponseValue;
10765         }
10766         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
10767         export function ChannelTransactionParameters_clone(orig: number): number {
10768                 if(!isWasmInitialized) {
10769                         throw new Error("initializeWasm() must be awaited first!");
10770                 }
10771                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
10772                 return nativeResponseValue;
10773         }
10774         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
10775         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
10776                 if(!isWasmInitialized) {
10777                         throw new Error("initializeWasm() must be awaited first!");
10778                 }
10779                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
10780                 // debug statements here
10781         }
10782         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
10783         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
10784                 if(!isWasmInitialized) {
10785                         throw new Error("initializeWasm() must be awaited first!");
10786                 }
10787                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
10788                 return nativeResponseValue;
10789         }
10790         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
10791         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
10792                 if(!isWasmInitialized) {
10793                         throw new Error("initializeWasm() must be awaited first!");
10794                 }
10795                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
10796                 // debug statements here
10797         }
10798         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
10799         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
10800                 if(!isWasmInitialized) {
10801                         throw new Error("initializeWasm() must be awaited first!");
10802                 }
10803                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
10804                 return nativeResponseValue;
10805         }
10806         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
10807         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
10808                 if(!isWasmInitialized) {
10809                         throw new Error("initializeWasm() must be awaited first!");
10810                 }
10811                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
10812                 // debug statements here
10813         }
10814         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
10815         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
10816                 if(!isWasmInitialized) {
10817                         throw new Error("initializeWasm() must be awaited first!");
10818                 }
10819                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
10820                 return nativeResponseValue;
10821         }
10822         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
10823         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
10824                 if(!isWasmInitialized) {
10825                         throw new Error("initializeWasm() must be awaited first!");
10826                 }
10827                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
10828                 return nativeResponseValue;
10829         }
10830         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10831         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
10832                 if(!isWasmInitialized) {
10833                         throw new Error("initializeWasm() must be awaited first!");
10834                 }
10835                 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
10836                 return nativeResponseValue;
10837         }
10838         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10839         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
10840                 if(!isWasmInitialized) {
10841                         throw new Error("initializeWasm() must be awaited first!");
10842                 }
10843                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
10844                 return nativeResponseValue;
10845         }
10846         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10847         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
10848                 if(!isWasmInitialized) {
10849                         throw new Error("initializeWasm() must be awaited first!");
10850                 }
10851                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
10852                 return nativeResponseValue;
10853         }
10854         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
10855         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
10856                 if(!isWasmInitialized) {
10857                         throw new Error("initializeWasm() must be awaited first!");
10858                 }
10859                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
10860                 return decodeArray(nativeResponseValue);
10861         }
10862         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
10863         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
10864                 if(!isWasmInitialized) {
10865                         throw new Error("initializeWasm() must be awaited first!");
10866                 }
10867                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
10868                 return nativeResponseValue;
10869         }
10870         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
10871         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
10872                 if(!isWasmInitialized) {
10873                         throw new Error("initializeWasm() must be awaited first!");
10874                 }
10875                 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
10876                 return decodeArray(nativeResponseValue);
10877         }
10878         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
10879         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
10880                 if(!isWasmInitialized) {
10881                         throw new Error("initializeWasm() must be awaited first!");
10882                 }
10883                 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
10884                 return nativeResponseValue;
10885         }
10886         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
10887         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
10888                 if(!isWasmInitialized) {
10889                         throw new Error("initializeWasm() must be awaited first!");
10890                 }
10891                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
10892                 // debug statements here
10893         }
10894         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10895         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
10896                 if(!isWasmInitialized) {
10897                         throw new Error("initializeWasm() must be awaited first!");
10898                 }
10899                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
10900                 return nativeResponseValue;
10901         }
10902         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10903         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
10904                 if(!isWasmInitialized) {
10905                         throw new Error("initializeWasm() must be awaited first!");
10906                 }
10907                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
10908                 return nativeResponseValue;
10909         }
10910         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10911         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
10912                 if(!isWasmInitialized) {
10913                         throw new Error("initializeWasm() must be awaited first!");
10914                 }
10915                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
10916                 return nativeResponseValue;
10917         }
10918         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10919         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
10920                 if(!isWasmInitialized) {
10921                         throw new Error("initializeWasm() must be awaited first!");
10922                 }
10923                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
10924                 return nativeResponseValue;
10925         }
10926         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10927         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
10928                 if(!isWasmInitialized) {
10929                         throw new Error("initializeWasm() must be awaited first!");
10930                 }
10931                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
10932                 return nativeResponseValue;
10933         }
10934         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
10935         export function HolderCommitmentTransaction_free(this_obj: number): void {
10936                 if(!isWasmInitialized) {
10937                         throw new Error("initializeWasm() must be awaited first!");
10938                 }
10939                 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
10940                 // debug statements here
10941         }
10942         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
10943         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
10944                 if(!isWasmInitialized) {
10945                         throw new Error("initializeWasm() must be awaited first!");
10946                 }
10947                 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
10948                 return decodeArray(nativeResponseValue);
10949         }
10950         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
10951         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
10952                 if(!isWasmInitialized) {
10953                         throw new Error("initializeWasm() must be awaited first!");
10954                 }
10955                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
10956                 // debug statements here
10957         }
10958         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
10959         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
10960                 if(!isWasmInitialized) {
10961                         throw new Error("initializeWasm() must be awaited first!");
10962                 }
10963                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
10964                 // debug statements here
10965         }
10966         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
10967         export function HolderCommitmentTransaction_clone(orig: number): number {
10968                 if(!isWasmInitialized) {
10969                         throw new Error("initializeWasm() must be awaited first!");
10970                 }
10971                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
10972                 return nativeResponseValue;
10973         }
10974         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
10975         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
10976                 if(!isWasmInitialized) {
10977                         throw new Error("initializeWasm() must be awaited first!");
10978                 }
10979                 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
10980                 return decodeArray(nativeResponseValue);
10981         }
10982         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
10983         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
10984                 if(!isWasmInitialized) {
10985                         throw new Error("initializeWasm() must be awaited first!");
10986                 }
10987                 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
10988                 return nativeResponseValue;
10989         }
10990         // 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);
10991         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
10992                 if(!isWasmInitialized) {
10993                         throw new Error("initializeWasm() must be awaited first!");
10994                 }
10995                 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
10996                 return nativeResponseValue;
10997         }
10998         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
10999         export function BuiltCommitmentTransaction_free(this_obj: number): void {
11000                 if(!isWasmInitialized) {
11001                         throw new Error("initializeWasm() must be awaited first!");
11002                 }
11003                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
11004                 // debug statements here
11005         }
11006         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
11007         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
11008                 if(!isWasmInitialized) {
11009                         throw new Error("initializeWasm() must be awaited first!");
11010                 }
11011                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
11012                 return decodeArray(nativeResponseValue);
11013         }
11014         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
11015         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
11016                 if(!isWasmInitialized) {
11017                         throw new Error("initializeWasm() must be awaited first!");
11018                 }
11019                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
11020                 // debug statements here
11021         }
11022         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
11023         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
11024                 if(!isWasmInitialized) {
11025                         throw new Error("initializeWasm() must be awaited first!");
11026                 }
11027                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
11028                 return decodeArray(nativeResponseValue);
11029         }
11030         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11031         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
11032                 if(!isWasmInitialized) {
11033                         throw new Error("initializeWasm() must be awaited first!");
11034                 }
11035                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
11036                 // debug statements here
11037         }
11038         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
11039         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
11040                 if(!isWasmInitialized) {
11041                         throw new Error("initializeWasm() must be awaited first!");
11042                 }
11043                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
11044                 return nativeResponseValue;
11045         }
11046         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
11047         export function BuiltCommitmentTransaction_clone(orig: number): number {
11048                 if(!isWasmInitialized) {
11049                         throw new Error("initializeWasm() must be awaited first!");
11050                 }
11051                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
11052                 return nativeResponseValue;
11053         }
11054         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
11055         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
11056                 if(!isWasmInitialized) {
11057                         throw new Error("initializeWasm() must be awaited first!");
11058                 }
11059                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
11060                 return decodeArray(nativeResponseValue);
11061         }
11062         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
11063         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
11064                 if(!isWasmInitialized) {
11065                         throw new Error("initializeWasm() must be awaited first!");
11066                 }
11067                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
11068                 return nativeResponseValue;
11069         }
11070         // 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);
11071         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11072                 if(!isWasmInitialized) {
11073                         throw new Error("initializeWasm() must be awaited first!");
11074                 }
11075                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
11076                 return decodeArray(nativeResponseValue);
11077         }
11078         // 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);
11079         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11080                 if(!isWasmInitialized) {
11081                         throw new Error("initializeWasm() must be awaited first!");
11082                 }
11083                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
11084                 return decodeArray(nativeResponseValue);
11085         }
11086         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
11087         export function CommitmentTransaction_free(this_obj: number): void {
11088                 if(!isWasmInitialized) {
11089                         throw new Error("initializeWasm() must be awaited first!");
11090                 }
11091                 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
11092                 // debug statements here
11093         }
11094         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
11095         export function CommitmentTransaction_clone(orig: number): number {
11096                 if(!isWasmInitialized) {
11097                         throw new Error("initializeWasm() must be awaited first!");
11098                 }
11099                 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
11100                 return nativeResponseValue;
11101         }
11102         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
11103         export function CommitmentTransaction_write(obj: number): Uint8Array {
11104                 if(!isWasmInitialized) {
11105                         throw new Error("initializeWasm() must be awaited first!");
11106                 }
11107                 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
11108                 return decodeArray(nativeResponseValue);
11109         }
11110         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
11111         export function CommitmentTransaction_read(ser: Uint8Array): number {
11112                 if(!isWasmInitialized) {
11113                         throw new Error("initializeWasm() must be awaited first!");
11114                 }
11115                 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
11116                 return nativeResponseValue;
11117         }
11118         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11119         export function CommitmentTransaction_commitment_number(this_arg: number): number {
11120                 if(!isWasmInitialized) {
11121                         throw new Error("initializeWasm() must be awaited first!");
11122                 }
11123                 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
11124                 return nativeResponseValue;
11125         }
11126         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11127         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
11128                 if(!isWasmInitialized) {
11129                         throw new Error("initializeWasm() must be awaited first!");
11130                 }
11131                 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
11132                 return nativeResponseValue;
11133         }
11134         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11135         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
11136                 if(!isWasmInitialized) {
11137                         throw new Error("initializeWasm() must be awaited first!");
11138                 }
11139                 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
11140                 return nativeResponseValue;
11141         }
11142         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11143         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
11144                 if(!isWasmInitialized) {
11145                         throw new Error("initializeWasm() must be awaited first!");
11146                 }
11147                 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
11148                 return nativeResponseValue;
11149         }
11150         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11151         export function CommitmentTransaction_trust(this_arg: number): number {
11152                 if(!isWasmInitialized) {
11153                         throw new Error("initializeWasm() must be awaited first!");
11154                 }
11155                 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
11156                 return nativeResponseValue;
11157         }
11158         // 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);
11159         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
11160                 if(!isWasmInitialized) {
11161                         throw new Error("initializeWasm() must be awaited first!");
11162                 }
11163                 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
11164                 return nativeResponseValue;
11165         }
11166         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
11167         export function TrustedCommitmentTransaction_free(this_obj: number): void {
11168                 if(!isWasmInitialized) {
11169                         throw new Error("initializeWasm() must be awaited first!");
11170                 }
11171                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
11172                 // debug statements here
11173         }
11174         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11175         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
11176                 if(!isWasmInitialized) {
11177                         throw new Error("initializeWasm() must be awaited first!");
11178                 }
11179                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
11180                 return decodeArray(nativeResponseValue);
11181         }
11182         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11183         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
11184                 if(!isWasmInitialized) {
11185                         throw new Error("initializeWasm() must be awaited first!");
11186                 }
11187                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
11188                 return nativeResponseValue;
11189         }
11190         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11191         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
11192                 if(!isWasmInitialized) {
11193                         throw new Error("initializeWasm() must be awaited first!");
11194                 }
11195                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
11196                 return nativeResponseValue;
11197         }
11198         // 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);
11199         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
11200                 if(!isWasmInitialized) {
11201                         throw new Error("initializeWasm() must be awaited first!");
11202                 }
11203                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
11204                 return nativeResponseValue;
11205         }
11206         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
11207         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
11208                 if(!isWasmInitialized) {
11209                         throw new Error("initializeWasm() must be awaited first!");
11210                 }
11211                 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
11212                 return nativeResponseValue;
11213         }
11214         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
11215         export function InitFeatures_clone(orig: number): number {
11216                 if(!isWasmInitialized) {
11217                         throw new Error("initializeWasm() must be awaited first!");
11218                 }
11219                 const nativeResponseValue = wasm.InitFeatures_clone(orig);
11220                 return nativeResponseValue;
11221         }
11222         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
11223         export function NodeFeatures_clone(orig: number): number {
11224                 if(!isWasmInitialized) {
11225                         throw new Error("initializeWasm() must be awaited first!");
11226                 }
11227                 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
11228                 return nativeResponseValue;
11229         }
11230         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
11231         export function ChannelFeatures_clone(orig: number): number {
11232                 if(!isWasmInitialized) {
11233                         throw new Error("initializeWasm() must be awaited first!");
11234                 }
11235                 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
11236                 return nativeResponseValue;
11237         }
11238         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
11239         export function InvoiceFeatures_clone(orig: number): number {
11240                 if(!isWasmInitialized) {
11241                         throw new Error("initializeWasm() must be awaited first!");
11242                 }
11243                 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
11244                 return nativeResponseValue;
11245         }
11246         // void InitFeatures_free(struct LDKInitFeatures this_obj);
11247         export function InitFeatures_free(this_obj: number): void {
11248                 if(!isWasmInitialized) {
11249                         throw new Error("initializeWasm() must be awaited first!");
11250                 }
11251                 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
11252                 // debug statements here
11253         }
11254         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
11255         export function NodeFeatures_free(this_obj: number): void {
11256                 if(!isWasmInitialized) {
11257                         throw new Error("initializeWasm() must be awaited first!");
11258                 }
11259                 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
11260                 // debug statements here
11261         }
11262         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
11263         export function ChannelFeatures_free(this_obj: number): void {
11264                 if(!isWasmInitialized) {
11265                         throw new Error("initializeWasm() must be awaited first!");
11266                 }
11267                 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
11268                 // debug statements here
11269         }
11270         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
11271         export function InvoiceFeatures_free(this_obj: number): void {
11272                 if(!isWasmInitialized) {
11273                         throw new Error("initializeWasm() must be awaited first!");
11274                 }
11275                 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
11276                 // debug statements here
11277         }
11278         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
11279         export function InitFeatures_empty(): number {
11280                 if(!isWasmInitialized) {
11281                         throw new Error("initializeWasm() must be awaited first!");
11282                 }
11283                 const nativeResponseValue = wasm.InitFeatures_empty();
11284                 return nativeResponseValue;
11285         }
11286         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
11287         export function InitFeatures_known(): number {
11288                 if(!isWasmInitialized) {
11289                         throw new Error("initializeWasm() must be awaited first!");
11290                 }
11291                 const nativeResponseValue = wasm.InitFeatures_known();
11292                 return nativeResponseValue;
11293         }
11294         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
11295         export function NodeFeatures_empty(): number {
11296                 if(!isWasmInitialized) {
11297                         throw new Error("initializeWasm() must be awaited first!");
11298                 }
11299                 const nativeResponseValue = wasm.NodeFeatures_empty();
11300                 return nativeResponseValue;
11301         }
11302         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
11303         export function NodeFeatures_known(): number {
11304                 if(!isWasmInitialized) {
11305                         throw new Error("initializeWasm() must be awaited first!");
11306                 }
11307                 const nativeResponseValue = wasm.NodeFeatures_known();
11308                 return nativeResponseValue;
11309         }
11310         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
11311         export function ChannelFeatures_empty(): number {
11312                 if(!isWasmInitialized) {
11313                         throw new Error("initializeWasm() must be awaited first!");
11314                 }
11315                 const nativeResponseValue = wasm.ChannelFeatures_empty();
11316                 return nativeResponseValue;
11317         }
11318         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
11319         export function ChannelFeatures_known(): number {
11320                 if(!isWasmInitialized) {
11321                         throw new Error("initializeWasm() must be awaited first!");
11322                 }
11323                 const nativeResponseValue = wasm.ChannelFeatures_known();
11324                 return nativeResponseValue;
11325         }
11326         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
11327         export function InvoiceFeatures_empty(): number {
11328                 if(!isWasmInitialized) {
11329                         throw new Error("initializeWasm() must be awaited first!");
11330                 }
11331                 const nativeResponseValue = wasm.InvoiceFeatures_empty();
11332                 return nativeResponseValue;
11333         }
11334         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
11335         export function InvoiceFeatures_known(): number {
11336                 if(!isWasmInitialized) {
11337                         throw new Error("initializeWasm() must be awaited first!");
11338                 }
11339                 const nativeResponseValue = wasm.InvoiceFeatures_known();
11340                 return nativeResponseValue;
11341         }
11342         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
11343         export function InitFeatures_write(obj: number): Uint8Array {
11344                 if(!isWasmInitialized) {
11345                         throw new Error("initializeWasm() must be awaited first!");
11346                 }
11347                 const nativeResponseValue = wasm.InitFeatures_write(obj);
11348                 return decodeArray(nativeResponseValue);
11349         }
11350         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
11351         export function NodeFeatures_write(obj: number): Uint8Array {
11352                 if(!isWasmInitialized) {
11353                         throw new Error("initializeWasm() must be awaited first!");
11354                 }
11355                 const nativeResponseValue = wasm.NodeFeatures_write(obj);
11356                 return decodeArray(nativeResponseValue);
11357         }
11358         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
11359         export function ChannelFeatures_write(obj: number): Uint8Array {
11360                 if(!isWasmInitialized) {
11361                         throw new Error("initializeWasm() must be awaited first!");
11362                 }
11363                 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
11364                 return decodeArray(nativeResponseValue);
11365         }
11366         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
11367         export function InvoiceFeatures_write(obj: number): Uint8Array {
11368                 if(!isWasmInitialized) {
11369                         throw new Error("initializeWasm() must be awaited first!");
11370                 }
11371                 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
11372                 return decodeArray(nativeResponseValue);
11373         }
11374         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
11375         export function InitFeatures_read(ser: Uint8Array): number {
11376                 if(!isWasmInitialized) {
11377                         throw new Error("initializeWasm() must be awaited first!");
11378                 }
11379                 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
11380                 return nativeResponseValue;
11381         }
11382         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
11383         export function NodeFeatures_read(ser: Uint8Array): number {
11384                 if(!isWasmInitialized) {
11385                         throw new Error("initializeWasm() must be awaited first!");
11386                 }
11387                 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
11388                 return nativeResponseValue;
11389         }
11390         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
11391         export function ChannelFeatures_read(ser: Uint8Array): number {
11392                 if(!isWasmInitialized) {
11393                         throw new Error("initializeWasm() must be awaited first!");
11394                 }
11395                 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
11396                 return nativeResponseValue;
11397         }
11398         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
11399         export function InvoiceFeatures_read(ser: Uint8Array): number {
11400                 if(!isWasmInitialized) {
11401                         throw new Error("initializeWasm() must be awaited first!");
11402                 }
11403                 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
11404                 return nativeResponseValue;
11405         }
11406         // void RouteHop_free(struct LDKRouteHop this_obj);
11407         export function RouteHop_free(this_obj: number): void {
11408                 if(!isWasmInitialized) {
11409                         throw new Error("initializeWasm() must be awaited first!");
11410                 }
11411                 const nativeResponseValue = wasm.RouteHop_free(this_obj);
11412                 // debug statements here
11413         }
11414         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11415         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
11416                 if(!isWasmInitialized) {
11417                         throw new Error("initializeWasm() must be awaited first!");
11418                 }
11419                 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
11420                 return decodeArray(nativeResponseValue);
11421         }
11422         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11423         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
11424                 if(!isWasmInitialized) {
11425                         throw new Error("initializeWasm() must be awaited first!");
11426                 }
11427                 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
11428                 // debug statements here
11429         }
11430         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11431         export function RouteHop_get_node_features(this_ptr: number): number {
11432                 if(!isWasmInitialized) {
11433                         throw new Error("initializeWasm() must be awaited first!");
11434                 }
11435                 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
11436                 return nativeResponseValue;
11437         }
11438         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
11439         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
11440                 if(!isWasmInitialized) {
11441                         throw new Error("initializeWasm() must be awaited first!");
11442                 }
11443                 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
11444                 // debug statements here
11445         }
11446         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11447         export function RouteHop_get_short_channel_id(this_ptr: number): number {
11448                 if(!isWasmInitialized) {
11449                         throw new Error("initializeWasm() must be awaited first!");
11450                 }
11451                 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
11452                 return nativeResponseValue;
11453         }
11454         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11455         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
11456                 if(!isWasmInitialized) {
11457                         throw new Error("initializeWasm() must be awaited first!");
11458                 }
11459                 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
11460                 // debug statements here
11461         }
11462         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11463         export function RouteHop_get_channel_features(this_ptr: number): number {
11464                 if(!isWasmInitialized) {
11465                         throw new Error("initializeWasm() must be awaited first!");
11466                 }
11467                 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
11468                 return nativeResponseValue;
11469         }
11470         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11471         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
11472                 if(!isWasmInitialized) {
11473                         throw new Error("initializeWasm() must be awaited first!");
11474                 }
11475                 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
11476                 // debug statements here
11477         }
11478         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11479         export function RouteHop_get_fee_msat(this_ptr: number): number {
11480                 if(!isWasmInitialized) {
11481                         throw new Error("initializeWasm() must be awaited first!");
11482                 }
11483                 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
11484                 return nativeResponseValue;
11485         }
11486         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11487         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
11488                 if(!isWasmInitialized) {
11489                         throw new Error("initializeWasm() must be awaited first!");
11490                 }
11491                 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
11492                 // debug statements here
11493         }
11494         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11495         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
11496                 if(!isWasmInitialized) {
11497                         throw new Error("initializeWasm() must be awaited first!");
11498                 }
11499                 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
11500                 return nativeResponseValue;
11501         }
11502         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
11503         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11504                 if(!isWasmInitialized) {
11505                         throw new Error("initializeWasm() must be awaited first!");
11506                 }
11507                 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
11508                 // debug statements here
11509         }
11510         // 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);
11511         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 {
11512                 if(!isWasmInitialized) {
11513                         throw new Error("initializeWasm() must be awaited first!");
11514                 }
11515                 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);
11516                 return nativeResponseValue;
11517         }
11518         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
11519         export function RouteHop_clone(orig: number): number {
11520                 if(!isWasmInitialized) {
11521                         throw new Error("initializeWasm() must be awaited first!");
11522                 }
11523                 const nativeResponseValue = wasm.RouteHop_clone(orig);
11524                 return nativeResponseValue;
11525         }
11526         // void Route_free(struct LDKRoute this_obj);
11527         export function Route_free(this_obj: number): void {
11528                 if(!isWasmInitialized) {
11529                         throw new Error("initializeWasm() must be awaited first!");
11530                 }
11531                 const nativeResponseValue = wasm.Route_free(this_obj);
11532                 // debug statements here
11533         }
11534         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
11535         export function Route_set_paths(this_ptr: number, val: number[][]): void {
11536                 if(!isWasmInitialized) {
11537                         throw new Error("initializeWasm() must be awaited first!");
11538                 }
11539                 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
11540                 // debug statements here
11541         }
11542         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
11543         export function Route_new(paths_arg: number[][]): number {
11544                 if(!isWasmInitialized) {
11545                         throw new Error("initializeWasm() must be awaited first!");
11546                 }
11547                 const nativeResponseValue = wasm.Route_new(paths_arg);
11548                 return nativeResponseValue;
11549         }
11550         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
11551         export function Route_clone(orig: number): number {
11552                 if(!isWasmInitialized) {
11553                         throw new Error("initializeWasm() must be awaited first!");
11554                 }
11555                 const nativeResponseValue = wasm.Route_clone(orig);
11556                 return nativeResponseValue;
11557         }
11558         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
11559         export function Route_write(obj: number): Uint8Array {
11560                 if(!isWasmInitialized) {
11561                         throw new Error("initializeWasm() must be awaited first!");
11562                 }
11563                 const nativeResponseValue = wasm.Route_write(obj);
11564                 return decodeArray(nativeResponseValue);
11565         }
11566         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
11567         export function Route_read(ser: Uint8Array): number {
11568                 if(!isWasmInitialized) {
11569                         throw new Error("initializeWasm() must be awaited first!");
11570                 }
11571                 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
11572                 return nativeResponseValue;
11573         }
11574         // void RouteHint_free(struct LDKRouteHint this_obj);
11575         export function RouteHint_free(this_obj: number): void {
11576                 if(!isWasmInitialized) {
11577                         throw new Error("initializeWasm() must be awaited first!");
11578                 }
11579                 const nativeResponseValue = wasm.RouteHint_free(this_obj);
11580                 // debug statements here
11581         }
11582         // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11583         export function RouteHint_get_src_node_id(this_ptr: number): Uint8Array {
11584                 if(!isWasmInitialized) {
11585                         throw new Error("initializeWasm() must be awaited first!");
11586                 }
11587                 const nativeResponseValue = wasm.RouteHint_get_src_node_id(this_ptr);
11588                 return decodeArray(nativeResponseValue);
11589         }
11590         // void RouteHint_set_src_node_id(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11591         export function RouteHint_set_src_node_id(this_ptr: number, val: Uint8Array): void {
11592                 if(!isWasmInitialized) {
11593                         throw new Error("initializeWasm() must be awaited first!");
11594                 }
11595                 const nativeResponseValue = wasm.RouteHint_set_src_node_id(this_ptr, encodeArray(val));
11596                 // debug statements here
11597         }
11598         // uint64_t RouteHint_get_short_channel_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11599         export function RouteHint_get_short_channel_id(this_ptr: number): number {
11600                 if(!isWasmInitialized) {
11601                         throw new Error("initializeWasm() must be awaited first!");
11602                 }
11603                 const nativeResponseValue = wasm.RouteHint_get_short_channel_id(this_ptr);
11604                 return nativeResponseValue;
11605         }
11606         // void RouteHint_set_short_channel_id(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
11607         export function RouteHint_set_short_channel_id(this_ptr: number, val: number): void {
11608                 if(!isWasmInitialized) {
11609                         throw new Error("initializeWasm() must be awaited first!");
11610                 }
11611                 const nativeResponseValue = wasm.RouteHint_set_short_channel_id(this_ptr, val);
11612                 // debug statements here
11613         }
11614         // struct LDKRoutingFees RouteHint_get_fees(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11615         export function RouteHint_get_fees(this_ptr: number): number {
11616                 if(!isWasmInitialized) {
11617                         throw new Error("initializeWasm() must be awaited first!");
11618                 }
11619                 const nativeResponseValue = wasm.RouteHint_get_fees(this_ptr);
11620                 return nativeResponseValue;
11621         }
11622         // void RouteHint_set_fees(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
11623         export function RouteHint_set_fees(this_ptr: number, val: number): void {
11624                 if(!isWasmInitialized) {
11625                         throw new Error("initializeWasm() must be awaited first!");
11626                 }
11627                 const nativeResponseValue = wasm.RouteHint_set_fees(this_ptr, val);
11628                 // debug statements here
11629         }
11630         // uint16_t RouteHint_get_cltv_expiry_delta(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11631         export function RouteHint_get_cltv_expiry_delta(this_ptr: number): number {
11632                 if(!isWasmInitialized) {
11633                         throw new Error("initializeWasm() must be awaited first!");
11634                 }
11635                 const nativeResponseValue = wasm.RouteHint_get_cltv_expiry_delta(this_ptr);
11636                 return nativeResponseValue;
11637         }
11638         // void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
11639         export function RouteHint_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11640                 if(!isWasmInitialized) {
11641                         throw new Error("initializeWasm() must be awaited first!");
11642                 }
11643                 const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
11644                 // debug statements here
11645         }
11646         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
11647         export function RouteHint_clone(orig: number): number {
11648                 if(!isWasmInitialized) {
11649                         throw new Error("initializeWasm() must be awaited first!");
11650                 }
11651                 const nativeResponseValue = wasm.RouteHint_clone(orig);
11652                 return nativeResponseValue;
11653         }
11654         // 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);
11655         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 {
11656                 if(!isWasmInitialized) {
11657                         throw new Error("initializeWasm() must be awaited first!");
11658                 }
11659                 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger);
11660                 return nativeResponseValue;
11661         }
11662         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
11663         export function NetworkGraph_free(this_obj: number): void {
11664                 if(!isWasmInitialized) {
11665                         throw new Error("initializeWasm() must be awaited first!");
11666                 }
11667                 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
11668                 // debug statements here
11669         }
11670         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
11671         export function NetworkGraph_clone(orig: number): number {
11672                 if(!isWasmInitialized) {
11673                         throw new Error("initializeWasm() must be awaited first!");
11674                 }
11675                 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
11676                 return nativeResponseValue;
11677         }
11678         // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_obj);
11679         export function LockedNetworkGraph_free(this_obj: number): void {
11680                 if(!isWasmInitialized) {
11681                         throw new Error("initializeWasm() must be awaited first!");
11682                 }
11683                 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_obj);
11684                 // debug statements here
11685         }
11686         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
11687         export function NetGraphMsgHandler_free(this_obj: number): void {
11688                 if(!isWasmInitialized) {
11689                         throw new Error("initializeWasm() must be awaited first!");
11690                 }
11691                 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
11692                 // debug statements here
11693         }
11694         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
11695         export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
11696                 if(!isWasmInitialized) {
11697                         throw new Error("initializeWasm() must be awaited first!");
11698                 }
11699                 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
11700                 return nativeResponseValue;
11701         }
11702         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
11703         export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
11704                 if(!isWasmInitialized) {
11705                         throw new Error("initializeWasm() must be awaited first!");
11706                 }
11707                 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
11708                 return nativeResponseValue;
11709         }
11710         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
11711         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
11712                 if(!isWasmInitialized) {
11713                         throw new Error("initializeWasm() must be awaited first!");
11714                 }
11715                 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
11716                 // debug statements here
11717         }
11718         // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11719         export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
11720                 if(!isWasmInitialized) {
11721                         throw new Error("initializeWasm() must be awaited first!");
11722                 }
11723                 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
11724                 return nativeResponseValue;
11725         }
11726         // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
11727         export function LockedNetworkGraph_graph(this_arg: number): number {
11728                 if(!isWasmInitialized) {
11729                         throw new Error("initializeWasm() must be awaited first!");
11730                 }
11731                 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
11732                 return nativeResponseValue;
11733         }
11734         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11735         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
11736                 if(!isWasmInitialized) {
11737                         throw new Error("initializeWasm() must be awaited first!");
11738                 }
11739                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
11740                 return nativeResponseValue;
11741         }
11742         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11743         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
11744                 if(!isWasmInitialized) {
11745                         throw new Error("initializeWasm() must be awaited first!");
11746                 }
11747                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
11748                 return nativeResponseValue;
11749         }
11750         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
11751         export function DirectionalChannelInfo_free(this_obj: number): void {
11752                 if(!isWasmInitialized) {
11753                         throw new Error("initializeWasm() must be awaited first!");
11754                 }
11755                 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
11756                 // debug statements here
11757         }
11758         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11759         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
11760                 if(!isWasmInitialized) {
11761                         throw new Error("initializeWasm() must be awaited first!");
11762                 }
11763                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
11764                 return nativeResponseValue;
11765         }
11766         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
11767         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
11768                 if(!isWasmInitialized) {
11769                         throw new Error("initializeWasm() must be awaited first!");
11770                 }
11771                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
11772                 // debug statements here
11773         }
11774         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11775         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
11776                 if(!isWasmInitialized) {
11777                         throw new Error("initializeWasm() must be awaited first!");
11778                 }
11779                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
11780                 return nativeResponseValue;
11781         }
11782         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
11783         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
11784                 if(!isWasmInitialized) {
11785                         throw new Error("initializeWasm() must be awaited first!");
11786                 }
11787                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
11788                 // debug statements here
11789         }
11790         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11791         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
11792                 if(!isWasmInitialized) {
11793                         throw new Error("initializeWasm() must be awaited first!");
11794                 }
11795                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
11796                 return nativeResponseValue;
11797         }
11798         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
11799         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11800                 if(!isWasmInitialized) {
11801                         throw new Error("initializeWasm() must be awaited first!");
11802                 }
11803                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
11804                 // debug statements here
11805         }
11806         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11807         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
11808                 if(!isWasmInitialized) {
11809                         throw new Error("initializeWasm() must be awaited first!");
11810                 }
11811                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
11812                 return nativeResponseValue;
11813         }
11814         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
11815         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
11816                 if(!isWasmInitialized) {
11817                         throw new Error("initializeWasm() must be awaited first!");
11818                 }
11819                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
11820                 // debug statements here
11821         }
11822         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11823         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
11824                 if(!isWasmInitialized) {
11825                         throw new Error("initializeWasm() must be awaited first!");
11826                 }
11827                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
11828                 return nativeResponseValue;
11829         }
11830         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
11831         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
11832                 if(!isWasmInitialized) {
11833                         throw new Error("initializeWasm() must be awaited first!");
11834                 }
11835                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
11836                 // debug statements here
11837         }
11838         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11839         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
11840                 if(!isWasmInitialized) {
11841                         throw new Error("initializeWasm() must be awaited first!");
11842                 }
11843                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
11844                 return nativeResponseValue;
11845         }
11846         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
11847         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
11848                 if(!isWasmInitialized) {
11849                         throw new Error("initializeWasm() must be awaited first!");
11850                 }
11851                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
11852                 // debug statements here
11853         }
11854         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
11855         export function DirectionalChannelInfo_clone(orig: number): number {
11856                 if(!isWasmInitialized) {
11857                         throw new Error("initializeWasm() must be awaited first!");
11858                 }
11859                 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
11860                 return nativeResponseValue;
11861         }
11862         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
11863         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
11864                 if(!isWasmInitialized) {
11865                         throw new Error("initializeWasm() must be awaited first!");
11866                 }
11867                 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
11868                 return decodeArray(nativeResponseValue);
11869         }
11870         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
11871         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
11872                 if(!isWasmInitialized) {
11873                         throw new Error("initializeWasm() must be awaited first!");
11874                 }
11875                 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
11876                 return nativeResponseValue;
11877         }
11878         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
11879         export function ChannelInfo_free(this_obj: number): void {
11880                 if(!isWasmInitialized) {
11881                         throw new Error("initializeWasm() must be awaited first!");
11882                 }
11883                 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
11884                 // debug statements here
11885         }
11886         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11887         export function ChannelInfo_get_features(this_ptr: number): number {
11888                 if(!isWasmInitialized) {
11889                         throw new Error("initializeWasm() must be awaited first!");
11890                 }
11891                 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
11892                 return nativeResponseValue;
11893         }
11894         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11895         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
11896                 if(!isWasmInitialized) {
11897                         throw new Error("initializeWasm() must be awaited first!");
11898                 }
11899                 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
11900                 // debug statements here
11901         }
11902         // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11903         export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
11904                 if(!isWasmInitialized) {
11905                         throw new Error("initializeWasm() must be awaited first!");
11906                 }
11907                 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
11908                 return decodeArray(nativeResponseValue);
11909         }
11910         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11911         export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
11912                 if(!isWasmInitialized) {
11913                         throw new Error("initializeWasm() must be awaited first!");
11914                 }
11915                 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
11916                 // debug statements here
11917         }
11918         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11919         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
11920                 if(!isWasmInitialized) {
11921                         throw new Error("initializeWasm() must be awaited first!");
11922                 }
11923                 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
11924                 return nativeResponseValue;
11925         }
11926         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
11927         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
11928                 if(!isWasmInitialized) {
11929                         throw new Error("initializeWasm() must be awaited first!");
11930                 }
11931                 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
11932                 // debug statements here
11933         }
11934         // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11935         export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
11936                 if(!isWasmInitialized) {
11937                         throw new Error("initializeWasm() must be awaited first!");
11938                 }
11939                 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
11940                 return decodeArray(nativeResponseValue);
11941         }
11942         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11943         export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
11944                 if(!isWasmInitialized) {
11945                         throw new Error("initializeWasm() must be awaited first!");
11946                 }
11947                 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
11948                 // debug statements here
11949         }
11950         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11951         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
11952                 if(!isWasmInitialized) {
11953                         throw new Error("initializeWasm() must be awaited first!");
11954                 }
11955                 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
11956                 return nativeResponseValue;
11957         }
11958         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
11959         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
11960                 if(!isWasmInitialized) {
11961                         throw new Error("initializeWasm() must be awaited first!");
11962                 }
11963                 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
11964                 // debug statements here
11965         }
11966         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11967         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
11968                 if(!isWasmInitialized) {
11969                         throw new Error("initializeWasm() must be awaited first!");
11970                 }
11971                 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
11972                 return nativeResponseValue;
11973         }
11974         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
11975         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
11976                 if(!isWasmInitialized) {
11977                         throw new Error("initializeWasm() must be awaited first!");
11978                 }
11979                 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
11980                 // debug statements here
11981         }
11982         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
11983         export function ChannelInfo_clone(orig: number): number {
11984                 if(!isWasmInitialized) {
11985                         throw new Error("initializeWasm() must be awaited first!");
11986                 }
11987                 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
11988                 return nativeResponseValue;
11989         }
11990         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
11991         export function ChannelInfo_write(obj: number): Uint8Array {
11992                 if(!isWasmInitialized) {
11993                         throw new Error("initializeWasm() must be awaited first!");
11994                 }
11995                 const nativeResponseValue = wasm.ChannelInfo_write(obj);
11996                 return decodeArray(nativeResponseValue);
11997         }
11998         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
11999         export function ChannelInfo_read(ser: Uint8Array): number {
12000                 if(!isWasmInitialized) {
12001                         throw new Error("initializeWasm() must be awaited first!");
12002                 }
12003                 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
12004                 return nativeResponseValue;
12005         }
12006         // void RoutingFees_free(struct LDKRoutingFees this_obj);
12007         export function RoutingFees_free(this_obj: number): void {
12008                 if(!isWasmInitialized) {
12009                         throw new Error("initializeWasm() must be awaited first!");
12010                 }
12011                 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
12012                 // debug statements here
12013         }
12014         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
12015         export function RoutingFees_get_base_msat(this_ptr: number): number {
12016                 if(!isWasmInitialized) {
12017                         throw new Error("initializeWasm() must be awaited first!");
12018                 }
12019                 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
12020                 return nativeResponseValue;
12021         }
12022         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
12023         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
12024                 if(!isWasmInitialized) {
12025                         throw new Error("initializeWasm() must be awaited first!");
12026                 }
12027                 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
12028                 // debug statements here
12029         }
12030         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
12031         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
12032                 if(!isWasmInitialized) {
12033                         throw new Error("initializeWasm() must be awaited first!");
12034                 }
12035                 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
12036                 return nativeResponseValue;
12037         }
12038         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
12039         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
12040                 if(!isWasmInitialized) {
12041                         throw new Error("initializeWasm() must be awaited first!");
12042                 }
12043                 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
12044                 // debug statements here
12045         }
12046         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
12047         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
12048                 if(!isWasmInitialized) {
12049                         throw new Error("initializeWasm() must be awaited first!");
12050                 }
12051                 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
12052                 return nativeResponseValue;
12053         }
12054         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
12055         export function RoutingFees_clone(orig: number): number {
12056                 if(!isWasmInitialized) {
12057                         throw new Error("initializeWasm() must be awaited first!");
12058                 }
12059                 const nativeResponseValue = wasm.RoutingFees_clone(orig);
12060                 return nativeResponseValue;
12061         }
12062         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
12063         export function RoutingFees_read(ser: Uint8Array): number {
12064                 if(!isWasmInitialized) {
12065                         throw new Error("initializeWasm() must be awaited first!");
12066                 }
12067                 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
12068                 return nativeResponseValue;
12069         }
12070         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
12071         export function RoutingFees_write(obj: number): Uint8Array {
12072                 if(!isWasmInitialized) {
12073                         throw new Error("initializeWasm() must be awaited first!");
12074                 }
12075                 const nativeResponseValue = wasm.RoutingFees_write(obj);
12076                 return decodeArray(nativeResponseValue);
12077         }
12078         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
12079         export function NodeAnnouncementInfo_free(this_obj: number): void {
12080                 if(!isWasmInitialized) {
12081                         throw new Error("initializeWasm() must be awaited first!");
12082                 }
12083                 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
12084                 // debug statements here
12085         }
12086         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12087         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
12088                 if(!isWasmInitialized) {
12089                         throw new Error("initializeWasm() must be awaited first!");
12090                 }
12091                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
12092                 return nativeResponseValue;
12093         }
12094         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
12095         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
12096                 if(!isWasmInitialized) {
12097                         throw new Error("initializeWasm() must be awaited first!");
12098                 }
12099                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
12100                 // debug statements here
12101         }
12102         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12103         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
12104                 if(!isWasmInitialized) {
12105                         throw new Error("initializeWasm() must be awaited first!");
12106                 }
12107                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
12108                 return nativeResponseValue;
12109         }
12110         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
12111         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
12112                 if(!isWasmInitialized) {
12113                         throw new Error("initializeWasm() must be awaited first!");
12114                 }
12115                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
12116                 // debug statements here
12117         }
12118         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
12119         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
12120                 if(!isWasmInitialized) {
12121                         throw new Error("initializeWasm() must be awaited first!");
12122                 }
12123                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
12124                 return decodeArray(nativeResponseValue);
12125         }
12126         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
12127         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
12128                 if(!isWasmInitialized) {
12129                         throw new Error("initializeWasm() must be awaited first!");
12130                 }
12131                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
12132                 // debug statements here
12133         }
12134         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
12135         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
12136                 if(!isWasmInitialized) {
12137                         throw new Error("initializeWasm() must be awaited first!");
12138                 }
12139                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
12140                 return decodeArray(nativeResponseValue);
12141         }
12142         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12143         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
12144                 if(!isWasmInitialized) {
12145                         throw new Error("initializeWasm() must be awaited first!");
12146                 }
12147                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
12148                 // debug statements here
12149         }
12150         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
12151         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
12152                 if(!isWasmInitialized) {
12153                         throw new Error("initializeWasm() must be awaited first!");
12154                 }
12155                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
12156                 // debug statements here
12157         }
12158         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12159         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
12160                 if(!isWasmInitialized) {
12161                         throw new Error("initializeWasm() must be awaited first!");
12162                 }
12163                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
12164                 return nativeResponseValue;
12165         }
12166         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
12167         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
12168                 if(!isWasmInitialized) {
12169                         throw new Error("initializeWasm() must be awaited first!");
12170                 }
12171                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
12172                 // debug statements here
12173         }
12174         // 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);
12175         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 {
12176                 if(!isWasmInitialized) {
12177                         throw new Error("initializeWasm() must be awaited first!");
12178                 }
12179                 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
12180                 return nativeResponseValue;
12181         }
12182         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
12183         export function NodeAnnouncementInfo_clone(orig: number): number {
12184                 if(!isWasmInitialized) {
12185                         throw new Error("initializeWasm() must be awaited first!");
12186                 }
12187                 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
12188                 return nativeResponseValue;
12189         }
12190         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
12191         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
12192                 if(!isWasmInitialized) {
12193                         throw new Error("initializeWasm() must be awaited first!");
12194                 }
12195                 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
12196                 return decodeArray(nativeResponseValue);
12197         }
12198         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
12199         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
12200                 if(!isWasmInitialized) {
12201                         throw new Error("initializeWasm() must be awaited first!");
12202                 }
12203                 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
12204                 return nativeResponseValue;
12205         }
12206         // void NodeInfo_free(struct LDKNodeInfo this_obj);
12207         export function NodeInfo_free(this_obj: number): void {
12208                 if(!isWasmInitialized) {
12209                         throw new Error("initializeWasm() must be awaited first!");
12210                 }
12211                 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
12212                 // debug statements here
12213         }
12214         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12215         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
12216                 if(!isWasmInitialized) {
12217                         throw new Error("initializeWasm() must be awaited first!");
12218                 }
12219                 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
12220                 // debug statements here
12221         }
12222         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12223         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
12224                 if(!isWasmInitialized) {
12225                         throw new Error("initializeWasm() must be awaited first!");
12226                 }
12227                 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
12228                 return nativeResponseValue;
12229         }
12230         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
12231         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
12232                 if(!isWasmInitialized) {
12233                         throw new Error("initializeWasm() must be awaited first!");
12234                 }
12235                 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
12236                 // debug statements here
12237         }
12238         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12239         export function NodeInfo_get_announcement_info(this_ptr: number): number {
12240                 if(!isWasmInitialized) {
12241                         throw new Error("initializeWasm() must be awaited first!");
12242                 }
12243                 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
12244                 return nativeResponseValue;
12245         }
12246         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
12247         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
12248                 if(!isWasmInitialized) {
12249                         throw new Error("initializeWasm() must be awaited first!");
12250                 }
12251                 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
12252                 // debug statements here
12253         }
12254         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
12255         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
12256                 if(!isWasmInitialized) {
12257                         throw new Error("initializeWasm() must be awaited first!");
12258                 }
12259                 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
12260                 return nativeResponseValue;
12261         }
12262         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
12263         export function NodeInfo_clone(orig: number): number {
12264                 if(!isWasmInitialized) {
12265                         throw new Error("initializeWasm() must be awaited first!");
12266                 }
12267                 const nativeResponseValue = wasm.NodeInfo_clone(orig);
12268                 return nativeResponseValue;
12269         }
12270         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
12271         export function NodeInfo_write(obj: number): Uint8Array {
12272                 if(!isWasmInitialized) {
12273                         throw new Error("initializeWasm() must be awaited first!");
12274                 }
12275                 const nativeResponseValue = wasm.NodeInfo_write(obj);
12276                 return decodeArray(nativeResponseValue);
12277         }
12278         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
12279         export function NodeInfo_read(ser: Uint8Array): number {
12280                 if(!isWasmInitialized) {
12281                         throw new Error("initializeWasm() must be awaited first!");
12282                 }
12283                 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
12284                 return nativeResponseValue;
12285         }
12286         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
12287         export function NetworkGraph_write(obj: number): Uint8Array {
12288                 if(!isWasmInitialized) {
12289                         throw new Error("initializeWasm() must be awaited first!");
12290                 }
12291                 const nativeResponseValue = wasm.NetworkGraph_write(obj);
12292                 return decodeArray(nativeResponseValue);
12293         }
12294         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
12295         export function NetworkGraph_read(ser: Uint8Array): number {
12296                 if(!isWasmInitialized) {
12297                         throw new Error("initializeWasm() must be awaited first!");
12298                 }
12299                 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
12300                 return nativeResponseValue;
12301         }
12302         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
12303         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
12304                 if(!isWasmInitialized) {
12305                         throw new Error("initializeWasm() must be awaited first!");
12306                 }
12307                 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
12308                 return nativeResponseValue;
12309         }
12310         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
12311         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
12312                 if(!isWasmInitialized) {
12313                         throw new Error("initializeWasm() must be awaited first!");
12314                 }
12315                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
12316                 return nativeResponseValue;
12317         }
12318         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
12319         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
12320                 if(!isWasmInitialized) {
12321                         throw new Error("initializeWasm() must be awaited first!");
12322                 }
12323                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
12324                 return nativeResponseValue;
12325         }
12326         // 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);
12327         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
12328                 if(!isWasmInitialized) {
12329                         throw new Error("initializeWasm() must be awaited first!");
12330                 }
12331                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
12332                 return nativeResponseValue;
12333         }
12334         // 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);
12335         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
12336                 if(!isWasmInitialized) {
12337                         throw new Error("initializeWasm() must be awaited first!");
12338                 }
12339                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
12340                 return nativeResponseValue;
12341         }
12342         // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
12343         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
12344                 if(!isWasmInitialized) {
12345                         throw new Error("initializeWasm() must be awaited first!");
12346                 }
12347                 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
12348                 // debug statements here
12349         }
12350         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
12351         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
12352                 if(!isWasmInitialized) {
12353                         throw new Error("initializeWasm() must be awaited first!");
12354                 }
12355                 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
12356                 return nativeResponseValue;
12357         }
12358         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
12359         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
12360                 if(!isWasmInitialized) {
12361                         throw new Error("initializeWasm() must be awaited first!");
12362                 }
12363                 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
12364                 return nativeResponseValue;
12365         }
12366
12367         export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
12368             if(isWasmInitialized && !allowDoubleInitialization) {
12369                 return;
12370             }
12371             const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
12372             wasm = wasmInstance.exports;
12373             isWasmInitialized = true;
12374         }
12375