Add license information
[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                 static native void init();
321         }
322         static { LDKMessageSendEvent.init(); }
323         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
324         public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
325         public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
326         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
327         public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
328         public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
329         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
330         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
331         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
332         public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
333         public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
334         public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
335         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
336         public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
337         public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
338         public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
339         public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
340         public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
341         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
342         public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
343         public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
344         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
345         public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
346         public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
347         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
348         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
349         public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
350         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
351         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
352         public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
353         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
354         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
355         public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
356         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
357         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
358         public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
359         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
360         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
361         public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
362         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
363         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
364         public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
365         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
366         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
367         public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
368         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
369         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
370         public static class LDKNetAddress {
371                 private LDKNetAddress() {}
372                 export class IPv4 extends LDKNetAddress {
373                         public Uint8Array addr;
374                         public number port;
375                         IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
376                 }
377                 export class IPv6 extends LDKNetAddress {
378                         public Uint8Array addr;
379                         public number port;
380                         IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
381                 }
382                 export class OnionV2 extends LDKNetAddress {
383                         public Uint8Array addr;
384                         public number port;
385                         OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
386                 }
387                 export class OnionV3 extends LDKNetAddress {
388                         public Uint8Array ed25519_pubkey;
389                         public number checksum;
390                         public number version;
391                         public number port;
392                         OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
393                 }
394                 static native void init();
395         }
396         static { LDKNetAddress.init(); }
397         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
398         public static native long LDKCVec_NetAddressZ_new(number[] elems);
399         public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
400         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
401         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
402         public static native long LDKCVec_u64Z_new(number[] elems);
403         public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
404         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
405         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
406         public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
407         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
408         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
409         public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
410         public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
411         public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
412         public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
413         public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
414         public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
415         public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
416         public static class LDKMonitorEvent {
417                 private LDKMonitorEvent() {}
418                 export class HTLCEvent extends LDKMonitorEvent {
419                         HTLCEvent() { }
420                 }
421                 export class CommitmentTxBroadcasted extends LDKMonitorEvent {
422                         CommitmentTxBroadcasted() { }
423                 }
424                 static native void init();
425         }
426         static { LDKMonitorEvent.init(); }
427         public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
428         public static native long LDKCVec_MonitorEventZ_new(number[] elems);
429         public static class LDKSpendableOutputDescriptor {
430                 private LDKSpendableOutputDescriptor() {}
431                 export class StaticOutput extends LDKSpendableOutputDescriptor {
432                         public number outpoint;
433                         public number output;
434                         StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
435                 }
436                 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
437                         DelayedPaymentOutput() { }
438                 }
439                 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
440                         StaticPaymentOutput() { }
441                 }
442                 static native void init();
443         }
444         static { LDKSpendableOutputDescriptor.init(); }
445         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
446         public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
447         public static class LDKEvent {
448                 private LDKEvent() {}
449                 export class FundingGenerationReady extends LDKEvent {
450                         public Uint8Array temporary_channel_id;
451                         public number channel_value_satoshis;
452                         public Uint8Array output_script;
453                         public number user_channel_id;
454                         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; }
455                 }
456                 export class FundingBroadcastSafe extends LDKEvent {
457                         public number funding_txo;
458                         public number user_channel_id;
459                         FundingBroadcastSafe(number funding_txo, number user_channel_id) { this.funding_txo = funding_txo; this.user_channel_id = user_channel_id; }
460                 }
461                 export class PaymentReceived extends LDKEvent {
462                         public Uint8Array payment_hash;
463                         public Uint8Array payment_secret;
464                         public number amt;
465                         PaymentReceived(Uint8Array payment_hash, Uint8Array payment_secret, number amt) { this.payment_hash = payment_hash; this.payment_secret = payment_secret; this.amt = amt; }
466                 }
467                 export class PaymentSent extends LDKEvent {
468                         public Uint8Array payment_preimage;
469                         PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
470                 }
471                 export class PaymentFailed extends LDKEvent {
472                         public Uint8Array payment_hash;
473                         public boolean rejected_by_dest;
474                         PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
475                 }
476                 export class PendingHTLCsForwardable extends LDKEvent {
477                         public number time_forwardable;
478                         PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
479                 }
480                 export class SpendableOutputs extends LDKEvent {
481                         public number[] outputs;
482                         SpendableOutputs(number[] outputs) { this.outputs = outputs; }
483                 }
484                 static native void init();
485         }
486         static { LDKEvent.init(); }
487         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
488         public static native long LDKCVec_EventZ_new(number[] elems);
489         public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
490         public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
491         public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
492         public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
493         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
494         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
495         public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
496         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
497         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
498         public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
499         public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
500         public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
501         public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
502         public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
503         public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
504         public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
505         public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
506         public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
507         public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
508         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
509         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
510         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
511         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
512         public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
513         public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
514         public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
515         public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
516         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
517         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
518         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
519         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
520         public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
521         public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
522         public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
523         public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
524         public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
525         public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
526         public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
527         public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
528         public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
529
530
531
532 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
533
534                 export interface LDKSign {
535                         get_per_commitment_point (idx: number): Uint8Array;
536                         release_commitment_secret (idx: number): Uint8Array;
537                         channel_keys_id (): Uint8Array;
538                         sign_counterparty_commitment (commitment_tx: number): number;
539                         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
540                         sign_justice_transaction (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
541                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
542                         sign_closing_transaction (closing_tx: Uint8Array): number;
543                         sign_channel_announcement (msg: number): number;
544                         ready_channel (channel_parameters: number): void;
545                         write (): Uint8Array;
546                 }
547
548                 export function LDKSign_new(impl: LDKSign, pubkeys: number): number {
549             throw new Error('unimplemented'); // TODO: bind to WASM
550         }
551
552 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
553
554
555         // LDKPublicKey Sign_get_per_commitment_point LDKSign *NONNULL_PTR this_arg, uint64_t idx
556         export function Sign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
557                 if(!isWasmInitialized) {
558                         throw new Error("initializeWasm() must be awaited first!");
559                 }
560                 const nativeResponseValue = wasm.Sign_get_per_commitment_point(this_arg, idx);
561                 return decodeArray(nativeResponseValue);
562         }
563         // LDKThirtyTwoBytes Sign_release_commitment_secret LDKSign *NONNULL_PTR this_arg, uint64_t idx
564         export function Sign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
565                 if(!isWasmInitialized) {
566                         throw new Error("initializeWasm() must be awaited first!");
567                 }
568                 const nativeResponseValue = wasm.Sign_release_commitment_secret(this_arg, idx);
569                 return decodeArray(nativeResponseValue);
570         }
571         // LDKThirtyTwoBytes Sign_channel_keys_id LDKSign *NONNULL_PTR this_arg
572         export function Sign_channel_keys_id(this_arg: number): Uint8Array {
573                 if(!isWasmInitialized) {
574                         throw new Error("initializeWasm() must be awaited first!");
575                 }
576                 const nativeResponseValue = wasm.Sign_channel_keys_id(this_arg);
577                 return decodeArray(nativeResponseValue);
578         }
579         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_counterparty_commitment LDKSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
580         export function Sign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
581                 if(!isWasmInitialized) {
582                         throw new Error("initializeWasm() must be awaited first!");
583                 }
584                 const nativeResponseValue = wasm.Sign_sign_counterparty_commitment(this_arg, commitment_tx);
585                 return nativeResponseValue;
586         }
587         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_holder_commitment_and_htlcs LDKSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
588         export function Sign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
589                 if(!isWasmInitialized) {
590                         throw new Error("initializeWasm() must be awaited first!");
591                 }
592                 const nativeResponseValue = wasm.Sign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
593                 return nativeResponseValue;
594         }
595         // 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
596         export function Sign_sign_justice_transaction(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
597                 if(!isWasmInitialized) {
598                         throw new Error("initializeWasm() must be awaited first!");
599                 }
600                 const nativeResponseValue = wasm.Sign_sign_justice_transaction(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
601                 return nativeResponseValue;
602         }
603         // 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
604         export function Sign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
605                 if(!isWasmInitialized) {
606                         throw new Error("initializeWasm() must be awaited first!");
607                 }
608                 const nativeResponseValue = wasm.Sign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
609                 return nativeResponseValue;
610         }
611         // LDKCResult_SignatureNoneZ Sign_sign_closing_transaction LDKSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
612         export function Sign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
613                 if(!isWasmInitialized) {
614                         throw new Error("initializeWasm() must be awaited first!");
615                 }
616                 const nativeResponseValue = wasm.Sign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
617                 return nativeResponseValue;
618         }
619         // LDKCResult_SignatureNoneZ Sign_sign_channel_announcement LDKSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
620         export function Sign_sign_channel_announcement(this_arg: number, msg: number): number {
621                 if(!isWasmInitialized) {
622                         throw new Error("initializeWasm() must be awaited first!");
623                 }
624                 const nativeResponseValue = wasm.Sign_sign_channel_announcement(this_arg, msg);
625                 return nativeResponseValue;
626         }
627         // void Sign_ready_channel LDKSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
628         export function Sign_ready_channel(this_arg: number, channel_parameters: number): void {
629                 if(!isWasmInitialized) {
630                         throw new Error("initializeWasm() must be awaited first!");
631                 }
632                 const nativeResponseValue = wasm.Sign_ready_channel(this_arg, channel_parameters);
633                 // debug statements here
634         }
635         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
636         export function Sign_write(this_arg: number): Uint8Array {
637                 if(!isWasmInitialized) {
638                         throw new Error("initializeWasm() must be awaited first!");
639                 }
640                 const nativeResponseValue = wasm.Sign_write(this_arg);
641                 return decodeArray(nativeResponseValue);
642         }
643         // LDKChannelPublicKeys Sign_get_pubkeys LDKSign *NONNULL_PTR this_arg
644         export function Sign_get_pubkeys(this_arg: number): number {
645                 if(!isWasmInitialized) {
646                         throw new Error("initializeWasm() must be awaited first!");
647                 }
648                 const nativeResponseValue = wasm.Sign_get_pubkeys(this_arg);
649                 return nativeResponseValue;
650         }
651         public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
652         public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
653         public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
654         public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
655         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
656         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
657         public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
658         public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
659         public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
660         public static class LDKAPIError {
661                 private LDKAPIError() {}
662                 export class APIMisuseError extends LDKAPIError {
663                         public Uint8Array err;
664                         APIMisuseError(Uint8Array err) { this.err = err; }
665                 }
666                 export class FeeRateTooHigh extends LDKAPIError {
667                         public Uint8Array err;
668                         public number feerate;
669                         FeeRateTooHigh(Uint8Array err, number feerate) { this.err = err; this.feerate = feerate; }
670                 }
671                 export class RouteError extends LDKAPIError {
672                         public String err;
673                         RouteError(String err) { this.err = err; }
674                 }
675                 export class ChannelUnavailable extends LDKAPIError {
676                         public Uint8Array err;
677                         ChannelUnavailable(Uint8Array err) { this.err = err; }
678                 }
679                 export class MonitorUpdateFailed extends LDKAPIError {
680                         MonitorUpdateFailed() { }
681                 }
682                 static native void init();
683         }
684         static { LDKAPIError.init(); }
685         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
686         public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
687         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
688         public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
689         public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
690         public static native long LDKCVec_APIErrorZ_new(number[] elems);
691         public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
692         public static class LDKPaymentSendFailure {
693                 private LDKPaymentSendFailure() {}
694                 export class ParameterError extends LDKPaymentSendFailure {
695                         ParameterError() { }
696                 }
697                 export class PathParameterError extends LDKPaymentSendFailure {
698                         PathParameterError() { }
699                 }
700                 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
701                         AllFailedRetrySafe() { }
702                 }
703                 export class PartialFailure extends LDKPaymentSendFailure {
704                         PartialFailure() { }
705                 }
706                 static native void init();
707         }
708         static { LDKPaymentSendFailure.init(); }
709         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
710         public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
711         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
712         public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
713         public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
714
715
716
717 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
718
719                 export interface LDKWatch {
720                         watch_channel (funding_txo: number, monitor: number): number;
721                         update_channel (funding_txo: number, update: number): number;
722                         release_pending_monitor_events (): number[];
723                 }
724
725                 export function LDKWatch_new(impl: LDKWatch): number {
726             throw new Error('unimplemented'); // TODO: bind to WASM
727         }
728
729 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
730
731
732         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
733         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
734                 if(!isWasmInitialized) {
735                         throw new Error("initializeWasm() must be awaited first!");
736                 }
737                 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
738                 return nativeResponseValue;
739         }
740         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
741         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
742                 if(!isWasmInitialized) {
743                         throw new Error("initializeWasm() must be awaited first!");
744                 }
745                 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
746                 return nativeResponseValue;
747         }
748         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
749         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
750                 if(!isWasmInitialized) {
751                         throw new Error("initializeWasm() must be awaited first!");
752                 }
753                 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
754                 return nativeResponseValue;
755         }
756
757
758
759 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
760
761                 export interface LDKBroadcasterInterface {
762                         broadcast_transaction (tx: Uint8Array): void;
763                 }
764
765                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
766             throw new Error('unimplemented'); // TODO: bind to WASM
767         }
768
769 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
770
771
772         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
773         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
774                 if(!isWasmInitialized) {
775                         throw new Error("initializeWasm() must be awaited first!");
776                 }
777                 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
778                 // debug statements here
779         }
780         public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
781         public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
782         public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
783
784
785
786 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
787
788                 export interface LDKKeysInterface {
789                         get_node_secret (): Uint8Array;
790                         get_destination_script (): Uint8Array;
791                         get_shutdown_pubkey (): Uint8Array;
792                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
793                         get_secure_random_bytes (): Uint8Array;
794                         read_chan_signer (reader: Uint8Array): number;
795                 }
796
797                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
798             throw new Error('unimplemented'); // TODO: bind to WASM
799         }
800
801 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
802
803
804         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
805         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
806                 if(!isWasmInitialized) {
807                         throw new Error("initializeWasm() must be awaited first!");
808                 }
809                 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
810                 return decodeArray(nativeResponseValue);
811         }
812         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
813         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
814                 if(!isWasmInitialized) {
815                         throw new Error("initializeWasm() must be awaited first!");
816                 }
817                 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
818                 return decodeArray(nativeResponseValue);
819         }
820         // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
821         export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
822                 if(!isWasmInitialized) {
823                         throw new Error("initializeWasm() must be awaited first!");
824                 }
825                 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
826                 return decodeArray(nativeResponseValue);
827         }
828         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
829         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
830                 if(!isWasmInitialized) {
831                         throw new Error("initializeWasm() must be awaited first!");
832                 }
833                 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
834                 return nativeResponseValue;
835         }
836         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
837         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
838                 if(!isWasmInitialized) {
839                         throw new Error("initializeWasm() must be awaited first!");
840                 }
841                 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
842                 return decodeArray(nativeResponseValue);
843         }
844         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
845         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
846                 if(!isWasmInitialized) {
847                         throw new Error("initializeWasm() must be awaited first!");
848                 }
849                 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
850                 return nativeResponseValue;
851         }
852
853
854
855 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
856
857                 export interface LDKFeeEstimator {
858                         get_est_sat_per_1000_weight (confirmation_target: LDKConfirmationTarget): number;
859                 }
860
861                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
862             throw new Error('unimplemented'); // TODO: bind to WASM
863         }
864
865 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
866
867
868         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
869         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: LDKConfirmationTarget): number {
870                 if(!isWasmInitialized) {
871                         throw new Error("initializeWasm() must be awaited first!");
872                 }
873                 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
874                 return nativeResponseValue;
875         }
876
877
878
879 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
880
881                 export interface LDKLogger {
882                         log (record: String): void;
883                 }
884
885                 export function LDKLogger_new(impl: LDKLogger): number {
886             throw new Error('unimplemented'); // TODO: bind to WASM
887         }
888
889 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
890
891
892         public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
893         public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
894         public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
895         public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
896         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
897         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
898         public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
899         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
900         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
901         public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
902         public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
903         public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
904         public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
905         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
906         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
907         public static native long LDKCVec_TxOutZ_new(number[] elems);
908         public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
909         public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
910         public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
911         public static native long LDKCVec_RouteHopZ_new(number[] elems);
912         public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
913         public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
914         public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
915         public static native long LDKCVec_RouteHintZ_new(number[] elems);
916         public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
917         public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
918         public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
919         public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
920         public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
921         public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
922         public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
923         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
924         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
925         public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
926         public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
927         public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
928         public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
929         public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
930         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
931         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
932         public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
933         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
934         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
935         public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
936         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
937         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
938         public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
939         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
940         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
941         public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
942         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
943         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
944         public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
945         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
946         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
947         public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
948         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
949         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
950         public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
951         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
952         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
953         public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
954         public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
955         public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
956         public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
957         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
958         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
959         public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
960         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
961         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
962         public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
963         public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
964         public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
965         public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
966         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
967         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
968         public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
969         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
970         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
971         public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
972         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
973         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
974         public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
975         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
976         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
977         public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
978         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
979         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
980         public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
981         public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
982         public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
983         public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
984         public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
985         public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
986         public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
987         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
988         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
989         public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
990         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
991         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
992         public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
993         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
994         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
995         public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
996         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
997         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
998         public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
999         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1000         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1001         public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1002         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1003         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1004         public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1005         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1006         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1007         public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1008         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1009         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1010         public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1011         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1012         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1013         public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1014         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1015         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1016         public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1017         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1018         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1019         public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1020         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1021         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1022
1023
1024
1025 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1026
1027                 export interface LDKMessageSendEventsProvider {
1028                         get_and_clear_pending_msg_events (): number[];
1029                 }
1030
1031                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1032             throw new Error('unimplemented'); // TODO: bind to WASM
1033         }
1034
1035 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1036
1037
1038         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1039         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1040                 if(!isWasmInitialized) {
1041                         throw new Error("initializeWasm() must be awaited first!");
1042                 }
1043                 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1044                 return nativeResponseValue;
1045         }
1046
1047
1048
1049 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1050
1051                 export interface LDKEventsProvider {
1052                         get_and_clear_pending_events (): number[];
1053                 }
1054
1055                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1056             throw new Error('unimplemented'); // TODO: bind to WASM
1057         }
1058
1059 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1060
1061
1062         // LDKCVec_EventZ EventsProvider_get_and_clear_pending_events LDKEventsProvider *NONNULL_PTR this_arg
1063         export function EventsProvider_get_and_clear_pending_events(this_arg: number): number[] {
1064                 if(!isWasmInitialized) {
1065                         throw new Error("initializeWasm() must be awaited first!");
1066                 }
1067                 const nativeResponseValue = wasm.EventsProvider_get_and_clear_pending_events(this_arg);
1068                 return nativeResponseValue;
1069         }
1070
1071
1072
1073 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1074
1075                 export interface LDKAccess {
1076                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1077                 }
1078
1079                 export function LDKAccess_new(impl: LDKAccess): number {
1080             throw new Error('unimplemented'); // TODO: bind to WASM
1081         }
1082
1083 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1084
1085
1086         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1087         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1088                 if(!isWasmInitialized) {
1089                         throw new Error("initializeWasm() must be awaited first!");
1090                 }
1091                 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1092                 return nativeResponseValue;
1093         }
1094
1095
1096
1097 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1098
1099                 export interface LDKListen {
1100                         block_connected (block: Uint8Array, height: number): void;
1101                         block_disconnected (header: Uint8Array, height: number): void;
1102                 }
1103
1104                 export function LDKListen_new(impl: LDKListen): number {
1105             throw new Error('unimplemented'); // TODO: bind to WASM
1106         }
1107
1108 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1109
1110
1111         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1112         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1113                 if(!isWasmInitialized) {
1114                         throw new Error("initializeWasm() must be awaited first!");
1115                 }
1116                 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1117                 // debug statements here
1118         }
1119         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1120         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1121                 if(!isWasmInitialized) {
1122                         throw new Error("initializeWasm() must be awaited first!");
1123                 }
1124                 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1125                 // debug statements here
1126         }
1127
1128
1129
1130 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1131
1132                 export interface LDKFilter {
1133                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1134                         register_output (outpoint: number, script_pubkey: Uint8Array): void;
1135                 }
1136
1137                 export function LDKFilter_new(impl: LDKFilter): number {
1138             throw new Error('unimplemented'); // TODO: bind to WASM
1139         }
1140
1141 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1142
1143
1144         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1145         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1146                 if(!isWasmInitialized) {
1147                         throw new Error("initializeWasm() must be awaited first!");
1148                 }
1149                 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1150                 // debug statements here
1151         }
1152         // void Filter_register_output LDKFilter *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey
1153         export function Filter_register_output(this_arg: number, outpoint: number, script_pubkey: Uint8Array): void {
1154                 if(!isWasmInitialized) {
1155                         throw new Error("initializeWasm() must be awaited first!");
1156                 }
1157                 const nativeResponseValue = wasm.Filter_register_output(this_arg, outpoint, encodeArray(script_pubkey));
1158                 // debug statements here
1159         }
1160
1161
1162
1163 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1164
1165                 export interface LDKPersist {
1166                         persist_new_channel (id: number, data: number): number;
1167                         update_persisted_channel (id: number, update: number, data: number): number;
1168                 }
1169
1170                 export function LDKPersist_new(impl: LDKPersist): number {
1171             throw new Error('unimplemented'); // TODO: bind to WASM
1172         }
1173
1174 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1175
1176
1177         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1178         export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1179                 if(!isWasmInitialized) {
1180                         throw new Error("initializeWasm() must be awaited first!");
1181                 }
1182                 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1183                 return nativeResponseValue;
1184         }
1185         // 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
1186         export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1187                 if(!isWasmInitialized) {
1188                         throw new Error("initializeWasm() must be awaited first!");
1189                 }
1190                 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1191                 return nativeResponseValue;
1192         }
1193
1194
1195
1196 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1197
1198                 export interface LDKChannelMessageHandler {
1199                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1200                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1201                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1202                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1203                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1204                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1205                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1206                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1207                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1208                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1209                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1210                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1211                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1212                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1213                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1214                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1215                         peer_connected (their_node_id: Uint8Array, msg: number): void;
1216                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1217                         handle_error (their_node_id: Uint8Array, msg: number): void;
1218                 }
1219
1220                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1221             throw new Error('unimplemented'); // TODO: bind to WASM
1222         }
1223
1224 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1225
1226
1227         // 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
1228         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1229                 if(!isWasmInitialized) {
1230                         throw new Error("initializeWasm() must be awaited first!");
1231                 }
1232                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1233                 // debug statements here
1234         }
1235         // 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
1236         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1237                 if(!isWasmInitialized) {
1238                         throw new Error("initializeWasm() must be awaited first!");
1239                 }
1240                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1241                 // debug statements here
1242         }
1243         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1244         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1245                 if(!isWasmInitialized) {
1246                         throw new Error("initializeWasm() must be awaited first!");
1247                 }
1248                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1249                 // debug statements here
1250         }
1251         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1252         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1253                 if(!isWasmInitialized) {
1254                         throw new Error("initializeWasm() must be awaited first!");
1255                 }
1256                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1257                 // debug statements here
1258         }
1259         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1260         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1261                 if(!isWasmInitialized) {
1262                         throw new Error("initializeWasm() must be awaited first!");
1263                 }
1264                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1265                 // debug statements here
1266         }
1267         // 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
1268         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1269                 if(!isWasmInitialized) {
1270                         throw new Error("initializeWasm() must be awaited first!");
1271                 }
1272                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1273                 // debug statements here
1274         }
1275         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1276         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1277                 if(!isWasmInitialized) {
1278                         throw new Error("initializeWasm() must be awaited first!");
1279                 }
1280                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1281                 // debug statements here
1282         }
1283         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1284         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1285                 if(!isWasmInitialized) {
1286                         throw new Error("initializeWasm() must be awaited first!");
1287                 }
1288                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1289                 // debug statements here
1290         }
1291         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1292         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1293                 if(!isWasmInitialized) {
1294                         throw new Error("initializeWasm() must be awaited first!");
1295                 }
1296                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1297                 // debug statements here
1298         }
1299         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1300         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1301                 if(!isWasmInitialized) {
1302                         throw new Error("initializeWasm() must be awaited first!");
1303                 }
1304                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1305                 // debug statements here
1306         }
1307         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1308         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1309                 if(!isWasmInitialized) {
1310                         throw new Error("initializeWasm() must be awaited first!");
1311                 }
1312                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1313                 // debug statements here
1314         }
1315         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1316         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1317                 if(!isWasmInitialized) {
1318                         throw new Error("initializeWasm() must be awaited first!");
1319                 }
1320                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1321                 // debug statements here
1322         }
1323         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1324         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1325                 if(!isWasmInitialized) {
1326                         throw new Error("initializeWasm() must be awaited first!");
1327                 }
1328                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1329                 // debug statements here
1330         }
1331         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1332         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1333                 if(!isWasmInitialized) {
1334                         throw new Error("initializeWasm() must be awaited first!");
1335                 }
1336                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1337                 // debug statements here
1338         }
1339         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1340         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1341                 if(!isWasmInitialized) {
1342                         throw new Error("initializeWasm() must be awaited first!");
1343                 }
1344                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1345                 // debug statements here
1346         }
1347         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1348         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1349                 if(!isWasmInitialized) {
1350                         throw new Error("initializeWasm() must be awaited first!");
1351                 }
1352                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1353                 // debug statements here
1354         }
1355         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1356         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1357                 if(!isWasmInitialized) {
1358                         throw new Error("initializeWasm() must be awaited first!");
1359                 }
1360                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1361                 // debug statements here
1362         }
1363         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1364         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1365                 if(!isWasmInitialized) {
1366                         throw new Error("initializeWasm() must be awaited first!");
1367                 }
1368                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1369                 // debug statements here
1370         }
1371         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1372         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1373                 if(!isWasmInitialized) {
1374                         throw new Error("initializeWasm() must be awaited first!");
1375                 }
1376                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1377                 // debug statements here
1378         }
1379
1380
1381
1382 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1383
1384                 export interface LDKRoutingMessageHandler {
1385                         handle_node_announcement (msg: number): number;
1386                         handle_channel_announcement (msg: number): number;
1387                         handle_channel_update (msg: number): number;
1388                         handle_htlc_fail_channel_update (update: number): void;
1389                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1390                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1391                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
1392                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1393                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1394                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1395                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1396                 }
1397
1398                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1399             throw new Error('unimplemented'); // TODO: bind to WASM
1400         }
1401
1402 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1403
1404
1405         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1406         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1407                 if(!isWasmInitialized) {
1408                         throw new Error("initializeWasm() must be awaited first!");
1409                 }
1410                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1411                 return nativeResponseValue;
1412         }
1413         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1414         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1415                 if(!isWasmInitialized) {
1416                         throw new Error("initializeWasm() must be awaited first!");
1417                 }
1418                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1419                 return nativeResponseValue;
1420         }
1421         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1422         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1423                 if(!isWasmInitialized) {
1424                         throw new Error("initializeWasm() must be awaited first!");
1425                 }
1426                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1427                 return nativeResponseValue;
1428         }
1429         // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1430         export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1431                 if(!isWasmInitialized) {
1432                         throw new Error("initializeWasm() must be awaited first!");
1433                 }
1434                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1435                 // debug statements here
1436         }
1437         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1438         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1439                 if(!isWasmInitialized) {
1440                         throw new Error("initializeWasm() must be awaited first!");
1441                 }
1442                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1443                 return nativeResponseValue;
1444         }
1445         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1446         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1447                 if(!isWasmInitialized) {
1448                         throw new Error("initializeWasm() must be awaited first!");
1449                 }
1450                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1451                 return nativeResponseValue;
1452         }
1453         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1454         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1455                 if(!isWasmInitialized) {
1456                         throw new Error("initializeWasm() must be awaited first!");
1457                 }
1458                 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1459                 // debug statements here
1460         }
1461         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1462         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1463                 if(!isWasmInitialized) {
1464                         throw new Error("initializeWasm() must be awaited first!");
1465                 }
1466                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1467                 return nativeResponseValue;
1468         }
1469         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1470         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1471                 if(!isWasmInitialized) {
1472                         throw new Error("initializeWasm() must be awaited first!");
1473                 }
1474                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1475                 return nativeResponseValue;
1476         }
1477         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1478         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1479                 if(!isWasmInitialized) {
1480                         throw new Error("initializeWasm() must be awaited first!");
1481                 }
1482                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1483                 return nativeResponseValue;
1484         }
1485         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1486         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1487                 if(!isWasmInitialized) {
1488                         throw new Error("initializeWasm() must be awaited first!");
1489                 }
1490                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1491                 return nativeResponseValue;
1492         }
1493
1494
1495
1496 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1497
1498                 export interface LDKSocketDescriptor {
1499                         send_data (data: Uint8Array, resume_read: boolean): number;
1500                         disconnect_socket (): void;
1501                         eq (other_arg: number): boolean;
1502                         hash (): number;
1503                 }
1504
1505                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1506             throw new Error('unimplemented'); // TODO: bind to WASM
1507         }
1508
1509 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1510
1511
1512         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1513         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1514                 if(!isWasmInitialized) {
1515                         throw new Error("initializeWasm() must be awaited first!");
1516                 }
1517                 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1518                 return nativeResponseValue;
1519         }
1520         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1521         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1522                 if(!isWasmInitialized) {
1523                         throw new Error("initializeWasm() must be awaited first!");
1524                 }
1525                 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1526                 // debug statements here
1527         }
1528         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1529         export function SocketDescriptor_hash(this_arg: number): number {
1530                 if(!isWasmInitialized) {
1531                         throw new Error("initializeWasm() must be awaited first!");
1532                 }
1533                 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1534                 return nativeResponseValue;
1535         }
1536         // void Transaction_free(struct LDKTransaction _res);
1537         export function Transaction_free(_res: Uint8Array): void {
1538                 if(!isWasmInitialized) {
1539                         throw new Error("initializeWasm() must be awaited first!");
1540                 }
1541                 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1542                 // debug statements here
1543         }
1544         // void TxOut_free(struct LDKTxOut _res);
1545         export function TxOut_free(_res: number): void {
1546                 if(!isWasmInitialized) {
1547                         throw new Error("initializeWasm() must be awaited first!");
1548                 }
1549                 const nativeResponseValue = wasm.TxOut_free(_res);
1550                 // debug statements here
1551         }
1552         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1553         export function TxOut_clone(orig: number): number {
1554                 if(!isWasmInitialized) {
1555                         throw new Error("initializeWasm() must be awaited first!");
1556                 }
1557                 const nativeResponseValue = wasm.TxOut_clone(orig);
1558                 return nativeResponseValue;
1559         }
1560         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1561         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1562                 if(!isWasmInitialized) {
1563                         throw new Error("initializeWasm() must be awaited first!");
1564                 }
1565                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1566                 return nativeResponseValue;
1567         }
1568         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1569         export function CResult_SecretKeyErrorZ_err(e: LDKSecp256k1Error): number {
1570                 if(!isWasmInitialized) {
1571                         throw new Error("initializeWasm() must be awaited first!");
1572                 }
1573                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1574                 return nativeResponseValue;
1575         }
1576         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1577         export function CResult_SecretKeyErrorZ_free(_res: number): void {
1578                 if(!isWasmInitialized) {
1579                         throw new Error("initializeWasm() must be awaited first!");
1580                 }
1581                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1582                 // debug statements here
1583         }
1584         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1585         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1586                 if(!isWasmInitialized) {
1587                         throw new Error("initializeWasm() must be awaited first!");
1588                 }
1589                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1590                 return nativeResponseValue;
1591         }
1592         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1593         export function CResult_PublicKeyErrorZ_err(e: LDKSecp256k1Error): number {
1594                 if(!isWasmInitialized) {
1595                         throw new Error("initializeWasm() must be awaited first!");
1596                 }
1597                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1598                 return nativeResponseValue;
1599         }
1600         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1601         export function CResult_PublicKeyErrorZ_free(_res: number): void {
1602                 if(!isWasmInitialized) {
1603                         throw new Error("initializeWasm() must be awaited first!");
1604                 }
1605                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
1606                 // debug statements here
1607         }
1608         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1609         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
1610                 if(!isWasmInitialized) {
1611                         throw new Error("initializeWasm() must be awaited first!");
1612                 }
1613                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
1614                 return nativeResponseValue;
1615         }
1616         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1617         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
1618                 if(!isWasmInitialized) {
1619                         throw new Error("initializeWasm() must be awaited first!");
1620                 }
1621                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
1622                 return nativeResponseValue;
1623         }
1624         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1625         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
1626                 if(!isWasmInitialized) {
1627                         throw new Error("initializeWasm() must be awaited first!");
1628                 }
1629                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
1630                 // debug statements here
1631         }
1632         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1633         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
1634                 if(!isWasmInitialized) {
1635                         throw new Error("initializeWasm() must be awaited first!");
1636                 }
1637                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
1638                 return nativeResponseValue;
1639         }
1640         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1641         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
1642                 if(!isWasmInitialized) {
1643                         throw new Error("initializeWasm() must be awaited first!");
1644                 }
1645                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
1646                 return nativeResponseValue;
1647         }
1648         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1649         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
1650                 if(!isWasmInitialized) {
1651                         throw new Error("initializeWasm() must be awaited first!");
1652                 }
1653                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
1654                 return nativeResponseValue;
1655         }
1656         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
1657         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
1658                 if(!isWasmInitialized) {
1659                         throw new Error("initializeWasm() must be awaited first!");
1660                 }
1661                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
1662                 // debug statements here
1663         }
1664         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
1665         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
1666                 if(!isWasmInitialized) {
1667                         throw new Error("initializeWasm() must be awaited first!");
1668                 }
1669                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
1670                 return nativeResponseValue;
1671         }
1672         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
1673         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
1674                 if(!isWasmInitialized) {
1675                         throw new Error("initializeWasm() must be awaited first!");
1676                 }
1677                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
1678                 return nativeResponseValue;
1679         }
1680         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
1681         export function CResult_TxCreationKeysErrorZ_err(e: LDKSecp256k1Error): number {
1682                 if(!isWasmInitialized) {
1683                         throw new Error("initializeWasm() must be awaited first!");
1684                 }
1685                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
1686                 return nativeResponseValue;
1687         }
1688         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
1689         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
1690                 if(!isWasmInitialized) {
1691                         throw new Error("initializeWasm() must be awaited first!");
1692                 }
1693                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
1694                 // debug statements here
1695         }
1696         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
1697         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
1698                 if(!isWasmInitialized) {
1699                         throw new Error("initializeWasm() must be awaited first!");
1700                 }
1701                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
1702                 return nativeResponseValue;
1703         }
1704         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
1705         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
1706                 if(!isWasmInitialized) {
1707                         throw new Error("initializeWasm() must be awaited first!");
1708                 }
1709                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
1710                 return nativeResponseValue;
1711         }
1712         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
1713         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
1714                 if(!isWasmInitialized) {
1715                         throw new Error("initializeWasm() must be awaited first!");
1716                 }
1717                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
1718                 // debug statements here
1719         }
1720         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
1721         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
1722                 if(!isWasmInitialized) {
1723                         throw new Error("initializeWasm() must be awaited first!");
1724                 }
1725                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
1726                 return nativeResponseValue;
1727         }
1728         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
1729         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1730                 if(!isWasmInitialized) {
1731                         throw new Error("initializeWasm() must be awaited first!");
1732                 }
1733                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
1734                 return nativeResponseValue;
1735         }
1736         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1737         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1738                 if(!isWasmInitialized) {
1739                         throw new Error("initializeWasm() must be awaited first!");
1740                 }
1741                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
1742                 return nativeResponseValue;
1743         }
1744         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
1745         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1746                 if(!isWasmInitialized) {
1747                         throw new Error("initializeWasm() must be awaited first!");
1748                 }
1749                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
1750                 // debug statements here
1751         }
1752         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1753         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1754                 if(!isWasmInitialized) {
1755                         throw new Error("initializeWasm() must be awaited first!");
1756                 }
1757                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
1758                 return nativeResponseValue;
1759         }
1760         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
1761         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1762                 if(!isWasmInitialized) {
1763                         throw new Error("initializeWasm() must be awaited first!");
1764                 }
1765                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
1766                 return nativeResponseValue;
1767         }
1768         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1769         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1770                 if(!isWasmInitialized) {
1771                         throw new Error("initializeWasm() must be awaited first!");
1772                 }
1773                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
1774                 return nativeResponseValue;
1775         }
1776         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
1777         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1778                 if(!isWasmInitialized) {
1779                         throw new Error("initializeWasm() must be awaited first!");
1780                 }
1781                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
1782                 // debug statements here
1783         }
1784         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1785         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1786                 if(!isWasmInitialized) {
1787                         throw new Error("initializeWasm() must be awaited first!");
1788                 }
1789                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
1790                 return nativeResponseValue;
1791         }
1792         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
1793         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
1794                 if(!isWasmInitialized) {
1795                         throw new Error("initializeWasm() must be awaited first!");
1796                 }
1797                 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
1798                 // debug statements here
1799         }
1800         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
1801         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1802                 if(!isWasmInitialized) {
1803                         throw new Error("initializeWasm() must be awaited first!");
1804                 }
1805                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
1806                 return nativeResponseValue;
1807         }
1808         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1809         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
1810                 if(!isWasmInitialized) {
1811                         throw new Error("initializeWasm() must be awaited first!");
1812                 }
1813                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
1814                 return nativeResponseValue;
1815         }
1816         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
1817         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1818                 if(!isWasmInitialized) {
1819                         throw new Error("initializeWasm() must be awaited first!");
1820                 }
1821                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
1822                 // debug statements here
1823         }
1824         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1825         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1826                 if(!isWasmInitialized) {
1827                         throw new Error("initializeWasm() must be awaited first!");
1828                 }
1829                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
1830                 return nativeResponseValue;
1831         }
1832         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
1833         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1834                 if(!isWasmInitialized) {
1835                         throw new Error("initializeWasm() must be awaited first!");
1836                 }
1837                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
1838                 return nativeResponseValue;
1839         }
1840         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1841         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
1842                 if(!isWasmInitialized) {
1843                         throw new Error("initializeWasm() must be awaited first!");
1844                 }
1845                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
1846                 return nativeResponseValue;
1847         }
1848         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
1849         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1850                 if(!isWasmInitialized) {
1851                         throw new Error("initializeWasm() must be awaited first!");
1852                 }
1853                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
1854                 // debug statements here
1855         }
1856         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1857         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1858                 if(!isWasmInitialized) {
1859                         throw new Error("initializeWasm() must be awaited first!");
1860                 }
1861                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
1862                 return nativeResponseValue;
1863         }
1864         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
1865         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
1866                 if(!isWasmInitialized) {
1867                         throw new Error("initializeWasm() must be awaited first!");
1868                 }
1869                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
1870                 return nativeResponseValue;
1871         }
1872         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1873         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
1874                 if(!isWasmInitialized) {
1875                         throw new Error("initializeWasm() must be awaited first!");
1876                 }
1877                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
1878                 return nativeResponseValue;
1879         }
1880         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
1881         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
1882                 if(!isWasmInitialized) {
1883                         throw new Error("initializeWasm() must be awaited first!");
1884                 }
1885                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
1886                 // debug statements here
1887         }
1888         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1889         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1890                 if(!isWasmInitialized) {
1891                         throw new Error("initializeWasm() must be awaited first!");
1892                 }
1893                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
1894                 return nativeResponseValue;
1895         }
1896         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
1897         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
1898                 if(!isWasmInitialized) {
1899                         throw new Error("initializeWasm() must be awaited first!");
1900                 }
1901                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
1902                 return nativeResponseValue;
1903         }
1904         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
1905         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
1906                 if(!isWasmInitialized) {
1907                         throw new Error("initializeWasm() must be awaited first!");
1908                 }
1909                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
1910                 return nativeResponseValue;
1911         }
1912         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
1913         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
1914                 if(!isWasmInitialized) {
1915                         throw new Error("initializeWasm() must be awaited first!");
1916                 }
1917                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
1918                 // debug statements here
1919         }
1920         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
1921         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
1922                 if(!isWasmInitialized) {
1923                         throw new Error("initializeWasm() must be awaited first!");
1924                 }
1925                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
1926                 return nativeResponseValue;
1927         }
1928         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
1929         export function CResult_CVec_SignatureZNoneZ_err(): number {
1930                 if(!isWasmInitialized) {
1931                         throw new Error("initializeWasm() must be awaited first!");
1932                 }
1933                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
1934                 return nativeResponseValue;
1935         }
1936         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
1937         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
1938                 if(!isWasmInitialized) {
1939                         throw new Error("initializeWasm() must be awaited first!");
1940                 }
1941                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
1942                 // debug statements here
1943         }
1944         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
1945         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
1946                 if(!isWasmInitialized) {
1947                         throw new Error("initializeWasm() must be awaited first!");
1948                 }
1949                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
1950                 return nativeResponseValue;
1951         }
1952         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
1953         export function CVec_MessageSendEventZ_free(_res: number[]): void {
1954                 if(!isWasmInitialized) {
1955                         throw new Error("initializeWasm() must be awaited first!");
1956                 }
1957                 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
1958                 // debug statements here
1959         }
1960         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
1961         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
1962                 if(!isWasmInitialized) {
1963                         throw new Error("initializeWasm() must be awaited first!");
1964                 }
1965                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
1966                 return nativeResponseValue;
1967         }
1968         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
1969         export function CResult_boolLightningErrorZ_err(e: number): number {
1970                 if(!isWasmInitialized) {
1971                         throw new Error("initializeWasm() must be awaited first!");
1972                 }
1973                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
1974                 return nativeResponseValue;
1975         }
1976         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
1977         export function CResult_boolLightningErrorZ_free(_res: number): void {
1978                 if(!isWasmInitialized) {
1979                         throw new Error("initializeWasm() must be awaited first!");
1980                 }
1981                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
1982                 // debug statements here
1983         }
1984         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
1985         export function CResult_boolLightningErrorZ_clone(orig: number): number {
1986                 if(!isWasmInitialized) {
1987                         throw new Error("initializeWasm() must be awaited first!");
1988                 }
1989                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
1990                 return nativeResponseValue;
1991         }
1992         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
1993         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
1994                 if(!isWasmInitialized) {
1995                         throw new Error("initializeWasm() must be awaited first!");
1996                 }
1997                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
1998                 return nativeResponseValue;
1999         }
2000         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
2001         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
2002                 if(!isWasmInitialized) {
2003                         throw new Error("initializeWasm() must be awaited first!");
2004                 }
2005                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
2006                 return nativeResponseValue;
2007         }
2008         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
2009         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
2010                 if(!isWasmInitialized) {
2011                         throw new Error("initializeWasm() must be awaited first!");
2012                 }
2013                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
2014                 // debug statements here
2015         }
2016         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
2017         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
2018                 if(!isWasmInitialized) {
2019                         throw new Error("initializeWasm() must be awaited first!");
2020                 }
2021                 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
2022                 // debug statements here
2023         }
2024         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
2025         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
2026                 if(!isWasmInitialized) {
2027                         throw new Error("initializeWasm() must be awaited first!");
2028                 }
2029                 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
2030                 // debug statements here
2031         }
2032         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
2033         export function CResult_NoneLightningErrorZ_ok(): number {
2034                 if(!isWasmInitialized) {
2035                         throw new Error("initializeWasm() must be awaited first!");
2036                 }
2037                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
2038                 return nativeResponseValue;
2039         }
2040         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
2041         export function CResult_NoneLightningErrorZ_err(e: number): number {
2042                 if(!isWasmInitialized) {
2043                         throw new Error("initializeWasm() must be awaited first!");
2044                 }
2045                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
2046                 return nativeResponseValue;
2047         }
2048         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
2049         export function CResult_NoneLightningErrorZ_free(_res: number): void {
2050                 if(!isWasmInitialized) {
2051                         throw new Error("initializeWasm() must be awaited first!");
2052                 }
2053                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
2054                 // debug statements here
2055         }
2056         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
2057         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
2058                 if(!isWasmInitialized) {
2059                         throw new Error("initializeWasm() must be awaited first!");
2060                 }
2061                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
2062                 return nativeResponseValue;
2063         }
2064         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
2065         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
2066                 if(!isWasmInitialized) {
2067                         throw new Error("initializeWasm() must be awaited first!");
2068                 }
2069                 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
2070                 // debug statements here
2071         }
2072         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
2073         export function CVec_u8Z_free(_res: Uint8Array): void {
2074                 if(!isWasmInitialized) {
2075                         throw new Error("initializeWasm() must be awaited first!");
2076                 }
2077                 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
2078                 // debug statements here
2079         }
2080         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
2081         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
2082                 if(!isWasmInitialized) {
2083                         throw new Error("initializeWasm() must be awaited first!");
2084                 }
2085                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
2086                 return nativeResponseValue;
2087         }
2088         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2089         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
2090                 if(!isWasmInitialized) {
2091                         throw new Error("initializeWasm() must be awaited first!");
2092                 }
2093                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
2094                 return nativeResponseValue;
2095         }
2096         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
2097         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
2098                 if(!isWasmInitialized) {
2099                         throw new Error("initializeWasm() must be awaited first!");
2100                 }
2101                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
2102                 // debug statements here
2103         }
2104         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
2105         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
2106                 if(!isWasmInitialized) {
2107                         throw new Error("initializeWasm() must be awaited first!");
2108                 }
2109                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
2110                 return nativeResponseValue;
2111         }
2112         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
2113         export function CResult_NonePeerHandleErrorZ_ok(): number {
2114                 if(!isWasmInitialized) {
2115                         throw new Error("initializeWasm() must be awaited first!");
2116                 }
2117                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
2118                 return nativeResponseValue;
2119         }
2120         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
2121         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
2122                 if(!isWasmInitialized) {
2123                         throw new Error("initializeWasm() must be awaited first!");
2124                 }
2125                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
2126                 return nativeResponseValue;
2127         }
2128         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
2129         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
2130                 if(!isWasmInitialized) {
2131                         throw new Error("initializeWasm() must be awaited first!");
2132                 }
2133                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
2134                 // debug statements here
2135         }
2136         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
2137         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
2138                 if(!isWasmInitialized) {
2139                         throw new Error("initializeWasm() must be awaited first!");
2140                 }
2141                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
2142                 return nativeResponseValue;
2143         }
2144         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
2145         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
2146                 if(!isWasmInitialized) {
2147                         throw new Error("initializeWasm() must be awaited first!");
2148                 }
2149                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
2150                 return nativeResponseValue;
2151         }
2152         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2153         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
2154                 if(!isWasmInitialized) {
2155                         throw new Error("initializeWasm() must be awaited first!");
2156                 }
2157                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
2158                 return nativeResponseValue;
2159         }
2160         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
2161         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
2162                 if(!isWasmInitialized) {
2163                         throw new Error("initializeWasm() must be awaited first!");
2164                 }
2165                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
2166                 // debug statements here
2167         }
2168         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
2169         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
2170                 if(!isWasmInitialized) {
2171                         throw new Error("initializeWasm() must be awaited first!");
2172                 }
2173                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
2174                 return nativeResponseValue;
2175         }
2176         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
2177         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
2178                 if(!isWasmInitialized) {
2179                         throw new Error("initializeWasm() must be awaited first!");
2180                 }
2181                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
2182                 return nativeResponseValue;
2183         }
2184         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2185         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
2186                 if(!isWasmInitialized) {
2187                         throw new Error("initializeWasm() must be awaited first!");
2188                 }
2189                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
2190                 return nativeResponseValue;
2191         }
2192         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
2193         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
2194                 if(!isWasmInitialized) {
2195                         throw new Error("initializeWasm() must be awaited first!");
2196                 }
2197                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
2198                 // debug statements here
2199         }
2200         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
2201         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
2202                 if(!isWasmInitialized) {
2203                         throw new Error("initializeWasm() must be awaited first!");
2204                 }
2205                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
2206                 return nativeResponseValue;
2207         }
2208         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2209         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
2210                 if(!isWasmInitialized) {
2211                         throw new Error("initializeWasm() must be awaited first!");
2212                 }
2213                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
2214                 return nativeResponseValue;
2215         }
2216         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
2217         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
2218                 if(!isWasmInitialized) {
2219                         throw new Error("initializeWasm() must be awaited first!");
2220                 }
2221                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
2222                 // debug statements here
2223         }
2224         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
2225         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
2226                 if(!isWasmInitialized) {
2227                         throw new Error("initializeWasm() must be awaited first!");
2228                 }
2229                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
2230                 return nativeResponseValue;
2231         }
2232         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2233         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
2234                 if(!isWasmInitialized) {
2235                         throw new Error("initializeWasm() must be awaited first!");
2236                 }
2237                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
2238                 return nativeResponseValue;
2239         }
2240         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
2241         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
2242                 if(!isWasmInitialized) {
2243                         throw new Error("initializeWasm() must be awaited first!");
2244                 }
2245                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
2246                 // debug statements here
2247         }
2248         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
2249         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
2250                 if(!isWasmInitialized) {
2251                         throw new Error("initializeWasm() must be awaited first!");
2252                 }
2253                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
2254                 return nativeResponseValue;
2255         }
2256         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2257         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
2258                 if(!isWasmInitialized) {
2259                         throw new Error("initializeWasm() must be awaited first!");
2260                 }
2261                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
2262                 return nativeResponseValue;
2263         }
2264         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
2265         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
2266                 if(!isWasmInitialized) {
2267                         throw new Error("initializeWasm() must be awaited first!");
2268                 }
2269                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
2270                 // debug statements here
2271         }
2272         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
2273         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
2274                 if(!isWasmInitialized) {
2275                         throw new Error("initializeWasm() must be awaited first!");
2276                 }
2277                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
2278                 return nativeResponseValue;
2279         }
2280         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
2281         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
2282                 if(!isWasmInitialized) {
2283                         throw new Error("initializeWasm() must be awaited first!");
2284                 }
2285                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
2286                 return nativeResponseValue;
2287         }
2288         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
2289         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
2290                 if(!isWasmInitialized) {
2291                         throw new Error("initializeWasm() must be awaited first!");
2292                 }
2293                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
2294                 // debug statements here
2295         }
2296         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
2297         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
2298                 if(!isWasmInitialized) {
2299                         throw new Error("initializeWasm() must be awaited first!");
2300                 }
2301                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
2302                 return nativeResponseValue;
2303         }
2304         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
2305         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
2306                 if(!isWasmInitialized) {
2307                         throw new Error("initializeWasm() must be awaited first!");
2308                 }
2309                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
2310                 return nativeResponseValue;
2311         }
2312         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2313         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
2314                 if(!isWasmInitialized) {
2315                         throw new Error("initializeWasm() must be awaited first!");
2316                 }
2317                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
2318                 return nativeResponseValue;
2319         }
2320         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
2321         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
2322                 if(!isWasmInitialized) {
2323                         throw new Error("initializeWasm() must be awaited first!");
2324                 }
2325                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
2326                 // debug statements here
2327         }
2328         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2329         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
2330                 if(!isWasmInitialized) {
2331                         throw new Error("initializeWasm() must be awaited first!");
2332                 }
2333                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
2334                 return nativeResponseValue;
2335         }
2336         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
2337         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
2338                 if(!isWasmInitialized) {
2339                         throw new Error("initializeWasm() must be awaited first!");
2340                 }
2341                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
2342                 return nativeResponseValue;
2343         }
2344         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2345         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
2346                 if(!isWasmInitialized) {
2347                         throw new Error("initializeWasm() must be awaited first!");
2348                 }
2349                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
2350                 return nativeResponseValue;
2351         }
2352         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
2353         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
2354                 if(!isWasmInitialized) {
2355                         throw new Error("initializeWasm() must be awaited first!");
2356                 }
2357                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
2358                 // debug statements here
2359         }
2360         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2361         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
2362                 if(!isWasmInitialized) {
2363                         throw new Error("initializeWasm() must be awaited first!");
2364                 }
2365                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
2366                 return nativeResponseValue;
2367         }
2368         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
2369         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
2370                 if(!isWasmInitialized) {
2371                         throw new Error("initializeWasm() must be awaited first!");
2372                 }
2373                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
2374                 return nativeResponseValue;
2375         }
2376         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
2377         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
2378                 if(!isWasmInitialized) {
2379                         throw new Error("initializeWasm() must be awaited first!");
2380                 }
2381                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
2382                 return nativeResponseValue;
2383         }
2384         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
2385         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
2386                 if(!isWasmInitialized) {
2387                         throw new Error("initializeWasm() must be awaited first!");
2388                 }
2389                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
2390                 // debug statements here
2391         }
2392         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
2393         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
2394                 if(!isWasmInitialized) {
2395                         throw new Error("initializeWasm() must be awaited first!");
2396                 }
2397                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
2398                 return nativeResponseValue;
2399         }
2400         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
2401         export function CVec_NetAddressZ_free(_res: number[]): void {
2402                 if(!isWasmInitialized) {
2403                         throw new Error("initializeWasm() must be awaited first!");
2404                 }
2405                 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
2406                 // debug statements here
2407         }
2408         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
2409         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
2410                 if(!isWasmInitialized) {
2411                         throw new Error("initializeWasm() must be awaited first!");
2412                 }
2413                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
2414                 return nativeResponseValue;
2415         }
2416         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
2417         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
2418                 if(!isWasmInitialized) {
2419                         throw new Error("initializeWasm() must be awaited first!");
2420                 }
2421                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
2422                 return nativeResponseValue;
2423         }
2424         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
2425         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
2426                 if(!isWasmInitialized) {
2427                         throw new Error("initializeWasm() must be awaited first!");
2428                 }
2429                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
2430                 // debug statements here
2431         }
2432         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
2433         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
2434                 if(!isWasmInitialized) {
2435                         throw new Error("initializeWasm() must be awaited first!");
2436                 }
2437                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
2438                 return nativeResponseValue;
2439         }
2440         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
2441         export function CVec_u64Z_free(_res: number[]): void {
2442                 if(!isWasmInitialized) {
2443                         throw new Error("initializeWasm() must be awaited first!");
2444                 }
2445                 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
2446                 // debug statements here
2447         }
2448         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
2449         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
2450                 if(!isWasmInitialized) {
2451                         throw new Error("initializeWasm() must be awaited first!");
2452                 }
2453                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
2454                 return nativeResponseValue;
2455         }
2456         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
2457         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
2458                 if(!isWasmInitialized) {
2459                         throw new Error("initializeWasm() must be awaited first!");
2460                 }
2461                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
2462                 return nativeResponseValue;
2463         }
2464         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
2465         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
2466                 if(!isWasmInitialized) {
2467                         throw new Error("initializeWasm() must be awaited first!");
2468                 }
2469                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
2470                 // debug statements here
2471         }
2472         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
2473         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
2474                 if(!isWasmInitialized) {
2475                         throw new Error("initializeWasm() must be awaited first!");
2476                 }
2477                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
2478                 return nativeResponseValue;
2479         }
2480         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
2481         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
2482                 if(!isWasmInitialized) {
2483                         throw new Error("initializeWasm() must be awaited first!");
2484                 }
2485                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
2486                 return nativeResponseValue;
2487         }
2488         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
2489         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
2490                 if(!isWasmInitialized) {
2491                         throw new Error("initializeWasm() must be awaited first!");
2492                 }
2493                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
2494                 return nativeResponseValue;
2495         }
2496         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
2497         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
2498                 if(!isWasmInitialized) {
2499                         throw new Error("initializeWasm() must be awaited first!");
2500                 }
2501                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
2502                 // debug statements here
2503         }
2504         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
2505         export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
2506                 if(!isWasmInitialized) {
2507                         throw new Error("initializeWasm() must be awaited first!");
2508                 }
2509                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
2510                 return nativeResponseValue;
2511         }
2512         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2513         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2514                 if(!isWasmInitialized) {
2515                         throw new Error("initializeWasm() must be awaited first!");
2516                 }
2517                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2518                 return nativeResponseValue;
2519         }
2520         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2521         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2522                 if(!isWasmInitialized) {
2523                         throw new Error("initializeWasm() must be awaited first!");
2524                 }
2525                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2526                 // debug statements here
2527         }
2528         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2529         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2530                 if(!isWasmInitialized) {
2531                         throw new Error("initializeWasm() must be awaited first!");
2532                 }
2533                 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2534                 // debug statements here
2535         }
2536         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2537         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2538                 if(!isWasmInitialized) {
2539                         throw new Error("initializeWasm() must be awaited first!");
2540                 }
2541                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2542                 return nativeResponseValue;
2543         }
2544         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2545         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
2546                 if(!isWasmInitialized) {
2547                         throw new Error("initializeWasm() must be awaited first!");
2548                 }
2549                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2550                 return nativeResponseValue;
2551         }
2552         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2553         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2554                 if(!isWasmInitialized) {
2555                         throw new Error("initializeWasm() must be awaited first!");
2556                 }
2557                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2558                 // debug statements here
2559         }
2560         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2561         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2562                 if(!isWasmInitialized) {
2563                         throw new Error("initializeWasm() must be awaited first!");
2564                 }
2565                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2566                 return nativeResponseValue;
2567         }
2568         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2569         export function CVec_MonitorEventZ_free(_res: number[]): void {
2570                 if(!isWasmInitialized) {
2571                         throw new Error("initializeWasm() must be awaited first!");
2572                 }
2573                 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2574                 // debug statements here
2575         }
2576         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
2577         export function CVec_EventZ_free(_res: number[]): void {
2578                 if(!isWasmInitialized) {
2579                         throw new Error("initializeWasm() must be awaited first!");
2580                 }
2581                 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
2582                 // debug statements here
2583         }
2584         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
2585         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
2586                 if(!isWasmInitialized) {
2587                         throw new Error("initializeWasm() must be awaited first!");
2588                 }
2589                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
2590                 return nativeResponseValue;
2591         }
2592         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
2593         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
2594                 if(!isWasmInitialized) {
2595                         throw new Error("initializeWasm() must be awaited first!");
2596                 }
2597                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
2598                 return nativeResponseValue;
2599         }
2600         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
2601         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
2602                 if(!isWasmInitialized) {
2603                         throw new Error("initializeWasm() must be awaited first!");
2604                 }
2605                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
2606                 // debug statements here
2607         }
2608         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
2609         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
2610                 if(!isWasmInitialized) {
2611                         throw new Error("initializeWasm() must be awaited first!");
2612                 }
2613                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
2614                 return nativeResponseValue;
2615         }
2616         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
2617         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
2618                 if(!isWasmInitialized) {
2619                         throw new Error("initializeWasm() must be awaited first!");
2620                 }
2621                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
2622                 return nativeResponseValue;
2623         }
2624         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2625         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
2626                 if(!isWasmInitialized) {
2627                         throw new Error("initializeWasm() must be awaited first!");
2628                 }
2629                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
2630                 return nativeResponseValue;
2631         }
2632         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
2633         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
2634                 if(!isWasmInitialized) {
2635                         throw new Error("initializeWasm() must be awaited first!");
2636                 }
2637                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
2638                 // debug statements here
2639         }
2640         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
2641         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
2642                 if(!isWasmInitialized) {
2643                         throw new Error("initializeWasm() must be awaited first!");
2644                 }
2645                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
2646                 return nativeResponseValue;
2647         }
2648         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
2649         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
2650                 if(!isWasmInitialized) {
2651                         throw new Error("initializeWasm() must be awaited first!");
2652                 }
2653                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
2654                 return nativeResponseValue;
2655         }
2656         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2657         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
2658                 if(!isWasmInitialized) {
2659                         throw new Error("initializeWasm() must be awaited first!");
2660                 }
2661                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
2662                 return nativeResponseValue;
2663         }
2664         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
2665         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
2666                 if(!isWasmInitialized) {
2667                         throw new Error("initializeWasm() must be awaited first!");
2668                 }
2669                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
2670                 // debug statements here
2671         }
2672         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
2673         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
2674                 if(!isWasmInitialized) {
2675                         throw new Error("initializeWasm() must be awaited first!");
2676                 }
2677                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
2678                 return nativeResponseValue;
2679         }
2680         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
2681         export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
2682                 if(!isWasmInitialized) {
2683                         throw new Error("initializeWasm() must be awaited first!");
2684                 }
2685                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
2686                 return nativeResponseValue;
2687         }
2688         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
2689         export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
2690                 if(!isWasmInitialized) {
2691                         throw new Error("initializeWasm() must be awaited first!");
2692                 }
2693                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
2694                 return nativeResponseValue;
2695         }
2696         // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
2697         export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
2698                 if(!isWasmInitialized) {
2699                         throw new Error("initializeWasm() must be awaited first!");
2700                 }
2701                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
2702                 // debug statements here
2703         }
2704         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
2705         export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
2706                 if(!isWasmInitialized) {
2707                         throw new Error("initializeWasm() must be awaited first!");
2708                 }
2709                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
2710                 return nativeResponseValue;
2711         }
2712         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
2713         export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
2714                 if(!isWasmInitialized) {
2715                         throw new Error("initializeWasm() must be awaited first!");
2716                 }
2717                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
2718                 return nativeResponseValue;
2719         }
2720         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
2721         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
2722                 if(!isWasmInitialized) {
2723                         throw new Error("initializeWasm() must be awaited first!");
2724                 }
2725                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
2726                 return nativeResponseValue;
2727         }
2728         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
2729         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
2730                 if(!isWasmInitialized) {
2731                         throw new Error("initializeWasm() must be awaited first!");
2732                 }
2733                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
2734                 // debug statements here
2735         }
2736         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
2737         export function C2Tuple_u32ScriptZ_clone(orig: number): number {
2738                 if(!isWasmInitialized) {
2739                         throw new Error("initializeWasm() must be awaited first!");
2740                 }
2741                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
2742                 return nativeResponseValue;
2743         }
2744         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
2745         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
2746                 if(!isWasmInitialized) {
2747                         throw new Error("initializeWasm() must be awaited first!");
2748                 }
2749                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
2750                 return nativeResponseValue;
2751         }
2752         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
2753         export function C2Tuple_u32ScriptZ_free(_res: number): void {
2754                 if(!isWasmInitialized) {
2755                         throw new Error("initializeWasm() must be awaited first!");
2756                 }
2757                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
2758                 // debug statements here
2759         }
2760         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
2761         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
2762                 if(!isWasmInitialized) {
2763                         throw new Error("initializeWasm() must be awaited first!");
2764                 }
2765                 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
2766                 // debug statements here
2767         }
2768         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
2769         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
2770                 if(!isWasmInitialized) {
2771                         throw new Error("initializeWasm() must be awaited first!");
2772                 }
2773                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
2774                 return nativeResponseValue;
2775         }
2776         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
2777         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
2778                 if(!isWasmInitialized) {
2779                         throw new Error("initializeWasm() must be awaited first!");
2780                 }
2781                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
2782                 // debug statements here
2783         }
2784         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
2785         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
2786                 if(!isWasmInitialized) {
2787                         throw new Error("initializeWasm() must be awaited first!");
2788                 }
2789                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
2790                 // debug statements here
2791         }
2792         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
2793         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
2794                 if(!isWasmInitialized) {
2795                         throw new Error("initializeWasm() must be awaited first!");
2796                 }
2797                 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
2798                 // debug statements here
2799         }
2800         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
2801         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
2802                 if(!isWasmInitialized) {
2803                         throw new Error("initializeWasm() must be awaited first!");
2804                 }
2805                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
2806                 return nativeResponseValue;
2807         }
2808         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
2809         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
2810                 if(!isWasmInitialized) {
2811                         throw new Error("initializeWasm() must be awaited first!");
2812                 }
2813                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
2814                 return nativeResponseValue;
2815         }
2816         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
2817         export function C2Tuple_u32TxOutZ_free(_res: number): void {
2818                 if(!isWasmInitialized) {
2819                         throw new Error("initializeWasm() must be awaited first!");
2820                 }
2821                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
2822                 // debug statements here
2823         }
2824         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
2825         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
2826                 if(!isWasmInitialized) {
2827                         throw new Error("initializeWasm() must be awaited first!");
2828                 }
2829                 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
2830                 // debug statements here
2831         }
2832         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
2833         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
2834                 if(!isWasmInitialized) {
2835                         throw new Error("initializeWasm() must be awaited first!");
2836                 }
2837                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
2838                 return nativeResponseValue;
2839         }
2840         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
2841         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
2842                 if(!isWasmInitialized) {
2843                         throw new Error("initializeWasm() must be awaited first!");
2844                 }
2845                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
2846                 // debug statements here
2847         }
2848         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
2849         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
2850                 if(!isWasmInitialized) {
2851                         throw new Error("initializeWasm() must be awaited first!");
2852                 }
2853                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
2854                 // debug statements here
2855         }
2856         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
2857         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
2858                 if(!isWasmInitialized) {
2859                         throw new Error("initializeWasm() must be awaited first!");
2860                 }
2861                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
2862                 return nativeResponseValue;
2863         }
2864         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
2865         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
2866                 if(!isWasmInitialized) {
2867                         throw new Error("initializeWasm() must be awaited first!");
2868                 }
2869                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
2870                 // debug statements here
2871         }
2872         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
2873         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
2874                 if(!isWasmInitialized) {
2875                         throw new Error("initializeWasm() must be awaited first!");
2876                 }
2877                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
2878                 return nativeResponseValue;
2879         }
2880         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
2881         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
2882                 if(!isWasmInitialized) {
2883                         throw new Error("initializeWasm() must be awaited first!");
2884                 }
2885                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
2886                 return nativeResponseValue;
2887         }
2888         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
2889         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
2890                 if(!isWasmInitialized) {
2891                         throw new Error("initializeWasm() must be awaited first!");
2892                 }
2893                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
2894                 // debug statements here
2895         }
2896         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2897         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
2898                 if(!isWasmInitialized) {
2899                         throw new Error("initializeWasm() must be awaited first!");
2900                 }
2901                 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
2902                 // debug statements here
2903         }
2904         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2905         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2906                 if(!isWasmInitialized) {
2907                         throw new Error("initializeWasm() must be awaited first!");
2908                 }
2909                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2910                 return nativeResponseValue;
2911         }
2912         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2913         export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
2914                 if(!isWasmInitialized) {
2915                         throw new Error("initializeWasm() must be awaited first!");
2916                 }
2917                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2918                 return nativeResponseValue;
2919         }
2920         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2921         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2922                 if(!isWasmInitialized) {
2923                         throw new Error("initializeWasm() must be awaited first!");
2924                 }
2925                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2926                 // debug statements here
2927         }
2928         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2929         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2930                 if(!isWasmInitialized) {
2931                         throw new Error("initializeWasm() must be awaited first!");
2932                 }
2933                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2934                 return nativeResponseValue;
2935         }
2936         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
2937         export function CResult_NoneAPIErrorZ_ok(): number {
2938                 if(!isWasmInitialized) {
2939                         throw new Error("initializeWasm() must be awaited first!");
2940                 }
2941                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
2942                 return nativeResponseValue;
2943         }
2944         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
2945         export function CResult_NoneAPIErrorZ_err(e: number): number {
2946                 if(!isWasmInitialized) {
2947                         throw new Error("initializeWasm() must be awaited first!");
2948                 }
2949                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
2950                 return nativeResponseValue;
2951         }
2952         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
2953         export function CResult_NoneAPIErrorZ_free(_res: number): void {
2954                 if(!isWasmInitialized) {
2955                         throw new Error("initializeWasm() must be awaited first!");
2956                 }
2957                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
2958                 // debug statements here
2959         }
2960         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
2961         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
2962                 if(!isWasmInitialized) {
2963                         throw new Error("initializeWasm() must be awaited first!");
2964                 }
2965                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
2966                 return nativeResponseValue;
2967         }
2968         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
2969         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
2970                 if(!isWasmInitialized) {
2971                         throw new Error("initializeWasm() must be awaited first!");
2972                 }
2973                 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
2974                 // debug statements here
2975         }
2976         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
2977         export function CVec_APIErrorZ_free(_res: number[]): void {
2978                 if(!isWasmInitialized) {
2979                         throw new Error("initializeWasm() must be awaited first!");
2980                 }
2981                 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
2982                 // debug statements here
2983         }
2984         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2985         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
2986                 if(!isWasmInitialized) {
2987                         throw new Error("initializeWasm() must be awaited first!");
2988                 }
2989                 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
2990                 // debug statements here
2991         }
2992         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
2993         export function CResult_NonePaymentSendFailureZ_ok(): number {
2994                 if(!isWasmInitialized) {
2995                         throw new Error("initializeWasm() must be awaited first!");
2996                 }
2997                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
2998                 return nativeResponseValue;
2999         }
3000         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3001         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
3002                 if(!isWasmInitialized) {
3003                         throw new Error("initializeWasm() must be awaited first!");
3004                 }
3005                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
3006                 return nativeResponseValue;
3007         }
3008         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
3009         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
3010                 if(!isWasmInitialized) {
3011                         throw new Error("initializeWasm() must be awaited first!");
3012                 }
3013                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
3014                 // debug statements here
3015         }
3016         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
3017         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
3018                 if(!isWasmInitialized) {
3019                         throw new Error("initializeWasm() must be awaited first!");
3020                 }
3021                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
3022                 return nativeResponseValue;
3023         }
3024         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
3025         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
3026                 if(!isWasmInitialized) {
3027                         throw new Error("initializeWasm() must be awaited first!");
3028                 }
3029                 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
3030                 // debug statements here
3031         }
3032         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
3033         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
3034                 if(!isWasmInitialized) {
3035                         throw new Error("initializeWasm() must be awaited first!");
3036                 }
3037                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
3038                 return nativeResponseValue;
3039         }
3040         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
3041         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
3042                 if(!isWasmInitialized) {
3043                         throw new Error("initializeWasm() must be awaited first!");
3044                 }
3045                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
3046                 // debug statements here
3047         }
3048         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
3049         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
3050                 if(!isWasmInitialized) {
3051                         throw new Error("initializeWasm() must be awaited first!");
3052                 }
3053                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
3054                 return nativeResponseValue;
3055         }
3056         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
3057         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
3058                 if(!isWasmInitialized) {
3059                         throw new Error("initializeWasm() must be awaited first!");
3060                 }
3061                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
3062                 return nativeResponseValue;
3063         }
3064         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
3065         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
3066                 if(!isWasmInitialized) {
3067                         throw new Error("initializeWasm() must be awaited first!");
3068                 }
3069                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
3070                 // debug statements here
3071         }
3072         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
3073         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
3074                 if(!isWasmInitialized) {
3075                         throw new Error("initializeWasm() must be awaited first!");
3076                 }
3077                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
3078                 return nativeResponseValue;
3079         }
3080         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3081         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
3082                 if(!isWasmInitialized) {
3083                         throw new Error("initializeWasm() must be awaited first!");
3084                 }
3085                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
3086                 return nativeResponseValue;
3087         }
3088         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
3089         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
3090                 if(!isWasmInitialized) {
3091                         throw new Error("initializeWasm() must be awaited first!");
3092                 }
3093                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
3094                 // debug statements here
3095         }
3096         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3097         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3098                 if(!isWasmInitialized) {
3099                         throw new Error("initializeWasm() must be awaited first!");
3100                 }
3101                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
3102                 return nativeResponseValue;
3103         }
3104         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
3105         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
3106                 if(!isWasmInitialized) {
3107                         throw new Error("initializeWasm() must be awaited first!");
3108                 }
3109                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
3110                 return nativeResponseValue;
3111         }
3112         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
3113         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
3114                 if(!isWasmInitialized) {
3115                         throw new Error("initializeWasm() must be awaited first!");
3116                 }
3117                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
3118                 return nativeResponseValue;
3119         }
3120         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
3121         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
3122                 if(!isWasmInitialized) {
3123                         throw new Error("initializeWasm() must be awaited first!");
3124                 }
3125                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
3126                 // debug statements here
3127         }
3128         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
3129         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
3130                 if(!isWasmInitialized) {
3131                         throw new Error("initializeWasm() must be awaited first!");
3132                 }
3133                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
3134                 return nativeResponseValue;
3135         }
3136         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
3137         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
3138                 if(!isWasmInitialized) {
3139                         throw new Error("initializeWasm() must be awaited first!");
3140                 }
3141                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
3142                 return nativeResponseValue;
3143         }
3144         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
3145         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
3146                 if(!isWasmInitialized) {
3147                         throw new Error("initializeWasm() must be awaited first!");
3148                 }
3149                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
3150                 // debug statements here
3151         }
3152         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
3153         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
3154                 if(!isWasmInitialized) {
3155                         throw new Error("initializeWasm() must be awaited first!");
3156                 }
3157                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
3158                 return nativeResponseValue;
3159         }
3160         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
3161         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
3162                 if(!isWasmInitialized) {
3163                         throw new Error("initializeWasm() must be awaited first!");
3164                 }
3165                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
3166                 return nativeResponseValue;
3167         }
3168         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
3169         export function CResult_SignatureNoneZ_err(): number {
3170                 if(!isWasmInitialized) {
3171                         throw new Error("initializeWasm() must be awaited first!");
3172                 }
3173                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
3174                 return nativeResponseValue;
3175         }
3176         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
3177         export function CResult_SignatureNoneZ_free(_res: number): void {
3178                 if(!isWasmInitialized) {
3179                         throw new Error("initializeWasm() must be awaited first!");
3180                 }
3181                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
3182                 // debug statements here
3183         }
3184         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
3185         export function CResult_SignatureNoneZ_clone(orig: number): number {
3186                 if(!isWasmInitialized) {
3187                         throw new Error("initializeWasm() must be awaited first!");
3188                 }
3189                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
3190                 return nativeResponseValue;
3191         }
3192         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
3193         export function CResult_SignDecodeErrorZ_ok(o: number): number {
3194                 if(!isWasmInitialized) {
3195                         throw new Error("initializeWasm() must be awaited first!");
3196                 }
3197                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
3198                 return nativeResponseValue;
3199         }
3200         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
3201         export function CResult_SignDecodeErrorZ_err(e: number): number {
3202                 if(!isWasmInitialized) {
3203                         throw new Error("initializeWasm() must be awaited first!");
3204                 }
3205                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
3206                 return nativeResponseValue;
3207         }
3208         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
3209         export function CResult_SignDecodeErrorZ_free(_res: number): void {
3210                 if(!isWasmInitialized) {
3211                         throw new Error("initializeWasm() must be awaited first!");
3212                 }
3213                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
3214                 // debug statements here
3215         }
3216         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
3217         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
3218                 if(!isWasmInitialized) {
3219                         throw new Error("initializeWasm() must be awaited first!");
3220                 }
3221                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
3222                 return nativeResponseValue;
3223         }
3224         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3225         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3226                 if(!isWasmInitialized) {
3227                         throw new Error("initializeWasm() must be awaited first!");
3228                 }
3229                 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3230                 // debug statements here
3231         }
3232         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3233         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3234                 if(!isWasmInitialized) {
3235                         throw new Error("initializeWasm() must be awaited first!");
3236                 }
3237                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3238                 return nativeResponseValue;
3239         }
3240         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3241         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3242                 if(!isWasmInitialized) {
3243                         throw new Error("initializeWasm() must be awaited first!");
3244                 }
3245                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3246                 return nativeResponseValue;
3247         }
3248         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3249         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3250                 if(!isWasmInitialized) {
3251                         throw new Error("initializeWasm() must be awaited first!");
3252                 }
3253                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3254                 // debug statements here
3255         }
3256         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3257         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3258                 if(!isWasmInitialized) {
3259                         throw new Error("initializeWasm() must be awaited first!");
3260                 }
3261                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3262                 return nativeResponseValue;
3263         }
3264         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3265         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3266                 if(!isWasmInitialized) {
3267                         throw new Error("initializeWasm() must be awaited first!");
3268                 }
3269                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3270                 return nativeResponseValue;
3271         }
3272         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3273         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3274                 if(!isWasmInitialized) {
3275                         throw new Error("initializeWasm() must be awaited first!");
3276                 }
3277                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3278                 return nativeResponseValue;
3279         }
3280         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3281         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3282                 if(!isWasmInitialized) {
3283                         throw new Error("initializeWasm() must be awaited first!");
3284                 }
3285                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3286                 // debug statements here
3287         }
3288         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3289         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3290                 if(!isWasmInitialized) {
3291                         throw new Error("initializeWasm() must be awaited first!");
3292                 }
3293                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3294                 return nativeResponseValue;
3295         }
3296         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3297         export function CVec_TxOutZ_free(_res: number[]): void {
3298                 if(!isWasmInitialized) {
3299                         throw new Error("initializeWasm() must be awaited first!");
3300                 }
3301                 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3302                 // debug statements here
3303         }
3304         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3305         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3306                 if(!isWasmInitialized) {
3307                         throw new Error("initializeWasm() must be awaited first!");
3308                 }
3309                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3310                 return nativeResponseValue;
3311         }
3312         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3313         export function CResult_TransactionNoneZ_err(): number {
3314                 if(!isWasmInitialized) {
3315                         throw new Error("initializeWasm() must be awaited first!");
3316                 }
3317                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3318                 return nativeResponseValue;
3319         }
3320         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3321         export function CResult_TransactionNoneZ_free(_res: number): void {
3322                 if(!isWasmInitialized) {
3323                         throw new Error("initializeWasm() must be awaited first!");
3324                 }
3325                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3326                 // debug statements here
3327         }
3328         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
3329         export function CVec_RouteHopZ_free(_res: number[]): void {
3330                 if(!isWasmInitialized) {
3331                         throw new Error("initializeWasm() must be awaited first!");
3332                 }
3333                 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
3334                 // debug statements here
3335         }
3336         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
3337         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
3338                 if(!isWasmInitialized) {
3339                         throw new Error("initializeWasm() must be awaited first!");
3340                 }
3341                 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
3342                 // debug statements here
3343         }
3344         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
3345         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
3346                 if(!isWasmInitialized) {
3347                         throw new Error("initializeWasm() must be awaited first!");
3348                 }
3349                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
3350                 return nativeResponseValue;
3351         }
3352         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
3353         export function CResult_RouteDecodeErrorZ_err(e: number): number {
3354                 if(!isWasmInitialized) {
3355                         throw new Error("initializeWasm() must be awaited first!");
3356                 }
3357                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
3358                 return nativeResponseValue;
3359         }
3360         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
3361         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
3362                 if(!isWasmInitialized) {
3363                         throw new Error("initializeWasm() must be awaited first!");
3364                 }
3365                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
3366                 // debug statements here
3367         }
3368         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
3369         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
3370                 if(!isWasmInitialized) {
3371                         throw new Error("initializeWasm() must be awaited first!");
3372                 }
3373                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
3374                 return nativeResponseValue;
3375         }
3376         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3377         export function CVec_RouteHintZ_free(_res: number[]): void {
3378                 if(!isWasmInitialized) {
3379                         throw new Error("initializeWasm() must be awaited first!");
3380                 }
3381                 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3382                 // debug statements here
3383         }
3384         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
3385         export function CResult_RouteLightningErrorZ_ok(o: number): number {
3386                 if(!isWasmInitialized) {
3387                         throw new Error("initializeWasm() must be awaited first!");
3388                 }
3389                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
3390                 return nativeResponseValue;
3391         }
3392         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
3393         export function CResult_RouteLightningErrorZ_err(e: number): number {
3394                 if(!isWasmInitialized) {
3395                         throw new Error("initializeWasm() must be awaited first!");
3396                 }
3397                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
3398                 return nativeResponseValue;
3399         }
3400         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
3401         export function CResult_RouteLightningErrorZ_free(_res: number): void {
3402                 if(!isWasmInitialized) {
3403                         throw new Error("initializeWasm() must be awaited first!");
3404                 }
3405                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
3406                 // debug statements here
3407         }
3408         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
3409         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
3410                 if(!isWasmInitialized) {
3411                         throw new Error("initializeWasm() must be awaited first!");
3412                 }
3413                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
3414                 return nativeResponseValue;
3415         }
3416         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
3417         export function CResult_NetAddressu8Z_ok(o: number): number {
3418                 if(!isWasmInitialized) {
3419                         throw new Error("initializeWasm() must be awaited first!");
3420                 }
3421                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
3422                 return nativeResponseValue;
3423         }
3424         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
3425         export function CResult_NetAddressu8Z_err(e: number): number {
3426                 if(!isWasmInitialized) {
3427                         throw new Error("initializeWasm() must be awaited first!");
3428                 }
3429                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
3430                 return nativeResponseValue;
3431         }
3432         // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
3433         export function CResult_NetAddressu8Z_free(_res: number): void {
3434                 if(!isWasmInitialized) {
3435                         throw new Error("initializeWasm() must be awaited first!");
3436                 }
3437                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
3438                 // debug statements here
3439         }
3440         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
3441         export function CResult_NetAddressu8Z_clone(orig: number): number {
3442                 if(!isWasmInitialized) {
3443                         throw new Error("initializeWasm() must be awaited first!");
3444                 }
3445                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
3446                 return nativeResponseValue;
3447         }
3448         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
3449         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
3450                 if(!isWasmInitialized) {
3451                         throw new Error("initializeWasm() must be awaited first!");
3452                 }
3453                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
3454                 return nativeResponseValue;
3455         }
3456         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
3457         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
3458                 if(!isWasmInitialized) {
3459                         throw new Error("initializeWasm() must be awaited first!");
3460                 }
3461                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
3462                 return nativeResponseValue;
3463         }
3464         // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
3465         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
3466                 if(!isWasmInitialized) {
3467                         throw new Error("initializeWasm() must be awaited first!");
3468                 }
3469                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
3470                 // debug statements here
3471         }
3472         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
3473         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
3474                 if(!isWasmInitialized) {
3475                         throw new Error("initializeWasm() must be awaited first!");
3476                 }
3477                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
3478                 return nativeResponseValue;
3479         }
3480         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
3481         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
3482                 if(!isWasmInitialized) {
3483                         throw new Error("initializeWasm() must be awaited first!");
3484                 }
3485                 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
3486                 // debug statements here
3487         }
3488         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
3489         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
3490                 if(!isWasmInitialized) {
3491                         throw new Error("initializeWasm() must be awaited first!");
3492                 }
3493                 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
3494                 // debug statements here
3495         }
3496         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
3497         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
3498                 if(!isWasmInitialized) {
3499                         throw new Error("initializeWasm() must be awaited first!");
3500                 }
3501                 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
3502                 // debug statements here
3503         }
3504         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
3505         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
3506                 if(!isWasmInitialized) {
3507                         throw new Error("initializeWasm() must be awaited first!");
3508                 }
3509                 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
3510                 // debug statements here
3511         }
3512         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
3513         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
3514                 if(!isWasmInitialized) {
3515                         throw new Error("initializeWasm() must be awaited first!");
3516                 }
3517                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
3518                 return nativeResponseValue;
3519         }
3520         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
3521         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
3522                 if(!isWasmInitialized) {
3523                         throw new Error("initializeWasm() must be awaited first!");
3524                 }
3525                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
3526                 return nativeResponseValue;
3527         }
3528         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
3529         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
3530                 if(!isWasmInitialized) {
3531                         throw new Error("initializeWasm() must be awaited first!");
3532                 }
3533                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
3534                 // debug statements here
3535         }
3536         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
3537         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
3538                 if(!isWasmInitialized) {
3539                         throw new Error("initializeWasm() must be awaited first!");
3540                 }
3541                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
3542                 return nativeResponseValue;
3543         }
3544         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
3545         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
3546                 if(!isWasmInitialized) {
3547                         throw new Error("initializeWasm() must be awaited first!");
3548                 }
3549                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
3550                 return nativeResponseValue;
3551         }
3552         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
3553         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
3554                 if(!isWasmInitialized) {
3555                         throw new Error("initializeWasm() must be awaited first!");
3556                 }
3557                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
3558                 return nativeResponseValue;
3559         }
3560         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
3561         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
3562                 if(!isWasmInitialized) {
3563                         throw new Error("initializeWasm() must be awaited first!");
3564                 }
3565                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
3566                 // debug statements here
3567         }
3568         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
3569         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
3570                 if(!isWasmInitialized) {
3571                         throw new Error("initializeWasm() must be awaited first!");
3572                 }
3573                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
3574                 return nativeResponseValue;
3575         }
3576         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
3577         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
3578                 if(!isWasmInitialized) {
3579                         throw new Error("initializeWasm() must be awaited first!");
3580                 }
3581                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
3582                 return nativeResponseValue;
3583         }
3584         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
3585         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
3586                 if(!isWasmInitialized) {
3587                         throw new Error("initializeWasm() must be awaited first!");
3588                 }
3589                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
3590                 return nativeResponseValue;
3591         }
3592         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
3593         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
3594                 if(!isWasmInitialized) {
3595                         throw new Error("initializeWasm() must be awaited first!");
3596                 }
3597                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
3598                 // debug statements here
3599         }
3600         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
3601         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
3602                 if(!isWasmInitialized) {
3603                         throw new Error("initializeWasm() must be awaited first!");
3604                 }
3605                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
3606                 return nativeResponseValue;
3607         }
3608         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
3609         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
3610                 if(!isWasmInitialized) {
3611                         throw new Error("initializeWasm() must be awaited first!");
3612                 }
3613                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
3614                 return nativeResponseValue;
3615         }
3616         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3617         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
3618                 if(!isWasmInitialized) {
3619                         throw new Error("initializeWasm() must be awaited first!");
3620                 }
3621                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
3622                 return nativeResponseValue;
3623         }
3624         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
3625         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
3626                 if(!isWasmInitialized) {
3627                         throw new Error("initializeWasm() must be awaited first!");
3628                 }
3629                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
3630                 // debug statements here
3631         }
3632         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
3633         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
3634                 if(!isWasmInitialized) {
3635                         throw new Error("initializeWasm() must be awaited first!");
3636                 }
3637                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
3638                 return nativeResponseValue;
3639         }
3640         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
3641         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
3642                 if(!isWasmInitialized) {
3643                         throw new Error("initializeWasm() must be awaited first!");
3644                 }
3645                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
3646                 return nativeResponseValue;
3647         }
3648         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
3649         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
3650                 if(!isWasmInitialized) {
3651                         throw new Error("initializeWasm() must be awaited first!");
3652                 }
3653                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
3654                 return nativeResponseValue;
3655         }
3656         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
3657         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
3658                 if(!isWasmInitialized) {
3659                         throw new Error("initializeWasm() must be awaited first!");
3660                 }
3661                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
3662                 // debug statements here
3663         }
3664         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
3665         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
3666                 if(!isWasmInitialized) {
3667                         throw new Error("initializeWasm() must be awaited first!");
3668                 }
3669                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
3670                 return nativeResponseValue;
3671         }
3672         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
3673         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
3674                 if(!isWasmInitialized) {
3675                         throw new Error("initializeWasm() must be awaited first!");
3676                 }
3677                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
3678                 return nativeResponseValue;
3679         }
3680         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
3681         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
3682                 if(!isWasmInitialized) {
3683                         throw new Error("initializeWasm() must be awaited first!");
3684                 }
3685                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
3686                 return nativeResponseValue;
3687         }
3688         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
3689         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
3690                 if(!isWasmInitialized) {
3691                         throw new Error("initializeWasm() must be awaited first!");
3692                 }
3693                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
3694                 // debug statements here
3695         }
3696         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
3697         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
3698                 if(!isWasmInitialized) {
3699                         throw new Error("initializeWasm() must be awaited first!");
3700                 }
3701                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
3702                 return nativeResponseValue;
3703         }
3704         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
3705         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
3706                 if(!isWasmInitialized) {
3707                         throw new Error("initializeWasm() must be awaited first!");
3708                 }
3709                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
3710                 return nativeResponseValue;
3711         }
3712         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3713         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
3714                 if(!isWasmInitialized) {
3715                         throw new Error("initializeWasm() must be awaited first!");
3716                 }
3717                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
3718                 return nativeResponseValue;
3719         }
3720         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
3721         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
3722                 if(!isWasmInitialized) {
3723                         throw new Error("initializeWasm() must be awaited first!");
3724                 }
3725                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
3726                 // debug statements here
3727         }
3728         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
3729         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
3730                 if(!isWasmInitialized) {
3731                         throw new Error("initializeWasm() must be awaited first!");
3732                 }
3733                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
3734                 return nativeResponseValue;
3735         }
3736         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
3737         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
3738                 if(!isWasmInitialized) {
3739                         throw new Error("initializeWasm() must be awaited first!");
3740                 }
3741                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
3742                 return nativeResponseValue;
3743         }
3744         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
3745         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
3746                 if(!isWasmInitialized) {
3747                         throw new Error("initializeWasm() must be awaited first!");
3748                 }
3749                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
3750                 return nativeResponseValue;
3751         }
3752         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
3753         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
3754                 if(!isWasmInitialized) {
3755                         throw new Error("initializeWasm() must be awaited first!");
3756                 }
3757                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
3758                 // debug statements here
3759         }
3760         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
3761         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
3762                 if(!isWasmInitialized) {
3763                         throw new Error("initializeWasm() must be awaited first!");
3764                 }
3765                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
3766                 return nativeResponseValue;
3767         }
3768         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
3769         export function CResult_InitDecodeErrorZ_ok(o: number): number {
3770                 if(!isWasmInitialized) {
3771                         throw new Error("initializeWasm() must be awaited first!");
3772                 }
3773                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
3774                 return nativeResponseValue;
3775         }
3776         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
3777         export function CResult_InitDecodeErrorZ_err(e: number): number {
3778                 if(!isWasmInitialized) {
3779                         throw new Error("initializeWasm() must be awaited first!");
3780                 }
3781                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
3782                 return nativeResponseValue;
3783         }
3784         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
3785         export function CResult_InitDecodeErrorZ_free(_res: number): void {
3786                 if(!isWasmInitialized) {
3787                         throw new Error("initializeWasm() must be awaited first!");
3788                 }
3789                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
3790                 // debug statements here
3791         }
3792         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
3793         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
3794                 if(!isWasmInitialized) {
3795                         throw new Error("initializeWasm() must be awaited first!");
3796                 }
3797                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
3798                 return nativeResponseValue;
3799         }
3800         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
3801         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
3802                 if(!isWasmInitialized) {
3803                         throw new Error("initializeWasm() must be awaited first!");
3804                 }
3805                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
3806                 return nativeResponseValue;
3807         }
3808         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
3809         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
3810                 if(!isWasmInitialized) {
3811                         throw new Error("initializeWasm() must be awaited first!");
3812                 }
3813                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
3814                 return nativeResponseValue;
3815         }
3816         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
3817         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
3818                 if(!isWasmInitialized) {
3819                         throw new Error("initializeWasm() must be awaited first!");
3820                 }
3821                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
3822                 // debug statements here
3823         }
3824         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
3825         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
3826                 if(!isWasmInitialized) {
3827                         throw new Error("initializeWasm() must be awaited first!");
3828                 }
3829                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
3830                 return nativeResponseValue;
3831         }
3832         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
3833         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
3834                 if(!isWasmInitialized) {
3835                         throw new Error("initializeWasm() must be awaited first!");
3836                 }
3837                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
3838                 return nativeResponseValue;
3839         }
3840         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
3841         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
3842                 if(!isWasmInitialized) {
3843                         throw new Error("initializeWasm() must be awaited first!");
3844                 }
3845                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
3846                 return nativeResponseValue;
3847         }
3848         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
3849         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
3850                 if(!isWasmInitialized) {
3851                         throw new Error("initializeWasm() must be awaited first!");
3852                 }
3853                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
3854                 // debug statements here
3855         }
3856         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
3857         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
3858                 if(!isWasmInitialized) {
3859                         throw new Error("initializeWasm() must be awaited first!");
3860                 }
3861                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
3862                 return nativeResponseValue;
3863         }
3864         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
3865         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
3866                 if(!isWasmInitialized) {
3867                         throw new Error("initializeWasm() must be awaited first!");
3868                 }
3869                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
3870                 return nativeResponseValue;
3871         }
3872         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
3873         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
3874                 if(!isWasmInitialized) {
3875                         throw new Error("initializeWasm() must be awaited first!");
3876                 }
3877                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
3878                 return nativeResponseValue;
3879         }
3880         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
3881         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
3882                 if(!isWasmInitialized) {
3883                         throw new Error("initializeWasm() must be awaited first!");
3884                 }
3885                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
3886                 // debug statements here
3887         }
3888         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
3889         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
3890                 if(!isWasmInitialized) {
3891                         throw new Error("initializeWasm() must be awaited first!");
3892                 }
3893                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
3894                 return nativeResponseValue;
3895         }
3896         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
3897         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
3898                 if(!isWasmInitialized) {
3899                         throw new Error("initializeWasm() must be awaited first!");
3900                 }
3901                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
3902                 return nativeResponseValue;
3903         }
3904         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3905         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
3906                 if(!isWasmInitialized) {
3907                         throw new Error("initializeWasm() must be awaited first!");
3908                 }
3909                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
3910                 return nativeResponseValue;
3911         }
3912         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
3913         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
3914                 if(!isWasmInitialized) {
3915                         throw new Error("initializeWasm() must be awaited first!");
3916                 }
3917                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
3918                 // debug statements here
3919         }
3920         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
3921         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
3922                 if(!isWasmInitialized) {
3923                         throw new Error("initializeWasm() must be awaited first!");
3924                 }
3925                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
3926                 return nativeResponseValue;
3927         }
3928         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
3929         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
3930                 if(!isWasmInitialized) {
3931                         throw new Error("initializeWasm() must be awaited first!");
3932                 }
3933                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
3934                 return nativeResponseValue;
3935         }
3936         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3937         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
3938                 if(!isWasmInitialized) {
3939                         throw new Error("initializeWasm() must be awaited first!");
3940                 }
3941                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
3942                 return nativeResponseValue;
3943         }
3944         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
3945         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
3946                 if(!isWasmInitialized) {
3947                         throw new Error("initializeWasm() must be awaited first!");
3948                 }
3949                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
3950                 // debug statements here
3951         }
3952         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
3953         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
3954                 if(!isWasmInitialized) {
3955                         throw new Error("initializeWasm() must be awaited first!");
3956                 }
3957                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
3958                 return nativeResponseValue;
3959         }
3960         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
3961         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
3962                 if(!isWasmInitialized) {
3963                         throw new Error("initializeWasm() must be awaited first!");
3964                 }
3965                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
3966                 return nativeResponseValue;
3967         }
3968         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
3969         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
3970                 if(!isWasmInitialized) {
3971                         throw new Error("initializeWasm() must be awaited first!");
3972                 }
3973                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
3974                 return nativeResponseValue;
3975         }
3976         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
3977         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
3978                 if(!isWasmInitialized) {
3979                         throw new Error("initializeWasm() must be awaited first!");
3980                 }
3981                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
3982                 // debug statements here
3983         }
3984         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
3985         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
3986                 if(!isWasmInitialized) {
3987                         throw new Error("initializeWasm() must be awaited first!");
3988                 }
3989                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
3990                 return nativeResponseValue;
3991         }
3992         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
3993         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
3994                 if(!isWasmInitialized) {
3995                         throw new Error("initializeWasm() must be awaited first!");
3996                 }
3997                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
3998                 return nativeResponseValue;
3999         }
4000         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
4001         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
4002                 if(!isWasmInitialized) {
4003                         throw new Error("initializeWasm() must be awaited first!");
4004                 }
4005                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
4006                 return nativeResponseValue;
4007         }
4008         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
4009         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
4010                 if(!isWasmInitialized) {
4011                         throw new Error("initializeWasm() must be awaited first!");
4012                 }
4013                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
4014                 // debug statements here
4015         }
4016         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
4017         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
4018                 if(!isWasmInitialized) {
4019                         throw new Error("initializeWasm() must be awaited first!");
4020                 }
4021                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
4022                 return nativeResponseValue;
4023         }
4024         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
4025         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
4026                 if(!isWasmInitialized) {
4027                         throw new Error("initializeWasm() must be awaited first!");
4028                 }
4029                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
4030                 return nativeResponseValue;
4031         }
4032         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
4033         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
4034                 if(!isWasmInitialized) {
4035                         throw new Error("initializeWasm() must be awaited first!");
4036                 }
4037                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
4038                 return nativeResponseValue;
4039         }
4040         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
4041         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
4042                 if(!isWasmInitialized) {
4043                         throw new Error("initializeWasm() must be awaited first!");
4044                 }
4045                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
4046                 // debug statements here
4047         }
4048         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
4049         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
4050                 if(!isWasmInitialized) {
4051                         throw new Error("initializeWasm() must be awaited first!");
4052                 }
4053                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
4054                 return nativeResponseValue;
4055         }
4056         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
4057         export function CResult_PingDecodeErrorZ_ok(o: number): number {
4058                 if(!isWasmInitialized) {
4059                         throw new Error("initializeWasm() must be awaited first!");
4060                 }
4061                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
4062                 return nativeResponseValue;
4063         }
4064         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
4065         export function CResult_PingDecodeErrorZ_err(e: number): number {
4066                 if(!isWasmInitialized) {
4067                         throw new Error("initializeWasm() must be awaited first!");
4068                 }
4069                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
4070                 return nativeResponseValue;
4071         }
4072         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
4073         export function CResult_PingDecodeErrorZ_free(_res: number): void {
4074                 if(!isWasmInitialized) {
4075                         throw new Error("initializeWasm() must be awaited first!");
4076                 }
4077                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
4078                 // debug statements here
4079         }
4080         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
4081         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
4082                 if(!isWasmInitialized) {
4083                         throw new Error("initializeWasm() must be awaited first!");
4084                 }
4085                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
4086                 return nativeResponseValue;
4087         }
4088         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
4089         export function CResult_PongDecodeErrorZ_ok(o: number): number {
4090                 if(!isWasmInitialized) {
4091                         throw new Error("initializeWasm() must be awaited first!");
4092                 }
4093                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
4094                 return nativeResponseValue;
4095         }
4096         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
4097         export function CResult_PongDecodeErrorZ_err(e: number): number {
4098                 if(!isWasmInitialized) {
4099                         throw new Error("initializeWasm() must be awaited first!");
4100                 }
4101                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
4102                 return nativeResponseValue;
4103         }
4104         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
4105         export function CResult_PongDecodeErrorZ_free(_res: number): void {
4106                 if(!isWasmInitialized) {
4107                         throw new Error("initializeWasm() must be awaited first!");
4108                 }
4109                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
4110                 // debug statements here
4111         }
4112         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
4113         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
4114                 if(!isWasmInitialized) {
4115                         throw new Error("initializeWasm() must be awaited first!");
4116                 }
4117                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
4118                 return nativeResponseValue;
4119         }
4120         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
4121         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
4122                 if(!isWasmInitialized) {
4123                         throw new Error("initializeWasm() must be awaited first!");
4124                 }
4125                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
4126                 return nativeResponseValue;
4127         }
4128         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4129         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
4130                 if(!isWasmInitialized) {
4131                         throw new Error("initializeWasm() must be awaited first!");
4132                 }
4133                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
4134                 return nativeResponseValue;
4135         }
4136         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
4137         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
4138                 if(!isWasmInitialized) {
4139                         throw new Error("initializeWasm() must be awaited first!");
4140                 }
4141                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
4142                 // debug statements here
4143         }
4144         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4145         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
4146                 if(!isWasmInitialized) {
4147                         throw new Error("initializeWasm() must be awaited first!");
4148                 }
4149                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
4150                 return nativeResponseValue;
4151         }
4152         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
4153         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
4154                 if(!isWasmInitialized) {
4155                         throw new Error("initializeWasm() must be awaited first!");
4156                 }
4157                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
4158                 return nativeResponseValue;
4159         }
4160         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4161         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
4162                 if(!isWasmInitialized) {
4163                         throw new Error("initializeWasm() must be awaited first!");
4164                 }
4165                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
4166                 return nativeResponseValue;
4167         }
4168         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
4169         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
4170                 if(!isWasmInitialized) {
4171                         throw new Error("initializeWasm() must be awaited first!");
4172                 }
4173                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
4174                 // debug statements here
4175         }
4176         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4177         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
4178                 if(!isWasmInitialized) {
4179                         throw new Error("initializeWasm() must be awaited first!");
4180                 }
4181                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
4182                 return nativeResponseValue;
4183         }
4184         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
4185         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
4186                 if(!isWasmInitialized) {
4187                         throw new Error("initializeWasm() must be awaited first!");
4188                 }
4189                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
4190                 return nativeResponseValue;
4191         }
4192         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4193         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
4194                 if(!isWasmInitialized) {
4195                         throw new Error("initializeWasm() must be awaited first!");
4196                 }
4197                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
4198                 return nativeResponseValue;
4199         }
4200         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
4201         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
4202                 if(!isWasmInitialized) {
4203                         throw new Error("initializeWasm() must be awaited first!");
4204                 }
4205                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
4206                 // debug statements here
4207         }
4208         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4209         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
4210                 if(!isWasmInitialized) {
4211                         throw new Error("initializeWasm() must be awaited first!");
4212                 }
4213                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
4214                 return nativeResponseValue;
4215         }
4216         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
4217         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
4218                 if(!isWasmInitialized) {
4219                         throw new Error("initializeWasm() must be awaited first!");
4220                 }
4221                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
4222                 return nativeResponseValue;
4223         }
4224         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4225         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
4226                 if(!isWasmInitialized) {
4227                         throw new Error("initializeWasm() must be awaited first!");
4228                 }
4229                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
4230                 return nativeResponseValue;
4231         }
4232         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
4233         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
4234                 if(!isWasmInitialized) {
4235                         throw new Error("initializeWasm() must be awaited first!");
4236                 }
4237                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
4238                 // debug statements here
4239         }
4240         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4241         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
4242                 if(!isWasmInitialized) {
4243                         throw new Error("initializeWasm() must be awaited first!");
4244                 }
4245                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
4246                 return nativeResponseValue;
4247         }
4248         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
4249         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
4250                 if(!isWasmInitialized) {
4251                         throw new Error("initializeWasm() must be awaited first!");
4252                 }
4253                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
4254                 return nativeResponseValue;
4255         }
4256         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
4257         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
4258                 if(!isWasmInitialized) {
4259                         throw new Error("initializeWasm() must be awaited first!");
4260                 }
4261                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
4262                 return nativeResponseValue;
4263         }
4264         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
4265         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
4266                 if(!isWasmInitialized) {
4267                         throw new Error("initializeWasm() must be awaited first!");
4268                 }
4269                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
4270                 // debug statements here
4271         }
4272         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
4273         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
4274                 if(!isWasmInitialized) {
4275                         throw new Error("initializeWasm() must be awaited first!");
4276                 }
4277                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
4278                 return nativeResponseValue;
4279         }
4280         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
4281         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
4282                 if(!isWasmInitialized) {
4283                         throw new Error("initializeWasm() must be awaited first!");
4284                 }
4285                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
4286                 return nativeResponseValue;
4287         }
4288         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4289         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
4290                 if(!isWasmInitialized) {
4291                         throw new Error("initializeWasm() must be awaited first!");
4292                 }
4293                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
4294                 return nativeResponseValue;
4295         }
4296         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
4297         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
4298                 if(!isWasmInitialized) {
4299                         throw new Error("initializeWasm() must be awaited first!");
4300                 }
4301                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
4302                 // debug statements here
4303         }
4304         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4305         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4306                 if(!isWasmInitialized) {
4307                         throw new Error("initializeWasm() must be awaited first!");
4308                 }
4309                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
4310                 return nativeResponseValue;
4311         }
4312         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
4313         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
4314                 if(!isWasmInitialized) {
4315                         throw new Error("initializeWasm() must be awaited first!");
4316                 }
4317                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
4318                 return nativeResponseValue;
4319         }
4320         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4321         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
4322                 if(!isWasmInitialized) {
4323                         throw new Error("initializeWasm() must be awaited first!");
4324                 }
4325                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
4326                 return nativeResponseValue;
4327         }
4328         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
4329         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
4330                 if(!isWasmInitialized) {
4331                         throw new Error("initializeWasm() must be awaited first!");
4332                 }
4333                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
4334                 // debug statements here
4335         }
4336         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4337         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4338                 if(!isWasmInitialized) {
4339                         throw new Error("initializeWasm() must be awaited first!");
4340                 }
4341                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
4342                 return nativeResponseValue;
4343         }
4344         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
4345         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
4346                 if(!isWasmInitialized) {
4347                         throw new Error("initializeWasm() must be awaited first!");
4348                 }
4349                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
4350                 return nativeResponseValue;
4351         }
4352         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
4353         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
4354                 if(!isWasmInitialized) {
4355                         throw new Error("initializeWasm() must be awaited first!");
4356                 }
4357                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
4358                 return nativeResponseValue;
4359         }
4360         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
4361         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
4362                 if(!isWasmInitialized) {
4363                         throw new Error("initializeWasm() must be awaited first!");
4364                 }
4365                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
4366                 // debug statements here
4367         }
4368         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
4369         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
4370                 if(!isWasmInitialized) {
4371                         throw new Error("initializeWasm() must be awaited first!");
4372                 }
4373                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
4374                 return nativeResponseValue;
4375         }
4376         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
4377         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
4378                 if(!isWasmInitialized) {
4379                         throw new Error("initializeWasm() must be awaited first!");
4380                 }
4381                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
4382                 return nativeResponseValue;
4383         }
4384         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
4385         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
4386                 if(!isWasmInitialized) {
4387                         throw new Error("initializeWasm() must be awaited first!");
4388                 }
4389                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
4390                 return nativeResponseValue;
4391         }
4392         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
4393         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
4394                 if(!isWasmInitialized) {
4395                         throw new Error("initializeWasm() must be awaited first!");
4396                 }
4397                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
4398                 // debug statements here
4399         }
4400         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
4401         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
4402                 if(!isWasmInitialized) {
4403                         throw new Error("initializeWasm() must be awaited first!");
4404                 }
4405                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
4406                 return nativeResponseValue;
4407         }
4408         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
4409         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
4410                 if(!isWasmInitialized) {
4411                         throw new Error("initializeWasm() must be awaited first!");
4412                 }
4413                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
4414                 return nativeResponseValue;
4415         }
4416         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4417         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
4418                 if(!isWasmInitialized) {
4419                         throw new Error("initializeWasm() must be awaited first!");
4420                 }
4421                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
4422                 return nativeResponseValue;
4423         }
4424         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
4425         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
4426                 if(!isWasmInitialized) {
4427                         throw new Error("initializeWasm() must be awaited first!");
4428                 }
4429                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
4430                 // debug statements here
4431         }
4432         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4433         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
4434                 if(!isWasmInitialized) {
4435                         throw new Error("initializeWasm() must be awaited first!");
4436                 }
4437                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
4438                 return nativeResponseValue;
4439         }
4440         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
4441         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
4442                 if(!isWasmInitialized) {
4443                         throw new Error("initializeWasm() must be awaited first!");
4444                 }
4445                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
4446                 return nativeResponseValue;
4447         }
4448         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4449         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
4450                 if(!isWasmInitialized) {
4451                         throw new Error("initializeWasm() must be awaited first!");
4452                 }
4453                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
4454                 return nativeResponseValue;
4455         }
4456         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
4457         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
4458                 if(!isWasmInitialized) {
4459                         throw new Error("initializeWasm() must be awaited first!");
4460                 }
4461                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
4462                 // debug statements here
4463         }
4464         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4465         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
4466                 if(!isWasmInitialized) {
4467                         throw new Error("initializeWasm() must be awaited first!");
4468                 }
4469                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
4470                 return nativeResponseValue;
4471         }
4472         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
4473         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
4474                 if(!isWasmInitialized) {
4475                         throw new Error("initializeWasm() must be awaited first!");
4476                 }
4477                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
4478                 return nativeResponseValue;
4479         }
4480         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
4481         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
4482                 if(!isWasmInitialized) {
4483                         throw new Error("initializeWasm() must be awaited first!");
4484                 }
4485                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
4486                 return nativeResponseValue;
4487         }
4488         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
4489         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
4490                 if(!isWasmInitialized) {
4491                         throw new Error("initializeWasm() must be awaited first!");
4492                 }
4493                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
4494                 // debug statements here
4495         }
4496         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
4497         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
4498                 if(!isWasmInitialized) {
4499                         throw new Error("initializeWasm() must be awaited first!");
4500                 }
4501                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
4502                 return nativeResponseValue;
4503         }
4504         // void Event_free(struct LDKEvent this_ptr);
4505         export function Event_free(this_ptr: number): void {
4506                 if(!isWasmInitialized) {
4507                         throw new Error("initializeWasm() must be awaited first!");
4508                 }
4509                 const nativeResponseValue = wasm.Event_free(this_ptr);
4510                 // debug statements here
4511         }
4512         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
4513         export function Event_clone(orig: number): number {
4514                 if(!isWasmInitialized) {
4515                         throw new Error("initializeWasm() must be awaited first!");
4516                 }
4517                 const nativeResponseValue = wasm.Event_clone(orig);
4518                 return nativeResponseValue;
4519         }
4520         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
4521         export function Event_write(obj: number): Uint8Array {
4522                 if(!isWasmInitialized) {
4523                         throw new Error("initializeWasm() must be awaited first!");
4524                 }
4525                 const nativeResponseValue = wasm.Event_write(obj);
4526                 return decodeArray(nativeResponseValue);
4527         }
4528         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
4529         export function MessageSendEvent_free(this_ptr: number): void {
4530                 if(!isWasmInitialized) {
4531                         throw new Error("initializeWasm() must be awaited first!");
4532                 }
4533                 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
4534                 // debug statements here
4535         }
4536         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
4537         export function MessageSendEvent_clone(orig: number): number {
4538                 if(!isWasmInitialized) {
4539                         throw new Error("initializeWasm() must be awaited first!");
4540                 }
4541                 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
4542                 return nativeResponseValue;
4543         }
4544         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
4545         export function MessageSendEventsProvider_free(this_ptr: number): void {
4546                 if(!isWasmInitialized) {
4547                         throw new Error("initializeWasm() must be awaited first!");
4548                 }
4549                 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
4550                 // debug statements here
4551         }
4552         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
4553         export function EventsProvider_free(this_ptr: number): void {
4554                 if(!isWasmInitialized) {
4555                         throw new Error("initializeWasm() must be awaited first!");
4556                 }
4557                 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
4558                 // debug statements here
4559         }
4560         // void APIError_free(struct LDKAPIError this_ptr);
4561         export function APIError_free(this_ptr: number): void {
4562                 if(!isWasmInitialized) {
4563                         throw new Error("initializeWasm() must be awaited first!");
4564                 }
4565                 const nativeResponseValue = wasm.APIError_free(this_ptr);
4566                 // debug statements here
4567         }
4568         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
4569         export function APIError_clone(orig: number): number {
4570                 if(!isWasmInitialized) {
4571                         throw new Error("initializeWasm() must be awaited first!");
4572                 }
4573                 const nativeResponseValue = wasm.APIError_clone(orig);
4574                 return nativeResponseValue;
4575         }
4576         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
4577         export function Level_clone(orig: number): LDKLevel {
4578                 if(!isWasmInitialized) {
4579                         throw new Error("initializeWasm() must be awaited first!");
4580                 }
4581                 const nativeResponseValue = wasm.Level_clone(orig);
4582                 return nativeResponseValue;
4583         }
4584         // MUST_USE_RES enum LDKLevel Level_max(void);
4585         export function Level_max(): LDKLevel {
4586                 if(!isWasmInitialized) {
4587                         throw new Error("initializeWasm() must be awaited first!");
4588                 }
4589                 const nativeResponseValue = wasm.Level_max();
4590                 return nativeResponseValue;
4591         }
4592         // void Logger_free(struct LDKLogger this_ptr);
4593         export function Logger_free(this_ptr: number): void {
4594                 if(!isWasmInitialized) {
4595                         throw new Error("initializeWasm() must be awaited first!");
4596                 }
4597                 const nativeResponseValue = wasm.Logger_free(this_ptr);
4598                 // debug statements here
4599         }
4600         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
4601         export function ChannelHandshakeConfig_free(this_obj: number): void {
4602                 if(!isWasmInitialized) {
4603                         throw new Error("initializeWasm() must be awaited first!");
4604                 }
4605                 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
4606                 // debug statements here
4607         }
4608         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4609         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
4610                 if(!isWasmInitialized) {
4611                         throw new Error("initializeWasm() must be awaited first!");
4612                 }
4613                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
4614                 return nativeResponseValue;
4615         }
4616         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
4617         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
4618                 if(!isWasmInitialized) {
4619                         throw new Error("initializeWasm() must be awaited first!");
4620                 }
4621                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
4622                 // debug statements here
4623         }
4624         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4625         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
4626                 if(!isWasmInitialized) {
4627                         throw new Error("initializeWasm() must be awaited first!");
4628                 }
4629                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
4630                 return nativeResponseValue;
4631         }
4632         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
4633         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
4634                 if(!isWasmInitialized) {
4635                         throw new Error("initializeWasm() must be awaited first!");
4636                 }
4637                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
4638                 // debug statements here
4639         }
4640         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4641         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
4642                 if(!isWasmInitialized) {
4643                         throw new Error("initializeWasm() must be awaited first!");
4644                 }
4645                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
4646                 return nativeResponseValue;
4647         }
4648         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
4649         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
4650                 if(!isWasmInitialized) {
4651                         throw new Error("initializeWasm() must be awaited first!");
4652                 }
4653                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
4654                 // debug statements here
4655         }
4656         // 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);
4657         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
4658                 if(!isWasmInitialized) {
4659                         throw new Error("initializeWasm() must be awaited first!");
4660                 }
4661                 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
4662                 return nativeResponseValue;
4663         }
4664         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
4665         export function ChannelHandshakeConfig_clone(orig: number): number {
4666                 if(!isWasmInitialized) {
4667                         throw new Error("initializeWasm() must be awaited first!");
4668                 }
4669                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
4670                 return nativeResponseValue;
4671         }
4672         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
4673         export function ChannelHandshakeConfig_default(): number {
4674                 if(!isWasmInitialized) {
4675                         throw new Error("initializeWasm() must be awaited first!");
4676                 }
4677                 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
4678                 return nativeResponseValue;
4679         }
4680         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
4681         export function ChannelHandshakeLimits_free(this_obj: number): void {
4682                 if(!isWasmInitialized) {
4683                         throw new Error("initializeWasm() must be awaited first!");
4684                 }
4685                 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
4686                 // debug statements here
4687         }
4688         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4689         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
4690                 if(!isWasmInitialized) {
4691                         throw new Error("initializeWasm() must be awaited first!");
4692                 }
4693                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
4694                 return nativeResponseValue;
4695         }
4696         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4697         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
4698                 if(!isWasmInitialized) {
4699                         throw new Error("initializeWasm() must be awaited first!");
4700                 }
4701                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
4702                 // debug statements here
4703         }
4704         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4705         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
4706                 if(!isWasmInitialized) {
4707                         throw new Error("initializeWasm() must be awaited first!");
4708                 }
4709                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
4710                 return nativeResponseValue;
4711         }
4712         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4713         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
4714                 if(!isWasmInitialized) {
4715                         throw new Error("initializeWasm() must be awaited first!");
4716                 }
4717                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
4718                 // debug statements here
4719         }
4720         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4721         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
4722                 if(!isWasmInitialized) {
4723                         throw new Error("initializeWasm() must be awaited first!");
4724                 }
4725                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
4726                 return nativeResponseValue;
4727         }
4728         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4729         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
4730                 if(!isWasmInitialized) {
4731                         throw new Error("initializeWasm() must be awaited first!");
4732                 }
4733                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
4734                 // debug statements here
4735         }
4736         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4737         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
4738                 if(!isWasmInitialized) {
4739                         throw new Error("initializeWasm() must be awaited first!");
4740                 }
4741                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
4742                 return nativeResponseValue;
4743         }
4744         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4745         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
4746                 if(!isWasmInitialized) {
4747                         throw new Error("initializeWasm() must be awaited first!");
4748                 }
4749                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
4750                 // debug statements here
4751         }
4752         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4753         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
4754                 if(!isWasmInitialized) {
4755                         throw new Error("initializeWasm() must be awaited first!");
4756                 }
4757                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
4758                 return nativeResponseValue;
4759         }
4760         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4761         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
4762                 if(!isWasmInitialized) {
4763                         throw new Error("initializeWasm() must be awaited first!");
4764                 }
4765                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
4766                 // debug statements here
4767         }
4768         // uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4769         export function ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr: number): number {
4770                 if(!isWasmInitialized) {
4771                         throw new Error("initializeWasm() must be awaited first!");
4772                 }
4773                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr);
4774                 return nativeResponseValue;
4775         }
4776         // void ChannelHandshakeLimits_set_min_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4777         export function ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr: number, val: number): void {
4778                 if(!isWasmInitialized) {
4779                         throw new Error("initializeWasm() must be awaited first!");
4780                 }
4781                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr, val);
4782                 // debug statements here
4783         }
4784         // uint64_t ChannelHandshakeLimits_get_max_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4785         export function ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr: number): number {
4786                 if(!isWasmInitialized) {
4787                         throw new Error("initializeWasm() must be awaited first!");
4788                 }
4789                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr);
4790                 return nativeResponseValue;
4791         }
4792         // void ChannelHandshakeLimits_set_max_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4793         export function ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr: number, val: number): void {
4794                 if(!isWasmInitialized) {
4795                         throw new Error("initializeWasm() must be awaited first!");
4796                 }
4797                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr, val);
4798                 // debug statements here
4799         }
4800         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4801         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
4802                 if(!isWasmInitialized) {
4803                         throw new Error("initializeWasm() must be awaited first!");
4804                 }
4805                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
4806                 return nativeResponseValue;
4807         }
4808         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
4809         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
4810                 if(!isWasmInitialized) {
4811                         throw new Error("initializeWasm() must be awaited first!");
4812                 }
4813                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
4814                 // debug statements here
4815         }
4816         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4817         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
4818                 if(!isWasmInitialized) {
4819                         throw new Error("initializeWasm() must be awaited first!");
4820                 }
4821                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
4822                 return nativeResponseValue;
4823         }
4824         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
4825         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
4826                 if(!isWasmInitialized) {
4827                         throw new Error("initializeWasm() must be awaited first!");
4828                 }
4829                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
4830                 // debug statements here
4831         }
4832         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4833         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
4834                 if(!isWasmInitialized) {
4835                         throw new Error("initializeWasm() must be awaited first!");
4836                 }
4837                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
4838                 return nativeResponseValue;
4839         }
4840         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4841         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
4842                 if(!isWasmInitialized) {
4843                         throw new Error("initializeWasm() must be awaited first!");
4844                 }
4845                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
4846                 // debug statements here
4847         }
4848         // 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);
4849         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 {
4850                 if(!isWasmInitialized) {
4851                         throw new Error("initializeWasm() must be awaited first!");
4852                 }
4853                 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);
4854                 return nativeResponseValue;
4855         }
4856         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
4857         export function ChannelHandshakeLimits_clone(orig: number): number {
4858                 if(!isWasmInitialized) {
4859                         throw new Error("initializeWasm() must be awaited first!");
4860                 }
4861                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
4862                 return nativeResponseValue;
4863         }
4864         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
4865         export function ChannelHandshakeLimits_default(): number {
4866                 if(!isWasmInitialized) {
4867                         throw new Error("initializeWasm() must be awaited first!");
4868                 }
4869                 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
4870                 return nativeResponseValue;
4871         }
4872         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
4873         export function ChannelConfig_free(this_obj: number): void {
4874                 if(!isWasmInitialized) {
4875                         throw new Error("initializeWasm() must be awaited first!");
4876                 }
4877                 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
4878                 // debug statements here
4879         }
4880         // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4881         export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
4882                 if(!isWasmInitialized) {
4883                         throw new Error("initializeWasm() must be awaited first!");
4884                 }
4885                 const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
4886                 return nativeResponseValue;
4887         }
4888         // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
4889         export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
4890                 if(!isWasmInitialized) {
4891                         throw new Error("initializeWasm() must be awaited first!");
4892                 }
4893                 const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
4894                 // debug statements here
4895         }
4896         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4897         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
4898                 if(!isWasmInitialized) {
4899                         throw new Error("initializeWasm() must be awaited first!");
4900                 }
4901                 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
4902                 return nativeResponseValue;
4903         }
4904         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
4905         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
4906                 if(!isWasmInitialized) {
4907                         throw new Error("initializeWasm() must be awaited first!");
4908                 }
4909                 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
4910                 // debug statements here
4911         }
4912         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4913         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
4914                 if(!isWasmInitialized) {
4915                         throw new Error("initializeWasm() must be awaited first!");
4916                 }
4917                 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
4918                 return nativeResponseValue;
4919         }
4920         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
4921         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
4922                 if(!isWasmInitialized) {
4923                         throw new Error("initializeWasm() must be awaited first!");
4924                 }
4925                 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
4926                 // debug statements here
4927         }
4928         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
4929         export function ChannelConfig_new(fee_proportional_millionths_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
4930                 if(!isWasmInitialized) {
4931                         throw new Error("initializeWasm() must be awaited first!");
4932                 }
4933                 const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
4934                 return nativeResponseValue;
4935         }
4936         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
4937         export function ChannelConfig_clone(orig: number): number {
4938                 if(!isWasmInitialized) {
4939                         throw new Error("initializeWasm() must be awaited first!");
4940                 }
4941                 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
4942                 return nativeResponseValue;
4943         }
4944         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
4945         export function ChannelConfig_default(): number {
4946                 if(!isWasmInitialized) {
4947                         throw new Error("initializeWasm() must be awaited first!");
4948                 }
4949                 const nativeResponseValue = wasm.ChannelConfig_default();
4950                 return nativeResponseValue;
4951         }
4952         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
4953         export function ChannelConfig_write(obj: number): Uint8Array {
4954                 if(!isWasmInitialized) {
4955                         throw new Error("initializeWasm() must be awaited first!");
4956                 }
4957                 const nativeResponseValue = wasm.ChannelConfig_write(obj);
4958                 return decodeArray(nativeResponseValue);
4959         }
4960         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
4961         export function ChannelConfig_read(ser: Uint8Array): number {
4962                 if(!isWasmInitialized) {
4963                         throw new Error("initializeWasm() must be awaited first!");
4964                 }
4965                 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
4966                 return nativeResponseValue;
4967         }
4968         // void UserConfig_free(struct LDKUserConfig this_obj);
4969         export function UserConfig_free(this_obj: number): void {
4970                 if(!isWasmInitialized) {
4971                         throw new Error("initializeWasm() must be awaited first!");
4972                 }
4973                 const nativeResponseValue = wasm.UserConfig_free(this_obj);
4974                 // debug statements here
4975         }
4976         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
4977         export function UserConfig_get_own_channel_config(this_ptr: number): number {
4978                 if(!isWasmInitialized) {
4979                         throw new Error("initializeWasm() must be awaited first!");
4980                 }
4981                 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
4982                 return nativeResponseValue;
4983         }
4984         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
4985         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
4986                 if(!isWasmInitialized) {
4987                         throw new Error("initializeWasm() must be awaited first!");
4988                 }
4989                 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
4990                 // debug statements here
4991         }
4992         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
4993         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
4994                 if(!isWasmInitialized) {
4995                         throw new Error("initializeWasm() must be awaited first!");
4996                 }
4997                 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
4998                 return nativeResponseValue;
4999         }
5000         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
5001         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
5002                 if(!isWasmInitialized) {
5003                         throw new Error("initializeWasm() must be awaited first!");
5004                 }
5005                 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
5006                 // debug statements here
5007         }
5008         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5009         export function UserConfig_get_channel_options(this_ptr: number): number {
5010                 if(!isWasmInitialized) {
5011                         throw new Error("initializeWasm() must be awaited first!");
5012                 }
5013                 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
5014                 return nativeResponseValue;
5015         }
5016         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
5017         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
5018                 if(!isWasmInitialized) {
5019                         throw new Error("initializeWasm() must be awaited first!");
5020                 }
5021                 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
5022                 // debug statements here
5023         }
5024         // 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);
5025         export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
5026                 if(!isWasmInitialized) {
5027                         throw new Error("initializeWasm() must be awaited first!");
5028                 }
5029                 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
5030                 return nativeResponseValue;
5031         }
5032         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
5033         export function UserConfig_clone(orig: number): number {
5034                 if(!isWasmInitialized) {
5035                         throw new Error("initializeWasm() must be awaited first!");
5036                 }
5037                 const nativeResponseValue = wasm.UserConfig_clone(orig);
5038                 return nativeResponseValue;
5039         }
5040         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
5041         export function UserConfig_default(): number {
5042                 if(!isWasmInitialized) {
5043                         throw new Error("initializeWasm() must be awaited first!");
5044                 }
5045                 const nativeResponseValue = wasm.UserConfig_default();
5046                 return nativeResponseValue;
5047         }
5048         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
5049         export function AccessError_clone(orig: number): LDKAccessError {
5050                 if(!isWasmInitialized) {
5051                         throw new Error("initializeWasm() must be awaited first!");
5052                 }
5053                 const nativeResponseValue = wasm.AccessError_clone(orig);
5054                 return nativeResponseValue;
5055         }
5056         // void Access_free(struct LDKAccess this_ptr);
5057         export function Access_free(this_ptr: number): void {
5058                 if(!isWasmInitialized) {
5059                         throw new Error("initializeWasm() must be awaited first!");
5060                 }
5061                 const nativeResponseValue = wasm.Access_free(this_ptr);
5062                 // debug statements here
5063         }
5064         // void Listen_free(struct LDKListen this_ptr);
5065         export function Listen_free(this_ptr: number): void {
5066                 if(!isWasmInitialized) {
5067                         throw new Error("initializeWasm() must be awaited first!");
5068                 }
5069                 const nativeResponseValue = wasm.Listen_free(this_ptr);
5070                 // debug statements here
5071         }
5072         // void Watch_free(struct LDKWatch this_ptr);
5073         export function Watch_free(this_ptr: number): void {
5074                 if(!isWasmInitialized) {
5075                         throw new Error("initializeWasm() must be awaited first!");
5076                 }
5077                 const nativeResponseValue = wasm.Watch_free(this_ptr);
5078                 // debug statements here
5079         }
5080         // void Filter_free(struct LDKFilter this_ptr);
5081         export function Filter_free(this_ptr: number): void {
5082                 if(!isWasmInitialized) {
5083                         throw new Error("initializeWasm() must be awaited first!");
5084                 }
5085                 const nativeResponseValue = wasm.Filter_free(this_ptr);
5086                 // debug statements here
5087         }
5088         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
5089         export function BroadcasterInterface_free(this_ptr: number): void {
5090                 if(!isWasmInitialized) {
5091                         throw new Error("initializeWasm() must be awaited first!");
5092                 }
5093                 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
5094                 // debug statements here
5095         }
5096         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
5097         export function ConfirmationTarget_clone(orig: number): LDKConfirmationTarget {
5098                 if(!isWasmInitialized) {
5099                         throw new Error("initializeWasm() must be awaited first!");
5100                 }
5101                 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
5102                 return nativeResponseValue;
5103         }
5104         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
5105         export function FeeEstimator_free(this_ptr: number): void {
5106                 if(!isWasmInitialized) {
5107                         throw new Error("initializeWasm() must be awaited first!");
5108                 }
5109                 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
5110                 // debug statements here
5111         }
5112         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
5113         export function ChainMonitor_free(this_obj: number): void {
5114                 if(!isWasmInitialized) {
5115                         throw new Error("initializeWasm() must be awaited first!");
5116                 }
5117                 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
5118                 // debug statements here
5119         }
5120         // void ChainMonitor_block_connected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
5121         export function ChainMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
5122                 if(!isWasmInitialized) {
5123                         throw new Error("initializeWasm() must be awaited first!");
5124                 }
5125                 const nativeResponseValue = wasm.ChainMonitor_block_connected(this_arg, encodeArray(header), txdata, height);
5126                 // debug statements here
5127         }
5128         // void ChainMonitor_block_disconnected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t disconnected_height);
5129         export function ChainMonitor_block_disconnected(this_arg: number, header: Uint8Array, disconnected_height: number): void {
5130                 if(!isWasmInitialized) {
5131                         throw new Error("initializeWasm() must be awaited first!");
5132                 }
5133                 const nativeResponseValue = wasm.ChainMonitor_block_disconnected(this_arg, encodeArray(header), disconnected_height);
5134                 // debug statements here
5135         }
5136         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
5137         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
5138                 if(!isWasmInitialized) {
5139                         throw new Error("initializeWasm() must be awaited first!");
5140                 }
5141                 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
5142                 return nativeResponseValue;
5143         }
5144         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5145         export function ChainMonitor_as_Watch(this_arg: number): number {
5146                 if(!isWasmInitialized) {
5147                         throw new Error("initializeWasm() must be awaited first!");
5148                 }
5149                 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
5150                 return nativeResponseValue;
5151         }
5152         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5153         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
5154                 if(!isWasmInitialized) {
5155                         throw new Error("initializeWasm() must be awaited first!");
5156                 }
5157                 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
5158                 return nativeResponseValue;
5159         }
5160         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
5161         export function ChannelMonitorUpdate_free(this_obj: number): void {
5162                 if(!isWasmInitialized) {
5163                         throw new Error("initializeWasm() must be awaited first!");
5164                 }
5165                 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
5166                 // debug statements here
5167         }
5168         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
5169         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
5170                 if(!isWasmInitialized) {
5171                         throw new Error("initializeWasm() must be awaited first!");
5172                 }
5173                 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
5174                 return nativeResponseValue;
5175         }
5176         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
5177         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
5178                 if(!isWasmInitialized) {
5179                         throw new Error("initializeWasm() must be awaited first!");
5180                 }
5181                 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
5182                 // debug statements here
5183         }
5184         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
5185         export function ChannelMonitorUpdate_clone(orig: number): number {
5186                 if(!isWasmInitialized) {
5187                         throw new Error("initializeWasm() must be awaited first!");
5188                 }
5189                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
5190                 return nativeResponseValue;
5191         }
5192         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
5193         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
5194                 if(!isWasmInitialized) {
5195                         throw new Error("initializeWasm() must be awaited first!");
5196                 }
5197                 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
5198                 return decodeArray(nativeResponseValue);
5199         }
5200         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
5201         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
5202                 if(!isWasmInitialized) {
5203                         throw new Error("initializeWasm() must be awaited first!");
5204                 }
5205                 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
5206                 return nativeResponseValue;
5207         }
5208         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
5209         export function ChannelMonitorUpdateErr_clone(orig: number): LDKChannelMonitorUpdateErr {
5210                 if(!isWasmInitialized) {
5211                         throw new Error("initializeWasm() must be awaited first!");
5212                 }
5213                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
5214                 return nativeResponseValue;
5215         }
5216         // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
5217         export function MonitorUpdateError_free(this_obj: number): void {
5218                 if(!isWasmInitialized) {
5219                         throw new Error("initializeWasm() must be awaited first!");
5220                 }
5221                 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
5222                 // debug statements here
5223         }
5224         // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
5225         export function MonitorUpdateError_clone(orig: number): number {
5226                 if(!isWasmInitialized) {
5227                         throw new Error("initializeWasm() must be awaited first!");
5228                 }
5229                 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
5230                 return nativeResponseValue;
5231         }
5232         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
5233         export function MonitorEvent_free(this_ptr: number): void {
5234                 if(!isWasmInitialized) {
5235                         throw new Error("initializeWasm() must be awaited first!");
5236                 }
5237                 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
5238                 // debug statements here
5239         }
5240         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
5241         export function MonitorEvent_clone(orig: number): number {
5242                 if(!isWasmInitialized) {
5243                         throw new Error("initializeWasm() must be awaited first!");
5244                 }
5245                 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
5246                 return nativeResponseValue;
5247         }
5248         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
5249         export function HTLCUpdate_free(this_obj: number): void {
5250                 if(!isWasmInitialized) {
5251                         throw new Error("initializeWasm() must be awaited first!");
5252                 }
5253                 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
5254                 // debug statements here
5255         }
5256         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
5257         export function HTLCUpdate_clone(orig: number): number {
5258                 if(!isWasmInitialized) {
5259                         throw new Error("initializeWasm() must be awaited first!");
5260                 }
5261                 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
5262                 return nativeResponseValue;
5263         }
5264         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
5265         export function HTLCUpdate_write(obj: number): Uint8Array {
5266                 if(!isWasmInitialized) {
5267                         throw new Error("initializeWasm() must be awaited first!");
5268                 }
5269                 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
5270                 return decodeArray(nativeResponseValue);
5271         }
5272         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
5273         export function HTLCUpdate_read(ser: Uint8Array): number {
5274                 if(!isWasmInitialized) {
5275                         throw new Error("initializeWasm() must be awaited first!");
5276                 }
5277                 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
5278                 return nativeResponseValue;
5279         }
5280         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
5281         export function ChannelMonitor_free(this_obj: number): void {
5282                 if(!isWasmInitialized) {
5283                         throw new Error("initializeWasm() must be awaited first!");
5284                 }
5285                 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
5286                 // debug statements here
5287         }
5288         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
5289         export function ChannelMonitor_clone(orig: number): number {
5290                 if(!isWasmInitialized) {
5291                         throw new Error("initializeWasm() must be awaited first!");
5292                 }
5293                 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
5294                 return nativeResponseValue;
5295         }
5296         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
5297         export function ChannelMonitor_write(obj: number): Uint8Array {
5298                 if(!isWasmInitialized) {
5299                         throw new Error("initializeWasm() must be awaited first!");
5300                 }
5301                 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
5302                 return decodeArray(nativeResponseValue);
5303         }
5304         // 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);
5305         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
5306                 if(!isWasmInitialized) {
5307                         throw new Error("initializeWasm() must be awaited first!");
5308                 }
5309                 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
5310                 return nativeResponseValue;
5311         }
5312         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5313         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
5314                 if(!isWasmInitialized) {
5315                         throw new Error("initializeWasm() must be awaited first!");
5316                 }
5317                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
5318                 return nativeResponseValue;
5319         }
5320         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5321         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
5322                 if(!isWasmInitialized) {
5323                         throw new Error("initializeWasm() must be awaited first!");
5324                 }
5325                 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
5326                 return nativeResponseValue;
5327         }
5328         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5329         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
5330                 if(!isWasmInitialized) {
5331                         throw new Error("initializeWasm() must be awaited first!");
5332                 }
5333                 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
5334                 return nativeResponseValue;
5335         }
5336         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
5337         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
5338                 if(!isWasmInitialized) {
5339                         throw new Error("initializeWasm() must be awaited first!");
5340                 }
5341                 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
5342                 // debug statements here
5343         }
5344         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5345         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
5346                 if(!isWasmInitialized) {
5347                         throw new Error("initializeWasm() must be awaited first!");
5348                 }
5349                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
5350                 return nativeResponseValue;
5351         }
5352         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5353         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
5354                 if(!isWasmInitialized) {
5355                         throw new Error("initializeWasm() must be awaited first!");
5356                 }
5357                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
5358                 return nativeResponseValue;
5359         }
5360         // 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);
5361         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
5362                 if(!isWasmInitialized) {
5363                         throw new Error("initializeWasm() must be awaited first!");
5364                 }
5365                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
5366                 return nativeResponseValue;
5367         }
5368         // 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);
5369         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
5370                 if(!isWasmInitialized) {
5371                         throw new Error("initializeWasm() must be awaited first!");
5372                 }
5373                 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
5374                 return nativeResponseValue;
5375         }
5376         // 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);
5377         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
5378                 if(!isWasmInitialized) {
5379                         throw new Error("initializeWasm() must be awaited first!");
5380                 }
5381                 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
5382                 // debug statements here
5383         }
5384         // void Persist_free(struct LDKPersist this_ptr);
5385         export function Persist_free(this_ptr: number): void {
5386                 if(!isWasmInitialized) {
5387                         throw new Error("initializeWasm() must be awaited first!");
5388                 }
5389                 const nativeResponseValue = wasm.Persist_free(this_ptr);
5390                 // debug statements here
5391         }
5392         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
5393         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
5394                 if(!isWasmInitialized) {
5395                         throw new Error("initializeWasm() must be awaited first!");
5396                 }
5397                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
5398                 return nativeResponseValue;
5399         }
5400         // void OutPoint_free(struct LDKOutPoint this_obj);
5401         export function OutPoint_free(this_obj: number): void {
5402                 if(!isWasmInitialized) {
5403                         throw new Error("initializeWasm() must be awaited first!");
5404                 }
5405                 const nativeResponseValue = wasm.OutPoint_free(this_obj);
5406                 // debug statements here
5407         }
5408         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
5409         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
5410                 if(!isWasmInitialized) {
5411                         throw new Error("initializeWasm() must be awaited first!");
5412                 }
5413                 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
5414                 return decodeArray(nativeResponseValue);
5415         }
5416         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5417         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
5418                 if(!isWasmInitialized) {
5419                         throw new Error("initializeWasm() must be awaited first!");
5420                 }
5421                 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
5422                 // debug statements here
5423         }
5424         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
5425         export function OutPoint_get_index(this_ptr: number): number {
5426                 if(!isWasmInitialized) {
5427                         throw new Error("initializeWasm() must be awaited first!");
5428                 }
5429                 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
5430                 return nativeResponseValue;
5431         }
5432         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
5433         export function OutPoint_set_index(this_ptr: number, val: number): void {
5434                 if(!isWasmInitialized) {
5435                         throw new Error("initializeWasm() must be awaited first!");
5436                 }
5437                 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
5438                 // debug statements here
5439         }
5440         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
5441         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
5442                 if(!isWasmInitialized) {
5443                         throw new Error("initializeWasm() must be awaited first!");
5444                 }
5445                 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
5446                 return nativeResponseValue;
5447         }
5448         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
5449         export function OutPoint_clone(orig: number): number {
5450                 if(!isWasmInitialized) {
5451                         throw new Error("initializeWasm() must be awaited first!");
5452                 }
5453                 const nativeResponseValue = wasm.OutPoint_clone(orig);
5454                 return nativeResponseValue;
5455         }
5456         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
5457         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
5458                 if(!isWasmInitialized) {
5459                         throw new Error("initializeWasm() must be awaited first!");
5460                 }
5461                 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
5462                 return decodeArray(nativeResponseValue);
5463         }
5464         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
5465         export function OutPoint_write(obj: number): Uint8Array {
5466                 if(!isWasmInitialized) {
5467                         throw new Error("initializeWasm() must be awaited first!");
5468                 }
5469                 const nativeResponseValue = wasm.OutPoint_write(obj);
5470                 return decodeArray(nativeResponseValue);
5471         }
5472         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
5473         export function OutPoint_read(ser: Uint8Array): number {
5474                 if(!isWasmInitialized) {
5475                         throw new Error("initializeWasm() must be awaited first!");
5476                 }
5477                 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
5478                 return nativeResponseValue;
5479         }
5480         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
5481         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
5482                 if(!isWasmInitialized) {
5483                         throw new Error("initializeWasm() must be awaited first!");
5484                 }
5485                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
5486                 // debug statements here
5487         }
5488         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5489         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5490                 if(!isWasmInitialized) {
5491                         throw new Error("initializeWasm() must be awaited first!");
5492                 }
5493                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
5494                 return nativeResponseValue;
5495         }
5496         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5497         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5498                 if(!isWasmInitialized) {
5499                         throw new Error("initializeWasm() must be awaited first!");
5500                 }
5501                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5502                 // debug statements here
5503         }
5504         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5505         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
5506                 if(!isWasmInitialized) {
5507                         throw new Error("initializeWasm() must be awaited first!");
5508                 }
5509                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
5510                 return decodeArray(nativeResponseValue);
5511         }
5512         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5513         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5514                 if(!isWasmInitialized) {
5515                         throw new Error("initializeWasm() must be awaited first!");
5516                 }
5517                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
5518                 // debug statements here
5519         }
5520         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5521         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
5522                 if(!isWasmInitialized) {
5523                         throw new Error("initializeWasm() must be awaited first!");
5524                 }
5525                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
5526                 return nativeResponseValue;
5527         }
5528         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
5529         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
5530                 if(!isWasmInitialized) {
5531                         throw new Error("initializeWasm() must be awaited first!");
5532                 }
5533                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
5534                 // debug statements here
5535         }
5536         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5537         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5538                 if(!isWasmInitialized) {
5539                         throw new Error("initializeWasm() must be awaited first!");
5540                 }
5541                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
5542                 // debug statements here
5543         }
5544         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5545         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
5546                 if(!isWasmInitialized) {
5547                         throw new Error("initializeWasm() must be awaited first!");
5548                 }
5549                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
5550                 return decodeArray(nativeResponseValue);
5551         }
5552         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5553         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
5554                 if(!isWasmInitialized) {
5555                         throw new Error("initializeWasm() must be awaited first!");
5556                 }
5557                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
5558                 // debug statements here
5559         }
5560         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5561         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5562                 if(!isWasmInitialized) {
5563                         throw new Error("initializeWasm() must be awaited first!");
5564                 }
5565                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5566                 return decodeArray(nativeResponseValue);
5567         }
5568         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5569         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
5570                 if(!isWasmInitialized) {
5571                         throw new Error("initializeWasm() must be awaited first!");
5572                 }
5573                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5574                 // debug statements here
5575         }
5576         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5577         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5578                 if(!isWasmInitialized) {
5579                         throw new Error("initializeWasm() must be awaited first!");
5580                 }
5581                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5582                 return nativeResponseValue;
5583         }
5584         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5585         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
5586                 if(!isWasmInitialized) {
5587                         throw new Error("initializeWasm() must be awaited first!");
5588                 }
5589                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5590                 // debug statements here
5591         }
5592         // 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);
5593         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 {
5594                 if(!isWasmInitialized) {
5595                         throw new Error("initializeWasm() must be awaited first!");
5596                 }
5597                 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);
5598                 return nativeResponseValue;
5599         }
5600         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
5601         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
5602                 if(!isWasmInitialized) {
5603                         throw new Error("initializeWasm() must be awaited first!");
5604                 }
5605                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
5606                 return nativeResponseValue;
5607         }
5608         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
5609         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
5610                 if(!isWasmInitialized) {
5611                         throw new Error("initializeWasm() must be awaited first!");
5612                 }
5613                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
5614                 // debug statements here
5615         }
5616         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5617         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5618                 if(!isWasmInitialized) {
5619                         throw new Error("initializeWasm() must be awaited first!");
5620                 }
5621                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
5622                 return nativeResponseValue;
5623         }
5624         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5625         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5626                 if(!isWasmInitialized) {
5627                         throw new Error("initializeWasm() must be awaited first!");
5628                 }
5629                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5630                 // debug statements here
5631         }
5632         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5633         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5634                 if(!isWasmInitialized) {
5635                         throw new Error("initializeWasm() must be awaited first!");
5636                 }
5637                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
5638                 // debug statements here
5639         }
5640         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5641         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5642                 if(!isWasmInitialized) {
5643                         throw new Error("initializeWasm() must be awaited first!");
5644                 }
5645                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5646                 return decodeArray(nativeResponseValue);
5647         }
5648         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5649         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
5650                 if(!isWasmInitialized) {
5651                         throw new Error("initializeWasm() must be awaited first!");
5652                 }
5653                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5654                 // debug statements here
5655         }
5656         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5657         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5658                 if(!isWasmInitialized) {
5659                         throw new Error("initializeWasm() must be awaited first!");
5660                 }
5661                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5662                 return nativeResponseValue;
5663         }
5664         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5665         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
5666                 if(!isWasmInitialized) {
5667                         throw new Error("initializeWasm() must be awaited first!");
5668                 }
5669                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5670                 // debug statements here
5671         }
5672         // 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);
5673         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
5674                 if(!isWasmInitialized) {
5675                         throw new Error("initializeWasm() must be awaited first!");
5676                 }
5677                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
5678                 return nativeResponseValue;
5679         }
5680         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
5681         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
5682                 if(!isWasmInitialized) {
5683                         throw new Error("initializeWasm() must be awaited first!");
5684                 }
5685                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
5686                 return nativeResponseValue;
5687         }
5688         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
5689         export function SpendableOutputDescriptor_free(this_ptr: number): void {
5690                 if(!isWasmInitialized) {
5691                         throw new Error("initializeWasm() must be awaited first!");
5692                 }
5693                 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
5694                 // debug statements here
5695         }
5696         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
5697         export function SpendableOutputDescriptor_clone(orig: number): number {
5698                 if(!isWasmInitialized) {
5699                         throw new Error("initializeWasm() must be awaited first!");
5700                 }
5701                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
5702                 return nativeResponseValue;
5703         }
5704         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
5705         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
5706                 if(!isWasmInitialized) {
5707                         throw new Error("initializeWasm() must be awaited first!");
5708                 }
5709                 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
5710                 return decodeArray(nativeResponseValue);
5711         }
5712         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
5713         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
5714                 if(!isWasmInitialized) {
5715                         throw new Error("initializeWasm() must be awaited first!");
5716                 }
5717                 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
5718                 return nativeResponseValue;
5719         }
5720         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
5721         export function Sign_clone(orig: number): number {
5722                 if(!isWasmInitialized) {
5723                         throw new Error("initializeWasm() must be awaited first!");
5724                 }
5725                 const nativeResponseValue = wasm.Sign_clone(orig);
5726                 return nativeResponseValue;
5727         }
5728         // void Sign_free(struct LDKSign this_ptr);
5729         export function Sign_free(this_ptr: number): void {
5730                 if(!isWasmInitialized) {
5731                         throw new Error("initializeWasm() must be awaited first!");
5732                 }
5733                 const nativeResponseValue = wasm.Sign_free(this_ptr);
5734                 // debug statements here
5735         }
5736         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
5737         export function KeysInterface_free(this_ptr: number): void {
5738                 if(!isWasmInitialized) {
5739                         throw new Error("initializeWasm() must be awaited first!");
5740                 }
5741                 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
5742                 // debug statements here
5743         }
5744         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
5745         export function InMemorySigner_free(this_obj: number): void {
5746                 if(!isWasmInitialized) {
5747                         throw new Error("initializeWasm() must be awaited first!");
5748                 }
5749                 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
5750                 // debug statements here
5751         }
5752         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5753         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
5754                 if(!isWasmInitialized) {
5755                         throw new Error("initializeWasm() must be awaited first!");
5756                 }
5757                 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
5758                 return decodeArray(nativeResponseValue);
5759         }
5760         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5761         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
5762                 if(!isWasmInitialized) {
5763                         throw new Error("initializeWasm() must be awaited first!");
5764                 }
5765                 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
5766                 // debug statements here
5767         }
5768         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5769         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
5770                 if(!isWasmInitialized) {
5771                         throw new Error("initializeWasm() must be awaited first!");
5772                 }
5773                 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
5774                 return decodeArray(nativeResponseValue);
5775         }
5776         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5777         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
5778                 if(!isWasmInitialized) {
5779                         throw new Error("initializeWasm() must be awaited first!");
5780                 }
5781                 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
5782                 // debug statements here
5783         }
5784         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5785         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
5786                 if(!isWasmInitialized) {
5787                         throw new Error("initializeWasm() must be awaited first!");
5788                 }
5789                 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
5790                 return decodeArray(nativeResponseValue);
5791         }
5792         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5793         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
5794                 if(!isWasmInitialized) {
5795                         throw new Error("initializeWasm() must be awaited first!");
5796                 }
5797                 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
5798                 // debug statements here
5799         }
5800         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5801         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
5802                 if(!isWasmInitialized) {
5803                         throw new Error("initializeWasm() must be awaited first!");
5804                 }
5805                 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
5806                 return decodeArray(nativeResponseValue);
5807         }
5808         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5809         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
5810                 if(!isWasmInitialized) {
5811                         throw new Error("initializeWasm() must be awaited first!");
5812                 }
5813                 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
5814                 // debug statements here
5815         }
5816         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5817         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
5818                 if(!isWasmInitialized) {
5819                         throw new Error("initializeWasm() must be awaited first!");
5820                 }
5821                 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
5822                 return decodeArray(nativeResponseValue);
5823         }
5824         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5825         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
5826                 if(!isWasmInitialized) {
5827                         throw new Error("initializeWasm() must be awaited first!");
5828                 }
5829                 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
5830                 // debug statements here
5831         }
5832         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5833         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
5834                 if(!isWasmInitialized) {
5835                         throw new Error("initializeWasm() must be awaited first!");
5836                 }
5837                 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
5838                 return decodeArray(nativeResponseValue);
5839         }
5840         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5841         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
5842                 if(!isWasmInitialized) {
5843                         throw new Error("initializeWasm() must be awaited first!");
5844                 }
5845                 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
5846                 // debug statements here
5847         }
5848         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
5849         export function InMemorySigner_clone(orig: number): number {
5850                 if(!isWasmInitialized) {
5851                         throw new Error("initializeWasm() must be awaited first!");
5852                 }
5853                 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
5854                 return nativeResponseValue;
5855         }
5856         // 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);
5857         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 {
5858                 if(!isWasmInitialized) {
5859                         throw new Error("initializeWasm() must be awaited first!");
5860                 }
5861                 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));
5862                 return nativeResponseValue;
5863         }
5864         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5865         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
5866                 if(!isWasmInitialized) {
5867                         throw new Error("initializeWasm() must be awaited first!");
5868                 }
5869                 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
5870                 return nativeResponseValue;
5871         }
5872         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5873         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
5874                 if(!isWasmInitialized) {
5875                         throw new Error("initializeWasm() must be awaited first!");
5876                 }
5877                 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
5878                 return nativeResponseValue;
5879         }
5880         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5881         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
5882                 if(!isWasmInitialized) {
5883                         throw new Error("initializeWasm() must be awaited first!");
5884                 }
5885                 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
5886                 return nativeResponseValue;
5887         }
5888         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5889         export function InMemorySigner_is_outbound(this_arg: number): boolean {
5890                 if(!isWasmInitialized) {
5891                         throw new Error("initializeWasm() must be awaited first!");
5892                 }
5893                 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
5894                 return nativeResponseValue;
5895         }
5896         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5897         export function InMemorySigner_funding_outpoint(this_arg: number): number {
5898                 if(!isWasmInitialized) {
5899                         throw new Error("initializeWasm() must be awaited first!");
5900                 }
5901                 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
5902                 return nativeResponseValue;
5903         }
5904         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5905         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
5906                 if(!isWasmInitialized) {
5907                         throw new Error("initializeWasm() must be awaited first!");
5908                 }
5909                 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
5910                 return nativeResponseValue;
5911         }
5912         // 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);
5913         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
5914                 if(!isWasmInitialized) {
5915                         throw new Error("initializeWasm() must be awaited first!");
5916                 }
5917                 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
5918                 return nativeResponseValue;
5919         }
5920         // 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);
5921         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
5922                 if(!isWasmInitialized) {
5923                         throw new Error("initializeWasm() must be awaited first!");
5924                 }
5925                 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
5926                 return nativeResponseValue;
5927         }
5928         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5929         export function InMemorySigner_as_Sign(this_arg: number): number {
5930                 if(!isWasmInitialized) {
5931                         throw new Error("initializeWasm() must be awaited first!");
5932                 }
5933                 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
5934                 return nativeResponseValue;
5935         }
5936         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
5937         export function InMemorySigner_write(obj: number): Uint8Array {
5938                 if(!isWasmInitialized) {
5939                         throw new Error("initializeWasm() must be awaited first!");
5940                 }
5941                 const nativeResponseValue = wasm.InMemorySigner_write(obj);
5942                 return decodeArray(nativeResponseValue);
5943         }
5944         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
5945         export function InMemorySigner_read(ser: Uint8Array): number {
5946                 if(!isWasmInitialized) {
5947                         throw new Error("initializeWasm() must be awaited first!");
5948                 }
5949                 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
5950                 return nativeResponseValue;
5951         }
5952         // void KeysManager_free(struct LDKKeysManager this_obj);
5953         export function KeysManager_free(this_obj: number): void {
5954                 if(!isWasmInitialized) {
5955                         throw new Error("initializeWasm() must be awaited first!");
5956                 }
5957                 const nativeResponseValue = wasm.KeysManager_free(this_obj);
5958                 // debug statements here
5959         }
5960         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
5961         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
5962                 if(!isWasmInitialized) {
5963                         throw new Error("initializeWasm() must be awaited first!");
5964                 }
5965                 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
5966                 return nativeResponseValue;
5967         }
5968         // 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]);
5969         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
5970                 if(!isWasmInitialized) {
5971                         throw new Error("initializeWasm() must be awaited first!");
5972                 }
5973                 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
5974                 return nativeResponseValue;
5975         }
5976         // 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);
5977         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
5978                 if(!isWasmInitialized) {
5979                         throw new Error("initializeWasm() must be awaited first!");
5980                 }
5981                 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
5982                 return nativeResponseValue;
5983         }
5984         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
5985         export function KeysManager_as_KeysInterface(this_arg: number): number {
5986                 if(!isWasmInitialized) {
5987                         throw new Error("initializeWasm() must be awaited first!");
5988                 }
5989                 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
5990                 return nativeResponseValue;
5991         }
5992         // void ChannelManager_free(struct LDKChannelManager this_obj);
5993         export function ChannelManager_free(this_obj: number): void {
5994                 if(!isWasmInitialized) {
5995                         throw new Error("initializeWasm() must be awaited first!");
5996                 }
5997                 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
5998                 // debug statements here
5999         }
6000         // void ChainParameters_free(struct LDKChainParameters this_obj);
6001         export function ChainParameters_free(this_obj: number): void {
6002                 if(!isWasmInitialized) {
6003                         throw new Error("initializeWasm() must be awaited first!");
6004                 }
6005                 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
6006                 // debug statements here
6007         }
6008         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
6009         export function ChainParameters_get_network(this_ptr: number): LDKNetwork {
6010                 if(!isWasmInitialized) {
6011                         throw new Error("initializeWasm() must be awaited first!");
6012                 }
6013                 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
6014                 return nativeResponseValue;
6015         }
6016         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
6017         export function ChainParameters_set_network(this_ptr: number, val: LDKNetwork): void {
6018                 if(!isWasmInitialized) {
6019                         throw new Error("initializeWasm() must be awaited first!");
6020                 }
6021                 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
6022                 // debug statements here
6023         }
6024         // const uint8_t (*ChainParameters_get_latest_hash(const struct LDKChainParameters *NONNULL_PTR this_ptr))[32];
6025         export function ChainParameters_get_latest_hash(this_ptr: number): Uint8Array {
6026                 if(!isWasmInitialized) {
6027                         throw new Error("initializeWasm() must be awaited first!");
6028                 }
6029                 const nativeResponseValue = wasm.ChainParameters_get_latest_hash(this_ptr);
6030                 return decodeArray(nativeResponseValue);
6031         }
6032         // void ChainParameters_set_latest_hash(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6033         export function ChainParameters_set_latest_hash(this_ptr: number, val: Uint8Array): void {
6034                 if(!isWasmInitialized) {
6035                         throw new Error("initializeWasm() must be awaited first!");
6036                 }
6037                 const nativeResponseValue = wasm.ChainParameters_set_latest_hash(this_ptr, encodeArray(val));
6038                 // debug statements here
6039         }
6040         // uintptr_t ChainParameters_get_latest_height(const struct LDKChainParameters *NONNULL_PTR this_ptr);
6041         export function ChainParameters_get_latest_height(this_ptr: number): number {
6042                 if(!isWasmInitialized) {
6043                         throw new Error("initializeWasm() must be awaited first!");
6044                 }
6045                 const nativeResponseValue = wasm.ChainParameters_get_latest_height(this_ptr);
6046                 return nativeResponseValue;
6047         }
6048         // void ChainParameters_set_latest_height(struct LDKChainParameters *NONNULL_PTR this_ptr, uintptr_t val);
6049         export function ChainParameters_set_latest_height(this_ptr: number, val: number): void {
6050                 if(!isWasmInitialized) {
6051                         throw new Error("initializeWasm() must be awaited first!");
6052                 }
6053                 const nativeResponseValue = wasm.ChainParameters_set_latest_height(this_ptr, val);
6054                 // debug statements here
6055         }
6056         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKThirtyTwoBytes latest_hash_arg, uintptr_t latest_height_arg);
6057         export function ChainParameters_new(network_arg: LDKNetwork, latest_hash_arg: Uint8Array, latest_height_arg: number): number {
6058                 if(!isWasmInitialized) {
6059                         throw new Error("initializeWasm() must be awaited first!");
6060                 }
6061                 const nativeResponseValue = wasm.ChainParameters_new(network_arg, encodeArray(latest_hash_arg), latest_height_arg);
6062                 return nativeResponseValue;
6063         }
6064         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
6065         export function ChannelDetails_free(this_obj: number): void {
6066                 if(!isWasmInitialized) {
6067                         throw new Error("initializeWasm() must be awaited first!");
6068                 }
6069                 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
6070                 // debug statements here
6071         }
6072         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
6073         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
6074                 if(!isWasmInitialized) {
6075                         throw new Error("initializeWasm() must be awaited first!");
6076                 }
6077                 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
6078                 return decodeArray(nativeResponseValue);
6079         }
6080         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6081         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
6082                 if(!isWasmInitialized) {
6083                         throw new Error("initializeWasm() must be awaited first!");
6084                 }
6085                 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
6086                 // debug statements here
6087         }
6088         // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6089         export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
6090                 if(!isWasmInitialized) {
6091                         throw new Error("initializeWasm() must be awaited first!");
6092                 }
6093                 const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
6094                 return decodeArray(nativeResponseValue);
6095         }
6096         // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6097         export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
6098                 if(!isWasmInitialized) {
6099                         throw new Error("initializeWasm() must be awaited first!");
6100                 }
6101                 const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
6102                 // debug statements here
6103         }
6104         // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6105         export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
6106                 if(!isWasmInitialized) {
6107                         throw new Error("initializeWasm() must be awaited first!");
6108                 }
6109                 const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
6110                 return nativeResponseValue;
6111         }
6112         // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6113         export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
6114                 if(!isWasmInitialized) {
6115                         throw new Error("initializeWasm() must be awaited first!");
6116                 }
6117                 const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
6118                 // debug statements here
6119         }
6120         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6121         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
6122                 if(!isWasmInitialized) {
6123                         throw new Error("initializeWasm() must be awaited first!");
6124                 }
6125                 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
6126                 return nativeResponseValue;
6127         }
6128         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6129         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
6130                 if(!isWasmInitialized) {
6131                         throw new Error("initializeWasm() must be awaited first!");
6132                 }
6133                 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
6134                 // debug statements here
6135         }
6136         // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6137         export function ChannelDetails_get_user_id(this_ptr: number): number {
6138                 if(!isWasmInitialized) {
6139                         throw new Error("initializeWasm() must be awaited first!");
6140                 }
6141                 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
6142                 return nativeResponseValue;
6143         }
6144         // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6145         export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
6146                 if(!isWasmInitialized) {
6147                         throw new Error("initializeWasm() must be awaited first!");
6148                 }
6149                 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
6150                 // debug statements here
6151         }
6152         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6153         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
6154                 if(!isWasmInitialized) {
6155                         throw new Error("initializeWasm() must be awaited first!");
6156                 }
6157                 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
6158                 return nativeResponseValue;
6159         }
6160         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6161         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
6162                 if(!isWasmInitialized) {
6163                         throw new Error("initializeWasm() must be awaited first!");
6164                 }
6165                 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
6166                 // debug statements here
6167         }
6168         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6169         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
6170                 if(!isWasmInitialized) {
6171                         throw new Error("initializeWasm() must be awaited first!");
6172                 }
6173                 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
6174                 return nativeResponseValue;
6175         }
6176         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6177         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
6178                 if(!isWasmInitialized) {
6179                         throw new Error("initializeWasm() must be awaited first!");
6180                 }
6181                 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
6182                 // debug statements here
6183         }
6184         // bool ChannelDetails_get_is_live(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6185         export function ChannelDetails_get_is_live(this_ptr: number): boolean {
6186                 if(!isWasmInitialized) {
6187                         throw new Error("initializeWasm() must be awaited first!");
6188                 }
6189                 const nativeResponseValue = wasm.ChannelDetails_get_is_live(this_ptr);
6190                 return nativeResponseValue;
6191         }
6192         // void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
6193         export function ChannelDetails_set_is_live(this_ptr: number, val: boolean): void {
6194                 if(!isWasmInitialized) {
6195                         throw new Error("initializeWasm() must be awaited first!");
6196                 }
6197                 const nativeResponseValue = wasm.ChannelDetails_set_is_live(this_ptr, val);
6198                 // debug statements here
6199         }
6200         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
6201         export function ChannelDetails_clone(orig: number): number {
6202                 if(!isWasmInitialized) {
6203                         throw new Error("initializeWasm() must be awaited first!");
6204                 }
6205                 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
6206                 return nativeResponseValue;
6207         }
6208         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
6209         export function PaymentSendFailure_free(this_ptr: number): void {
6210                 if(!isWasmInitialized) {
6211                         throw new Error("initializeWasm() must be awaited first!");
6212                 }
6213                 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
6214                 // debug statements here
6215         }
6216         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
6217         export function PaymentSendFailure_clone(orig: number): number {
6218                 if(!isWasmInitialized) {
6219                         throw new Error("initializeWasm() must be awaited first!");
6220                 }
6221                 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
6222                 return nativeResponseValue;
6223         }
6224         // 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);
6225         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
6226                 if(!isWasmInitialized) {
6227                         throw new Error("initializeWasm() must be awaited first!");
6228                 }
6229                 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
6230                 return nativeResponseValue;
6231         }
6232         // 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);
6233         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 {
6234                 if(!isWasmInitialized) {
6235                         throw new Error("initializeWasm() must be awaited first!");
6236                 }
6237                 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
6238                 return nativeResponseValue;
6239         }
6240         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6241         export function ChannelManager_list_channels(this_arg: number): number[] {
6242                 if(!isWasmInitialized) {
6243                         throw new Error("initializeWasm() must be awaited first!");
6244                 }
6245                 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
6246                 return nativeResponseValue;
6247         }
6248         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6249         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
6250                 if(!isWasmInitialized) {
6251                         throw new Error("initializeWasm() must be awaited first!");
6252                 }
6253                 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
6254                 return nativeResponseValue;
6255         }
6256         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6257         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
6258                 if(!isWasmInitialized) {
6259                         throw new Error("initializeWasm() must be awaited first!");
6260                 }
6261                 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
6262                 return nativeResponseValue;
6263         }
6264         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6265         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
6266                 if(!isWasmInitialized) {
6267                         throw new Error("initializeWasm() must be awaited first!");
6268                 }
6269                 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
6270                 return nativeResponseValue;
6271         }
6272         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6273         export function ChannelManager_force_close_all_channels(this_arg: number): void {
6274                 if(!isWasmInitialized) {
6275                         throw new Error("initializeWasm() must be awaited first!");
6276                 }
6277                 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
6278                 // debug statements here
6279         }
6280         // 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);
6281         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
6282                 if(!isWasmInitialized) {
6283                         throw new Error("initializeWasm() must be awaited first!");
6284                 }
6285                 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
6286                 return nativeResponseValue;
6287         }
6288         // void ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKOutPoint funding_txo);
6289         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_txo: number): void {
6290                 if(!isWasmInitialized) {
6291                         throw new Error("initializeWasm() must be awaited first!");
6292                 }
6293                 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), funding_txo);
6294                 // debug statements here
6295         }
6296         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
6297         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
6298                 if(!isWasmInitialized) {
6299                         throw new Error("initializeWasm() must be awaited first!");
6300                 }
6301                 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
6302                 // debug statements here
6303         }
6304         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
6305         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
6306                 if(!isWasmInitialized) {
6307                         throw new Error("initializeWasm() must be awaited first!");
6308                 }
6309                 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
6310                 // debug statements here
6311         }
6312         // void ChannelManager_timer_chan_freshness_every_min(const struct LDKChannelManager *NONNULL_PTR this_arg);
6313         export function ChannelManager_timer_chan_freshness_every_min(this_arg: number): void {
6314                 if(!isWasmInitialized) {
6315                         throw new Error("initializeWasm() must be awaited first!");
6316                 }
6317                 const nativeResponseValue = wasm.ChannelManager_timer_chan_freshness_every_min(this_arg);
6318                 // debug statements here
6319         }
6320         // 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);
6321         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): boolean {
6322                 if(!isWasmInitialized) {
6323                         throw new Error("initializeWasm() must be awaited first!");
6324                 }
6325                 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash), encodeArray(payment_secret));
6326                 return nativeResponseValue;
6327         }
6328         // 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);
6329         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array, payment_secret: Uint8Array, expected_amount: number): boolean {
6330                 if(!isWasmInitialized) {
6331                         throw new Error("initializeWasm() must be awaited first!");
6332                 }
6333                 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage), encodeArray(payment_secret), expected_amount);
6334                 return nativeResponseValue;
6335         }
6336         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
6337         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
6338                 if(!isWasmInitialized) {
6339                         throw new Error("initializeWasm() must be awaited first!");
6340                 }
6341                 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
6342                 return decodeArray(nativeResponseValue);
6343         }
6344         // 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);
6345         export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
6346                 if(!isWasmInitialized) {
6347                         throw new Error("initializeWasm() must be awaited first!");
6348                 }
6349                 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
6350                 // debug statements here
6351         }
6352         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6353         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
6354                 if(!isWasmInitialized) {
6355                         throw new Error("initializeWasm() must be awaited first!");
6356                 }
6357                 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
6358                 return nativeResponseValue;
6359         }
6360         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6361         export function ChannelManager_as_EventsProvider(this_arg: number): number {
6362                 if(!isWasmInitialized) {
6363                         throw new Error("initializeWasm() must be awaited first!");
6364                 }
6365                 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
6366                 return nativeResponseValue;
6367         }
6368         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
6369         export function ChannelManager_as_Listen(this_arg: number): number {
6370                 if(!isWasmInitialized) {
6371                         throw new Error("initializeWasm() must be awaited first!");
6372                 }
6373                 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
6374                 return nativeResponseValue;
6375         }
6376         // void ChannelManager_block_connected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
6377         export function ChannelManager_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
6378                 if(!isWasmInitialized) {
6379                         throw new Error("initializeWasm() must be awaited first!");
6380                 }
6381                 const nativeResponseValue = wasm.ChannelManager_block_connected(this_arg, encodeArray(header), txdata, height);
6382                 // debug statements here
6383         }
6384         // void ChannelManager_block_disconnected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80]);
6385         export function ChannelManager_block_disconnected(this_arg: number, header: Uint8Array): void {
6386                 if(!isWasmInitialized) {
6387                         throw new Error("initializeWasm() must be awaited first!");
6388                 }
6389                 const nativeResponseValue = wasm.ChannelManager_block_disconnected(this_arg, encodeArray(header));
6390                 // debug statements here
6391         }
6392         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
6393         export function ChannelManager_await_persistable_update(this_arg: number): void {
6394                 if(!isWasmInitialized) {
6395                         throw new Error("initializeWasm() must be awaited first!");
6396                 }
6397                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
6398                 // debug statements here
6399         }
6400         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
6401         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
6402                 if(!isWasmInitialized) {
6403                         throw new Error("initializeWasm() must be awaited first!");
6404                 }
6405                 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
6406                 return nativeResponseValue;
6407         }
6408         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
6409         export function ChannelManager_write(obj: number): Uint8Array {
6410                 if(!isWasmInitialized) {
6411                         throw new Error("initializeWasm() must be awaited first!");
6412                 }
6413                 const nativeResponseValue = wasm.ChannelManager_write(obj);
6414                 return decodeArray(nativeResponseValue);
6415         }
6416         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
6417         export function ChannelManagerReadArgs_free(this_obj: number): void {
6418                 if(!isWasmInitialized) {
6419                         throw new Error("initializeWasm() must be awaited first!");
6420                 }
6421                 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
6422                 // debug statements here
6423         }
6424         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6425         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
6426                 if(!isWasmInitialized) {
6427                         throw new Error("initializeWasm() must be awaited first!");
6428                 }
6429                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
6430                 return nativeResponseValue;
6431         }
6432         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
6433         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
6434                 if(!isWasmInitialized) {
6435                         throw new Error("initializeWasm() must be awaited first!");
6436                 }
6437                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
6438                 // debug statements here
6439         }
6440         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6441         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
6442                 if(!isWasmInitialized) {
6443                         throw new Error("initializeWasm() must be awaited first!");
6444                 }
6445                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
6446                 return nativeResponseValue;
6447         }
6448         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
6449         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
6450                 if(!isWasmInitialized) {
6451                         throw new Error("initializeWasm() must be awaited first!");
6452                 }
6453                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
6454                 // debug statements here
6455         }
6456         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6457         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
6458                 if(!isWasmInitialized) {
6459                         throw new Error("initializeWasm() must be awaited first!");
6460                 }
6461                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
6462                 return nativeResponseValue;
6463         }
6464         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
6465         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
6466                 if(!isWasmInitialized) {
6467                         throw new Error("initializeWasm() must be awaited first!");
6468                 }
6469                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
6470                 // debug statements here
6471         }
6472         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6473         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
6474                 if(!isWasmInitialized) {
6475                         throw new Error("initializeWasm() must be awaited first!");
6476                 }
6477                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
6478                 return nativeResponseValue;
6479         }
6480         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
6481         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
6482                 if(!isWasmInitialized) {
6483                         throw new Error("initializeWasm() must be awaited first!");
6484                 }
6485                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
6486                 // debug statements here
6487         }
6488         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6489         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
6490                 if(!isWasmInitialized) {
6491                         throw new Error("initializeWasm() must be awaited first!");
6492                 }
6493                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
6494                 return nativeResponseValue;
6495         }
6496         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
6497         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
6498                 if(!isWasmInitialized) {
6499                         throw new Error("initializeWasm() must be awaited first!");
6500                 }
6501                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
6502                 // debug statements here
6503         }
6504         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6505         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
6506                 if(!isWasmInitialized) {
6507                         throw new Error("initializeWasm() must be awaited first!");
6508                 }
6509                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
6510                 return nativeResponseValue;
6511         }
6512         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
6513         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
6514                 if(!isWasmInitialized) {
6515                         throw new Error("initializeWasm() must be awaited first!");
6516                 }
6517                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
6518                 // debug statements here
6519         }
6520         // 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);
6521         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 {
6522                 if(!isWasmInitialized) {
6523                         throw new Error("initializeWasm() must be awaited first!");
6524                 }
6525                 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
6526                 return nativeResponseValue;
6527         }
6528         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
6529         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
6530                 if(!isWasmInitialized) {
6531                         throw new Error("initializeWasm() must be awaited first!");
6532                 }
6533                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
6534                 return nativeResponseValue;
6535         }
6536         // void DecodeError_free(struct LDKDecodeError this_obj);
6537         export function DecodeError_free(this_obj: number): void {
6538                 if(!isWasmInitialized) {
6539                         throw new Error("initializeWasm() must be awaited first!");
6540                 }
6541                 const nativeResponseValue = wasm.DecodeError_free(this_obj);
6542                 // debug statements here
6543         }
6544         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
6545         export function DecodeError_clone(orig: number): number {
6546                 if(!isWasmInitialized) {
6547                         throw new Error("initializeWasm() must be awaited first!");
6548                 }
6549                 const nativeResponseValue = wasm.DecodeError_clone(orig);
6550                 return nativeResponseValue;
6551         }
6552         // void Init_free(struct LDKInit this_obj);
6553         export function Init_free(this_obj: number): void {
6554                 if(!isWasmInitialized) {
6555                         throw new Error("initializeWasm() must be awaited first!");
6556                 }
6557                 const nativeResponseValue = wasm.Init_free(this_obj);
6558                 // debug statements here
6559         }
6560         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
6561         export function Init_get_features(this_ptr: number): number {
6562                 if(!isWasmInitialized) {
6563                         throw new Error("initializeWasm() must be awaited first!");
6564                 }
6565                 const nativeResponseValue = wasm.Init_get_features(this_ptr);
6566                 return nativeResponseValue;
6567         }
6568         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6569         export function Init_set_features(this_ptr: number, val: number): void {
6570                 if(!isWasmInitialized) {
6571                         throw new Error("initializeWasm() must be awaited first!");
6572                 }
6573                 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
6574                 // debug statements here
6575         }
6576         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
6577         export function Init_new(features_arg: number): number {
6578                 if(!isWasmInitialized) {
6579                         throw new Error("initializeWasm() must be awaited first!");
6580                 }
6581                 const nativeResponseValue = wasm.Init_new(features_arg);
6582                 return nativeResponseValue;
6583         }
6584         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
6585         export function Init_clone(orig: number): number {
6586                 if(!isWasmInitialized) {
6587                         throw new Error("initializeWasm() must be awaited first!");
6588                 }
6589                 const nativeResponseValue = wasm.Init_clone(orig);
6590                 return nativeResponseValue;
6591         }
6592         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
6593         export function ErrorMessage_free(this_obj: number): void {
6594                 if(!isWasmInitialized) {
6595                         throw new Error("initializeWasm() must be awaited first!");
6596                 }
6597                 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
6598                 // debug statements here
6599         }
6600         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
6601         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
6602                 if(!isWasmInitialized) {
6603                         throw new Error("initializeWasm() must be awaited first!");
6604                 }
6605                 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
6606                 return decodeArray(nativeResponseValue);
6607         }
6608         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6609         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
6610                 if(!isWasmInitialized) {
6611                         throw new Error("initializeWasm() must be awaited first!");
6612                 }
6613                 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
6614                 // debug statements here
6615         }
6616         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
6617         export function ErrorMessage_get_data(this_ptr: number): String {
6618                 if(!isWasmInitialized) {
6619                         throw new Error("initializeWasm() must be awaited first!");
6620                 }
6621                 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
6622                 return nativeResponseValue;
6623         }
6624         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
6625         export function ErrorMessage_set_data(this_ptr: number, val: Uint8Array): void {
6626                 if(!isWasmInitialized) {
6627                         throw new Error("initializeWasm() must be awaited first!");
6628                 }
6629                 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, encodeArray(val));
6630                 // debug statements here
6631         }
6632         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
6633         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: Uint8Array): number {
6634                 if(!isWasmInitialized) {
6635                         throw new Error("initializeWasm() must be awaited first!");
6636                 }
6637                 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), encodeArray(data_arg));
6638                 return nativeResponseValue;
6639         }
6640         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
6641         export function ErrorMessage_clone(orig: number): number {
6642                 if(!isWasmInitialized) {
6643                         throw new Error("initializeWasm() must be awaited first!");
6644                 }
6645                 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
6646                 return nativeResponseValue;
6647         }
6648         // void Ping_free(struct LDKPing this_obj);
6649         export function Ping_free(this_obj: number): void {
6650                 if(!isWasmInitialized) {
6651                         throw new Error("initializeWasm() must be awaited first!");
6652                 }
6653                 const nativeResponseValue = wasm.Ping_free(this_obj);
6654                 // debug statements here
6655         }
6656         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
6657         export function Ping_get_ponglen(this_ptr: number): number {
6658                 if(!isWasmInitialized) {
6659                         throw new Error("initializeWasm() must be awaited first!");
6660                 }
6661                 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
6662                 return nativeResponseValue;
6663         }
6664         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6665         export function Ping_set_ponglen(this_ptr: number, val: number): void {
6666                 if(!isWasmInitialized) {
6667                         throw new Error("initializeWasm() must be awaited first!");
6668                 }
6669                 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
6670                 // debug statements here
6671         }
6672         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
6673         export function Ping_get_byteslen(this_ptr: number): number {
6674                 if(!isWasmInitialized) {
6675                         throw new Error("initializeWasm() must be awaited first!");
6676                 }
6677                 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
6678                 return nativeResponseValue;
6679         }
6680         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6681         export function Ping_set_byteslen(this_ptr: number, val: number): void {
6682                 if(!isWasmInitialized) {
6683                         throw new Error("initializeWasm() must be awaited first!");
6684                 }
6685                 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
6686                 // debug statements here
6687         }
6688         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
6689         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
6690                 if(!isWasmInitialized) {
6691                         throw new Error("initializeWasm() must be awaited first!");
6692                 }
6693                 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
6694                 return nativeResponseValue;
6695         }
6696         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
6697         export function Ping_clone(orig: number): number {
6698                 if(!isWasmInitialized) {
6699                         throw new Error("initializeWasm() must be awaited first!");
6700                 }
6701                 const nativeResponseValue = wasm.Ping_clone(orig);
6702                 return nativeResponseValue;
6703         }
6704         // void Pong_free(struct LDKPong this_obj);
6705         export function Pong_free(this_obj: number): void {
6706                 if(!isWasmInitialized) {
6707                         throw new Error("initializeWasm() must be awaited first!");
6708                 }
6709                 const nativeResponseValue = wasm.Pong_free(this_obj);
6710                 // debug statements here
6711         }
6712         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
6713         export function Pong_get_byteslen(this_ptr: number): number {
6714                 if(!isWasmInitialized) {
6715                         throw new Error("initializeWasm() must be awaited first!");
6716                 }
6717                 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
6718                 return nativeResponseValue;
6719         }
6720         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
6721         export function Pong_set_byteslen(this_ptr: number, val: number): void {
6722                 if(!isWasmInitialized) {
6723                         throw new Error("initializeWasm() must be awaited first!");
6724                 }
6725                 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
6726                 // debug statements here
6727         }
6728         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
6729         export function Pong_new(byteslen_arg: number): number {
6730                 if(!isWasmInitialized) {
6731                         throw new Error("initializeWasm() must be awaited first!");
6732                 }
6733                 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
6734                 return nativeResponseValue;
6735         }
6736         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
6737         export function Pong_clone(orig: number): number {
6738                 if(!isWasmInitialized) {
6739                         throw new Error("initializeWasm() must be awaited first!");
6740                 }
6741                 const nativeResponseValue = wasm.Pong_clone(orig);
6742                 return nativeResponseValue;
6743         }
6744         // void OpenChannel_free(struct LDKOpenChannel this_obj);
6745         export function OpenChannel_free(this_obj: number): void {
6746                 if(!isWasmInitialized) {
6747                         throw new Error("initializeWasm() must be awaited first!");
6748                 }
6749                 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
6750                 // debug statements here
6751         }
6752         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
6753         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
6754                 if(!isWasmInitialized) {
6755                         throw new Error("initializeWasm() must be awaited first!");
6756                 }
6757                 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
6758                 return decodeArray(nativeResponseValue);
6759         }
6760         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6761         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6762                 if(!isWasmInitialized) {
6763                         throw new Error("initializeWasm() must be awaited first!");
6764                 }
6765                 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
6766                 // debug statements here
6767         }
6768         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
6769         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
6770                 if(!isWasmInitialized) {
6771                         throw new Error("initializeWasm() must be awaited first!");
6772                 }
6773                 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
6774                 return decodeArray(nativeResponseValue);
6775         }
6776         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6777         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
6778                 if(!isWasmInitialized) {
6779                         throw new Error("initializeWasm() must be awaited first!");
6780                 }
6781                 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
6782                 // debug statements here
6783         }
6784         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6785         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
6786                 if(!isWasmInitialized) {
6787                         throw new Error("initializeWasm() must be awaited first!");
6788                 }
6789                 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
6790                 return nativeResponseValue;
6791         }
6792         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6793         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
6794                 if(!isWasmInitialized) {
6795                         throw new Error("initializeWasm() must be awaited first!");
6796                 }
6797                 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
6798                 // debug statements here
6799         }
6800         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6801         export function OpenChannel_get_push_msat(this_ptr: number): number {
6802                 if(!isWasmInitialized) {
6803                         throw new Error("initializeWasm() must be awaited first!");
6804                 }
6805                 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
6806                 return nativeResponseValue;
6807         }
6808         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6809         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
6810                 if(!isWasmInitialized) {
6811                         throw new Error("initializeWasm() must be awaited first!");
6812                 }
6813                 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
6814                 // debug statements here
6815         }
6816         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6817         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
6818                 if(!isWasmInitialized) {
6819                         throw new Error("initializeWasm() must be awaited first!");
6820                 }
6821                 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
6822                 return nativeResponseValue;
6823         }
6824         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6825         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
6826                 if(!isWasmInitialized) {
6827                         throw new Error("initializeWasm() must be awaited first!");
6828                 }
6829                 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
6830                 // debug statements here
6831         }
6832         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6833         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
6834                 if(!isWasmInitialized) {
6835                         throw new Error("initializeWasm() must be awaited first!");
6836                 }
6837                 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
6838                 return nativeResponseValue;
6839         }
6840         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6841         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
6842                 if(!isWasmInitialized) {
6843                         throw new Error("initializeWasm() must be awaited first!");
6844                 }
6845                 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
6846                 // debug statements here
6847         }
6848         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6849         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
6850                 if(!isWasmInitialized) {
6851                         throw new Error("initializeWasm() must be awaited first!");
6852                 }
6853                 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
6854                 return nativeResponseValue;
6855         }
6856         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6857         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
6858                 if(!isWasmInitialized) {
6859                         throw new Error("initializeWasm() must be awaited first!");
6860                 }
6861                 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
6862                 // debug statements here
6863         }
6864         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6865         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
6866                 if(!isWasmInitialized) {
6867                         throw new Error("initializeWasm() must be awaited first!");
6868                 }
6869                 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
6870                 return nativeResponseValue;
6871         }
6872         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6873         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
6874                 if(!isWasmInitialized) {
6875                         throw new Error("initializeWasm() must be awaited first!");
6876                 }
6877                 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
6878                 // debug statements here
6879         }
6880         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6881         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
6882                 if(!isWasmInitialized) {
6883                         throw new Error("initializeWasm() must be awaited first!");
6884                 }
6885                 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
6886                 return nativeResponseValue;
6887         }
6888         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
6889         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
6890                 if(!isWasmInitialized) {
6891                         throw new Error("initializeWasm() must be awaited first!");
6892                 }
6893                 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
6894                 // debug statements here
6895         }
6896         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6897         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
6898                 if(!isWasmInitialized) {
6899                         throw new Error("initializeWasm() must be awaited first!");
6900                 }
6901                 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
6902                 return nativeResponseValue;
6903         }
6904         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
6905         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
6906                 if(!isWasmInitialized) {
6907                         throw new Error("initializeWasm() must be awaited first!");
6908                 }
6909                 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
6910                 // debug statements here
6911         }
6912         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6913         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
6914                 if(!isWasmInitialized) {
6915                         throw new Error("initializeWasm() must be awaited first!");
6916                 }
6917                 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
6918                 return nativeResponseValue;
6919         }
6920         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
6921         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
6922                 if(!isWasmInitialized) {
6923                         throw new Error("initializeWasm() must be awaited first!");
6924                 }
6925                 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
6926                 // debug statements here
6927         }
6928         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6929         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
6930                 if(!isWasmInitialized) {
6931                         throw new Error("initializeWasm() must be awaited first!");
6932                 }
6933                 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
6934                 return decodeArray(nativeResponseValue);
6935         }
6936         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6937         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
6938                 if(!isWasmInitialized) {
6939                         throw new Error("initializeWasm() must be awaited first!");
6940                 }
6941                 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
6942                 // debug statements here
6943         }
6944         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6945         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
6946                 if(!isWasmInitialized) {
6947                         throw new Error("initializeWasm() must be awaited first!");
6948                 }
6949                 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
6950                 return decodeArray(nativeResponseValue);
6951         }
6952         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6953         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
6954                 if(!isWasmInitialized) {
6955                         throw new Error("initializeWasm() must be awaited first!");
6956                 }
6957                 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
6958                 // debug statements here
6959         }
6960         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6961         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
6962                 if(!isWasmInitialized) {
6963                         throw new Error("initializeWasm() must be awaited first!");
6964                 }
6965                 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
6966                 return decodeArray(nativeResponseValue);
6967         }
6968         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6969         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
6970                 if(!isWasmInitialized) {
6971                         throw new Error("initializeWasm() must be awaited first!");
6972                 }
6973                 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
6974                 // debug statements here
6975         }
6976         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6977         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
6978                 if(!isWasmInitialized) {
6979                         throw new Error("initializeWasm() must be awaited first!");
6980                 }
6981                 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
6982                 return decodeArray(nativeResponseValue);
6983         }
6984         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6985         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
6986                 if(!isWasmInitialized) {
6987                         throw new Error("initializeWasm() must be awaited first!");
6988                 }
6989                 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
6990                 // debug statements here
6991         }
6992         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6993         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
6994                 if(!isWasmInitialized) {
6995                         throw new Error("initializeWasm() must be awaited first!");
6996                 }
6997                 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
6998                 return decodeArray(nativeResponseValue);
6999         }
7000         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7001         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7002                 if(!isWasmInitialized) {
7003                         throw new Error("initializeWasm() must be awaited first!");
7004                 }
7005                 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7006                 // debug statements here
7007         }
7008         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7009         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7010                 if(!isWasmInitialized) {
7011                         throw new Error("initializeWasm() must be awaited first!");
7012                 }
7013                 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
7014                 return decodeArray(nativeResponseValue);
7015         }
7016         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7017         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7018                 if(!isWasmInitialized) {
7019                         throw new Error("initializeWasm() must be awaited first!");
7020                 }
7021                 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7022                 // debug statements here
7023         }
7024         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7025         export function OpenChannel_get_channel_flags(this_ptr: number): number {
7026                 if(!isWasmInitialized) {
7027                         throw new Error("initializeWasm() must be awaited first!");
7028                 }
7029                 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
7030                 return nativeResponseValue;
7031         }
7032         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
7033         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
7034                 if(!isWasmInitialized) {
7035                         throw new Error("initializeWasm() must be awaited first!");
7036                 }
7037                 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
7038                 // debug statements here
7039         }
7040         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
7041         export function OpenChannel_clone(orig: number): number {
7042                 if(!isWasmInitialized) {
7043                         throw new Error("initializeWasm() must be awaited first!");
7044                 }
7045                 const nativeResponseValue = wasm.OpenChannel_clone(orig);
7046                 return nativeResponseValue;
7047         }
7048         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
7049         export function AcceptChannel_free(this_obj: number): void {
7050                 if(!isWasmInitialized) {
7051                         throw new Error("initializeWasm() must be awaited first!");
7052                 }
7053                 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
7054                 // debug statements here
7055         }
7056         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
7057         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
7058                 if(!isWasmInitialized) {
7059                         throw new Error("initializeWasm() must be awaited first!");
7060                 }
7061                 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
7062                 return decodeArray(nativeResponseValue);
7063         }
7064         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7065         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7066                 if(!isWasmInitialized) {
7067                         throw new Error("initializeWasm() must be awaited first!");
7068                 }
7069                 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
7070                 // debug statements here
7071         }
7072         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7073         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
7074                 if(!isWasmInitialized) {
7075                         throw new Error("initializeWasm() must be awaited first!");
7076                 }
7077                 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
7078                 return nativeResponseValue;
7079         }
7080         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7081         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
7082                 if(!isWasmInitialized) {
7083                         throw new Error("initializeWasm() must be awaited first!");
7084                 }
7085                 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
7086                 // debug statements here
7087         }
7088         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7089         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
7090                 if(!isWasmInitialized) {
7091                         throw new Error("initializeWasm() must be awaited first!");
7092                 }
7093                 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
7094                 return nativeResponseValue;
7095         }
7096         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7097         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7098                 if(!isWasmInitialized) {
7099                         throw new Error("initializeWasm() must be awaited first!");
7100                 }
7101                 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
7102                 // debug statements here
7103         }
7104         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7105         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
7106                 if(!isWasmInitialized) {
7107                         throw new Error("initializeWasm() must be awaited first!");
7108                 }
7109                 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
7110                 return nativeResponseValue;
7111         }
7112         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7113         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
7114                 if(!isWasmInitialized) {
7115                         throw new Error("initializeWasm() must be awaited first!");
7116                 }
7117                 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
7118                 // debug statements here
7119         }
7120         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7121         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
7122                 if(!isWasmInitialized) {
7123                         throw new Error("initializeWasm() must be awaited first!");
7124                 }
7125                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
7126                 return nativeResponseValue;
7127         }
7128         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7129         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
7130                 if(!isWasmInitialized) {
7131                         throw new Error("initializeWasm() must be awaited first!");
7132                 }
7133                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
7134                 // debug statements here
7135         }
7136         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7137         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
7138                 if(!isWasmInitialized) {
7139                         throw new Error("initializeWasm() must be awaited first!");
7140                 }
7141                 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
7142                 return nativeResponseValue;
7143         }
7144         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
7145         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
7146                 if(!isWasmInitialized) {
7147                         throw new Error("initializeWasm() must be awaited first!");
7148                 }
7149                 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
7150                 // debug statements here
7151         }
7152         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7153         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
7154                 if(!isWasmInitialized) {
7155                         throw new Error("initializeWasm() must be awaited first!");
7156                 }
7157                 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
7158                 return nativeResponseValue;
7159         }
7160         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7161         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
7162                 if(!isWasmInitialized) {
7163                         throw new Error("initializeWasm() must be awaited first!");
7164                 }
7165                 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
7166                 // debug statements here
7167         }
7168         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7169         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
7170                 if(!isWasmInitialized) {
7171                         throw new Error("initializeWasm() must be awaited first!");
7172                 }
7173                 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
7174                 return nativeResponseValue;
7175         }
7176         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7177         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
7178                 if(!isWasmInitialized) {
7179                         throw new Error("initializeWasm() must be awaited first!");
7180                 }
7181                 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
7182                 // debug statements here
7183         }
7184         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7185         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
7186                 if(!isWasmInitialized) {
7187                         throw new Error("initializeWasm() must be awaited first!");
7188                 }
7189                 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
7190                 return decodeArray(nativeResponseValue);
7191         }
7192         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7193         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
7194                 if(!isWasmInitialized) {
7195                         throw new Error("initializeWasm() must be awaited first!");
7196                 }
7197                 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
7198                 // debug statements here
7199         }
7200         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7201         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
7202                 if(!isWasmInitialized) {
7203                         throw new Error("initializeWasm() must be awaited first!");
7204                 }
7205                 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
7206                 return decodeArray(nativeResponseValue);
7207         }
7208         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7209         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
7210                 if(!isWasmInitialized) {
7211                         throw new Error("initializeWasm() must be awaited first!");
7212                 }
7213                 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
7214                 // debug statements here
7215         }
7216         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7217         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
7218                 if(!isWasmInitialized) {
7219                         throw new Error("initializeWasm() must be awaited first!");
7220                 }
7221                 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
7222                 return decodeArray(nativeResponseValue);
7223         }
7224         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7225         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
7226                 if(!isWasmInitialized) {
7227                         throw new Error("initializeWasm() must be awaited first!");
7228                 }
7229                 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
7230                 // debug statements here
7231         }
7232         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7233         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
7234                 if(!isWasmInitialized) {
7235                         throw new Error("initializeWasm() must be awaited first!");
7236                 }
7237                 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
7238                 return decodeArray(nativeResponseValue);
7239         }
7240         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7241         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
7242                 if(!isWasmInitialized) {
7243                         throw new Error("initializeWasm() must be awaited first!");
7244                 }
7245                 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
7246                 // debug statements here
7247         }
7248         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7249         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
7250                 if(!isWasmInitialized) {
7251                         throw new Error("initializeWasm() must be awaited first!");
7252                 }
7253                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
7254                 return decodeArray(nativeResponseValue);
7255         }
7256         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7257         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7258                 if(!isWasmInitialized) {
7259                         throw new Error("initializeWasm() must be awaited first!");
7260                 }
7261                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7262                 // debug statements here
7263         }
7264         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7265         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7266                 if(!isWasmInitialized) {
7267                         throw new Error("initializeWasm() must be awaited first!");
7268                 }
7269                 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
7270                 return decodeArray(nativeResponseValue);
7271         }
7272         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7273         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7274                 if(!isWasmInitialized) {
7275                         throw new Error("initializeWasm() must be awaited first!");
7276                 }
7277                 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7278                 // debug statements here
7279         }
7280         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
7281         export function AcceptChannel_clone(orig: number): number {
7282                 if(!isWasmInitialized) {
7283                         throw new Error("initializeWasm() must be awaited first!");
7284                 }
7285                 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
7286                 return nativeResponseValue;
7287         }
7288         // void FundingCreated_free(struct LDKFundingCreated this_obj);
7289         export function FundingCreated_free(this_obj: number): void {
7290                 if(!isWasmInitialized) {
7291                         throw new Error("initializeWasm() must be awaited first!");
7292                 }
7293                 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
7294                 // debug statements here
7295         }
7296         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7297         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
7298                 if(!isWasmInitialized) {
7299                         throw new Error("initializeWasm() must be awaited first!");
7300                 }
7301                 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
7302                 return decodeArray(nativeResponseValue);
7303         }
7304         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7305         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7306                 if(!isWasmInitialized) {
7307                         throw new Error("initializeWasm() must be awaited first!");
7308                 }
7309                 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
7310                 // debug statements here
7311         }
7312         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7313         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
7314                 if(!isWasmInitialized) {
7315                         throw new Error("initializeWasm() must be awaited first!");
7316                 }
7317                 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
7318                 return decodeArray(nativeResponseValue);
7319         }
7320         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7321         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
7322                 if(!isWasmInitialized) {
7323                         throw new Error("initializeWasm() must be awaited first!");
7324                 }
7325                 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
7326                 // debug statements here
7327         }
7328         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7329         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
7330                 if(!isWasmInitialized) {
7331                         throw new Error("initializeWasm() must be awaited first!");
7332                 }
7333                 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
7334                 return nativeResponseValue;
7335         }
7336         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
7337         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
7338                 if(!isWasmInitialized) {
7339                         throw new Error("initializeWasm() must be awaited first!");
7340                 }
7341                 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
7342                 // debug statements here
7343         }
7344         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7345         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
7346                 if(!isWasmInitialized) {
7347                         throw new Error("initializeWasm() must be awaited first!");
7348                 }
7349                 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
7350                 return decodeArray(nativeResponseValue);
7351         }
7352         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
7353         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
7354                 if(!isWasmInitialized) {
7355                         throw new Error("initializeWasm() must be awaited first!");
7356                 }
7357                 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
7358                 // debug statements here
7359         }
7360         // 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);
7361         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
7362                 if(!isWasmInitialized) {
7363                         throw new Error("initializeWasm() must be awaited first!");
7364                 }
7365                 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
7366                 return nativeResponseValue;
7367         }
7368         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
7369         export function FundingCreated_clone(orig: number): number {
7370                 if(!isWasmInitialized) {
7371                         throw new Error("initializeWasm() must be awaited first!");
7372                 }
7373                 const nativeResponseValue = wasm.FundingCreated_clone(orig);
7374                 return nativeResponseValue;
7375         }
7376         // void FundingSigned_free(struct LDKFundingSigned this_obj);
7377         export function FundingSigned_free(this_obj: number): void {
7378                 if(!isWasmInitialized) {
7379                         throw new Error("initializeWasm() must be awaited first!");
7380                 }
7381                 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
7382                 // debug statements here
7383         }
7384         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
7385         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
7386                 if(!isWasmInitialized) {
7387                         throw new Error("initializeWasm() must be awaited first!");
7388                 }
7389                 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
7390                 return decodeArray(nativeResponseValue);
7391         }
7392         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7393         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7394                 if(!isWasmInitialized) {
7395                         throw new Error("initializeWasm() must be awaited first!");
7396                 }
7397                 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
7398                 // debug statements here
7399         }
7400         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
7401         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
7402                 if(!isWasmInitialized) {
7403                         throw new Error("initializeWasm() must be awaited first!");
7404                 }
7405                 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
7406                 return decodeArray(nativeResponseValue);
7407         }
7408         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7409         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7410                 if(!isWasmInitialized) {
7411                         throw new Error("initializeWasm() must be awaited first!");
7412                 }
7413                 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
7414                 // debug statements here
7415         }
7416         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
7417         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
7418                 if(!isWasmInitialized) {
7419                         throw new Error("initializeWasm() must be awaited first!");
7420                 }
7421                 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
7422                 return nativeResponseValue;
7423         }
7424         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
7425         export function FundingSigned_clone(orig: number): number {
7426                 if(!isWasmInitialized) {
7427                         throw new Error("initializeWasm() must be awaited first!");
7428                 }
7429                 const nativeResponseValue = wasm.FundingSigned_clone(orig);
7430                 return nativeResponseValue;
7431         }
7432         // void FundingLocked_free(struct LDKFundingLocked this_obj);
7433         export function FundingLocked_free(this_obj: number): void {
7434                 if(!isWasmInitialized) {
7435                         throw new Error("initializeWasm() must be awaited first!");
7436                 }
7437                 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
7438                 // debug statements here
7439         }
7440         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
7441         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
7442                 if(!isWasmInitialized) {
7443                         throw new Error("initializeWasm() must be awaited first!");
7444                 }
7445                 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
7446                 return decodeArray(nativeResponseValue);
7447         }
7448         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7449         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
7450                 if(!isWasmInitialized) {
7451                         throw new Error("initializeWasm() must be awaited first!");
7452                 }
7453                 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
7454                 // debug statements here
7455         }
7456         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
7457         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
7458                 if(!isWasmInitialized) {
7459                         throw new Error("initializeWasm() must be awaited first!");
7460                 }
7461                 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
7462                 return decodeArray(nativeResponseValue);
7463         }
7464         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7465         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7466                 if(!isWasmInitialized) {
7467                         throw new Error("initializeWasm() must be awaited first!");
7468                 }
7469                 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
7470                 // debug statements here
7471         }
7472         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
7473         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
7474                 if(!isWasmInitialized) {
7475                         throw new Error("initializeWasm() must be awaited first!");
7476                 }
7477                 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
7478                 return nativeResponseValue;
7479         }
7480         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
7481         export function FundingLocked_clone(orig: number): number {
7482                 if(!isWasmInitialized) {
7483                         throw new Error("initializeWasm() must be awaited first!");
7484                 }
7485                 const nativeResponseValue = wasm.FundingLocked_clone(orig);
7486                 return nativeResponseValue;
7487         }
7488         // void Shutdown_free(struct LDKShutdown this_obj);
7489         export function Shutdown_free(this_obj: number): void {
7490                 if(!isWasmInitialized) {
7491                         throw new Error("initializeWasm() must be awaited first!");
7492                 }
7493                 const nativeResponseValue = wasm.Shutdown_free(this_obj);
7494                 // debug statements here
7495         }
7496         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
7497         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
7498                 if(!isWasmInitialized) {
7499                         throw new Error("initializeWasm() must be awaited first!");
7500                 }
7501                 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
7502                 return decodeArray(nativeResponseValue);
7503         }
7504         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7505         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
7506                 if(!isWasmInitialized) {
7507                         throw new Error("initializeWasm() must be awaited first!");
7508                 }
7509                 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
7510                 // debug statements here
7511         }
7512         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
7513         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
7514                 if(!isWasmInitialized) {
7515                         throw new Error("initializeWasm() must be awaited first!");
7516                 }
7517                 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
7518                 return decodeArray(nativeResponseValue);
7519         }
7520         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7521         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
7522                 if(!isWasmInitialized) {
7523                         throw new Error("initializeWasm() must be awaited first!");
7524                 }
7525                 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
7526                 // debug statements here
7527         }
7528         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
7529         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
7530                 if(!isWasmInitialized) {
7531                         throw new Error("initializeWasm() must be awaited first!");
7532                 }
7533                 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
7534                 return nativeResponseValue;
7535         }
7536         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
7537         export function Shutdown_clone(orig: number): number {
7538                 if(!isWasmInitialized) {
7539                         throw new Error("initializeWasm() must be awaited first!");
7540                 }
7541                 const nativeResponseValue = wasm.Shutdown_clone(orig);
7542                 return nativeResponseValue;
7543         }
7544         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
7545         export function ClosingSigned_free(this_obj: number): void {
7546                 if(!isWasmInitialized) {
7547                         throw new Error("initializeWasm() must be awaited first!");
7548                 }
7549                 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
7550                 // debug statements here
7551         }
7552         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
7553         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
7554                 if(!isWasmInitialized) {
7555                         throw new Error("initializeWasm() must be awaited first!");
7556                 }
7557                 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
7558                 return decodeArray(nativeResponseValue);
7559         }
7560         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7561         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7562                 if(!isWasmInitialized) {
7563                         throw new Error("initializeWasm() must be awaited first!");
7564                 }
7565                 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
7566                 // debug statements here
7567         }
7568         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
7569         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
7570                 if(!isWasmInitialized) {
7571                         throw new Error("initializeWasm() must be awaited first!");
7572                 }
7573                 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
7574                 return nativeResponseValue;
7575         }
7576         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
7577         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
7578                 if(!isWasmInitialized) {
7579                         throw new Error("initializeWasm() must be awaited first!");
7580                 }
7581                 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
7582                 // debug statements here
7583         }
7584         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
7585         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
7586                 if(!isWasmInitialized) {
7587                         throw new Error("initializeWasm() must be awaited first!");
7588                 }
7589                 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
7590                 return decodeArray(nativeResponseValue);
7591         }
7592         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7593         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7594                 if(!isWasmInitialized) {
7595                         throw new Error("initializeWasm() must be awaited first!");
7596                 }
7597                 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
7598                 // debug statements here
7599         }
7600         // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
7601         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
7602                 if(!isWasmInitialized) {
7603                         throw new Error("initializeWasm() must be awaited first!");
7604                 }
7605                 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
7606                 return nativeResponseValue;
7607         }
7608         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
7609         export function ClosingSigned_clone(orig: number): number {
7610                 if(!isWasmInitialized) {
7611                         throw new Error("initializeWasm() must be awaited first!");
7612                 }
7613                 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
7614                 return nativeResponseValue;
7615         }
7616         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
7617         export function UpdateAddHTLC_free(this_obj: number): void {
7618                 if(!isWasmInitialized) {
7619                         throw new Error("initializeWasm() must be awaited first!");
7620                 }
7621                 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
7622                 // debug statements here
7623         }
7624         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7625         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
7626                 if(!isWasmInitialized) {
7627                         throw new Error("initializeWasm() must be awaited first!");
7628                 }
7629                 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
7630                 return decodeArray(nativeResponseValue);
7631         }
7632         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7633         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7634                 if(!isWasmInitialized) {
7635                         throw new Error("initializeWasm() must be awaited first!");
7636                 }
7637                 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
7638                 // debug statements here
7639         }
7640         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7641         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
7642                 if(!isWasmInitialized) {
7643                         throw new Error("initializeWasm() must be awaited first!");
7644                 }
7645                 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
7646                 return nativeResponseValue;
7647         }
7648         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7649         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
7650                 if(!isWasmInitialized) {
7651                         throw new Error("initializeWasm() must be awaited first!");
7652                 }
7653                 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
7654                 // debug statements here
7655         }
7656         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7657         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
7658                 if(!isWasmInitialized) {
7659                         throw new Error("initializeWasm() must be awaited first!");
7660                 }
7661                 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
7662                 return nativeResponseValue;
7663         }
7664         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7665         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
7666                 if(!isWasmInitialized) {
7667                         throw new Error("initializeWasm() must be awaited first!");
7668                 }
7669                 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
7670                 // debug statements here
7671         }
7672         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7673         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
7674                 if(!isWasmInitialized) {
7675                         throw new Error("initializeWasm() must be awaited first!");
7676                 }
7677                 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
7678                 return decodeArray(nativeResponseValue);
7679         }
7680         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7681         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
7682                 if(!isWasmInitialized) {
7683                         throw new Error("initializeWasm() must be awaited first!");
7684                 }
7685                 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
7686                 // debug statements here
7687         }
7688         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7689         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
7690                 if(!isWasmInitialized) {
7691                         throw new Error("initializeWasm() must be awaited first!");
7692                 }
7693                 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
7694                 return nativeResponseValue;
7695         }
7696         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
7697         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
7698                 if(!isWasmInitialized) {
7699                         throw new Error("initializeWasm() must be awaited first!");
7700                 }
7701                 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
7702                 // debug statements here
7703         }
7704         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
7705         export function UpdateAddHTLC_clone(orig: number): number {
7706                 if(!isWasmInitialized) {
7707                         throw new Error("initializeWasm() must be awaited first!");
7708                 }
7709                 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
7710                 return nativeResponseValue;
7711         }
7712         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
7713         export function UpdateFulfillHTLC_free(this_obj: number): void {
7714                 if(!isWasmInitialized) {
7715                         throw new Error("initializeWasm() must be awaited first!");
7716                 }
7717                 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
7718                 // debug statements here
7719         }
7720         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
7721         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
7722                 if(!isWasmInitialized) {
7723                         throw new Error("initializeWasm() must be awaited first!");
7724                 }
7725                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
7726                 return decodeArray(nativeResponseValue);
7727         }
7728         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7729         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7730                 if(!isWasmInitialized) {
7731                         throw new Error("initializeWasm() must be awaited first!");
7732                 }
7733                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
7734                 // debug statements here
7735         }
7736         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
7737         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
7738                 if(!isWasmInitialized) {
7739                         throw new Error("initializeWasm() must be awaited first!");
7740                 }
7741                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
7742                 return nativeResponseValue;
7743         }
7744         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
7745         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
7746                 if(!isWasmInitialized) {
7747                         throw new Error("initializeWasm() must be awaited first!");
7748                 }
7749                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
7750                 // debug statements here
7751         }
7752         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
7753         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
7754                 if(!isWasmInitialized) {
7755                         throw new Error("initializeWasm() must be awaited first!");
7756                 }
7757                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
7758                 return decodeArray(nativeResponseValue);
7759         }
7760         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7761         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
7762                 if(!isWasmInitialized) {
7763                         throw new Error("initializeWasm() must be awaited first!");
7764                 }
7765                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
7766                 // debug statements here
7767         }
7768         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
7769         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
7770                 if(!isWasmInitialized) {
7771                         throw new Error("initializeWasm() must be awaited first!");
7772                 }
7773                 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
7774                 return nativeResponseValue;
7775         }
7776         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
7777         export function UpdateFulfillHTLC_clone(orig: number): number {
7778                 if(!isWasmInitialized) {
7779                         throw new Error("initializeWasm() must be awaited first!");
7780                 }
7781                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
7782                 return nativeResponseValue;
7783         }
7784         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
7785         export function UpdateFailHTLC_free(this_obj: number): void {
7786                 if(!isWasmInitialized) {
7787                         throw new Error("initializeWasm() must be awaited first!");
7788                 }
7789                 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
7790                 // debug statements here
7791         }
7792         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
7793         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
7794                 if(!isWasmInitialized) {
7795                         throw new Error("initializeWasm() must be awaited first!");
7796                 }
7797                 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
7798                 return decodeArray(nativeResponseValue);
7799         }
7800         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7801         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7802                 if(!isWasmInitialized) {
7803                         throw new Error("initializeWasm() must be awaited first!");
7804                 }
7805                 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
7806                 // debug statements here
7807         }
7808         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
7809         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
7810                 if(!isWasmInitialized) {
7811                         throw new Error("initializeWasm() must be awaited first!");
7812                 }
7813                 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
7814                 return nativeResponseValue;
7815         }
7816         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
7817         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
7818                 if(!isWasmInitialized) {
7819                         throw new Error("initializeWasm() must be awaited first!");
7820                 }
7821                 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
7822                 // debug statements here
7823         }
7824         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
7825         export function UpdateFailHTLC_clone(orig: number): number {
7826                 if(!isWasmInitialized) {
7827                         throw new Error("initializeWasm() must be awaited first!");
7828                 }
7829                 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
7830                 return nativeResponseValue;
7831         }
7832         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
7833         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
7834                 if(!isWasmInitialized) {
7835                         throw new Error("initializeWasm() must be awaited first!");
7836                 }
7837                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
7838                 // debug statements here
7839         }
7840         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
7841         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
7842                 if(!isWasmInitialized) {
7843                         throw new Error("initializeWasm() must be awaited first!");
7844                 }
7845                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
7846                 return decodeArray(nativeResponseValue);
7847         }
7848         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7849         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7850                 if(!isWasmInitialized) {
7851                         throw new Error("initializeWasm() must be awaited first!");
7852                 }
7853                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
7854                 // debug statements here
7855         }
7856         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
7857         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
7858                 if(!isWasmInitialized) {
7859                         throw new Error("initializeWasm() must be awaited first!");
7860                 }
7861                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
7862                 return nativeResponseValue;
7863         }
7864         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
7865         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
7866                 if(!isWasmInitialized) {
7867                         throw new Error("initializeWasm() must be awaited first!");
7868                 }
7869                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
7870                 // debug statements here
7871         }
7872         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
7873         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
7874                 if(!isWasmInitialized) {
7875                         throw new Error("initializeWasm() must be awaited first!");
7876                 }
7877                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
7878                 return nativeResponseValue;
7879         }
7880         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
7881         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
7882                 if(!isWasmInitialized) {
7883                         throw new Error("initializeWasm() must be awaited first!");
7884                 }
7885                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
7886                 // debug statements here
7887         }
7888         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
7889         export function UpdateFailMalformedHTLC_clone(orig: number): number {
7890                 if(!isWasmInitialized) {
7891                         throw new Error("initializeWasm() must be awaited first!");
7892                 }
7893                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
7894                 return nativeResponseValue;
7895         }
7896         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
7897         export function CommitmentSigned_free(this_obj: number): void {
7898                 if(!isWasmInitialized) {
7899                         throw new Error("initializeWasm() must be awaited first!");
7900                 }
7901                 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
7902                 // debug statements here
7903         }
7904         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
7905         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
7906                 if(!isWasmInitialized) {
7907                         throw new Error("initializeWasm() must be awaited first!");
7908                 }
7909                 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
7910                 return decodeArray(nativeResponseValue);
7911         }
7912         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7913         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7914                 if(!isWasmInitialized) {
7915                         throw new Error("initializeWasm() must be awaited first!");
7916                 }
7917                 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
7918                 // debug statements here
7919         }
7920         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
7921         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
7922                 if(!isWasmInitialized) {
7923                         throw new Error("initializeWasm() must be awaited first!");
7924                 }
7925                 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
7926                 return decodeArray(nativeResponseValue);
7927         }
7928         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7929         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7930                 if(!isWasmInitialized) {
7931                         throw new Error("initializeWasm() must be awaited first!");
7932                 }
7933                 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
7934                 // debug statements here
7935         }
7936         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
7937         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
7938                 if(!isWasmInitialized) {
7939                         throw new Error("initializeWasm() must be awaited first!");
7940                 }
7941                 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
7942                 // debug statements here
7943         }
7944         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
7945         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
7946                 if(!isWasmInitialized) {
7947                         throw new Error("initializeWasm() must be awaited first!");
7948                 }
7949                 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
7950                 return nativeResponseValue;
7951         }
7952         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
7953         export function CommitmentSigned_clone(orig: number): number {
7954                 if(!isWasmInitialized) {
7955                         throw new Error("initializeWasm() must be awaited first!");
7956                 }
7957                 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
7958                 return nativeResponseValue;
7959         }
7960         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
7961         export function RevokeAndACK_free(this_obj: number): void {
7962                 if(!isWasmInitialized) {
7963                         throw new Error("initializeWasm() must be awaited first!");
7964                 }
7965                 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
7966                 // debug statements here
7967         }
7968         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
7969         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
7970                 if(!isWasmInitialized) {
7971                         throw new Error("initializeWasm() must be awaited first!");
7972                 }
7973                 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
7974                 return decodeArray(nativeResponseValue);
7975         }
7976         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7977         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
7978                 if(!isWasmInitialized) {
7979                         throw new Error("initializeWasm() must be awaited first!");
7980                 }
7981                 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
7982                 // debug statements here
7983         }
7984         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
7985         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
7986                 if(!isWasmInitialized) {
7987                         throw new Error("initializeWasm() must be awaited first!");
7988                 }
7989                 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
7990                 return decodeArray(nativeResponseValue);
7991         }
7992         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7993         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
7994                 if(!isWasmInitialized) {
7995                         throw new Error("initializeWasm() must be awaited first!");
7996                 }
7997                 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
7998                 // debug statements here
7999         }
8000         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
8001         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
8002                 if(!isWasmInitialized) {
8003                         throw new Error("initializeWasm() must be awaited first!");
8004                 }
8005                 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
8006                 return decodeArray(nativeResponseValue);
8007         }
8008         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8009         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8010                 if(!isWasmInitialized) {
8011                         throw new Error("initializeWasm() must be awaited first!");
8012                 }
8013                 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
8014                 // debug statements here
8015         }
8016         // 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);
8017         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
8018                 if(!isWasmInitialized) {
8019                         throw new Error("initializeWasm() must be awaited first!");
8020                 }
8021                 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
8022                 return nativeResponseValue;
8023         }
8024         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
8025         export function RevokeAndACK_clone(orig: number): number {
8026                 if(!isWasmInitialized) {
8027                         throw new Error("initializeWasm() must be awaited first!");
8028                 }
8029                 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
8030                 return nativeResponseValue;
8031         }
8032         // void UpdateFee_free(struct LDKUpdateFee this_obj);
8033         export function UpdateFee_free(this_obj: number): void {
8034                 if(!isWasmInitialized) {
8035                         throw new Error("initializeWasm() must be awaited first!");
8036                 }
8037                 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
8038                 // debug statements here
8039         }
8040         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
8041         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
8042                 if(!isWasmInitialized) {
8043                         throw new Error("initializeWasm() must be awaited first!");
8044                 }
8045                 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
8046                 return decodeArray(nativeResponseValue);
8047         }
8048         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8049         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
8050                 if(!isWasmInitialized) {
8051                         throw new Error("initializeWasm() must be awaited first!");
8052                 }
8053                 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
8054                 // debug statements here
8055         }
8056         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
8057         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
8058                 if(!isWasmInitialized) {
8059                         throw new Error("initializeWasm() must be awaited first!");
8060                 }
8061                 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
8062                 return nativeResponseValue;
8063         }
8064         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
8065         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
8066                 if(!isWasmInitialized) {
8067                         throw new Error("initializeWasm() must be awaited first!");
8068                 }
8069                 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
8070                 // debug statements here
8071         }
8072         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
8073         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
8074                 if(!isWasmInitialized) {
8075                         throw new Error("initializeWasm() must be awaited first!");
8076                 }
8077                 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
8078                 return nativeResponseValue;
8079         }
8080         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
8081         export function UpdateFee_clone(orig: number): number {
8082                 if(!isWasmInitialized) {
8083                         throw new Error("initializeWasm() must be awaited first!");
8084                 }
8085                 const nativeResponseValue = wasm.UpdateFee_clone(orig);
8086                 return nativeResponseValue;
8087         }
8088         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
8089         export function DataLossProtect_free(this_obj: number): void {
8090                 if(!isWasmInitialized) {
8091                         throw new Error("initializeWasm() must be awaited first!");
8092                 }
8093                 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
8094                 // debug statements here
8095         }
8096         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
8097         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
8098                 if(!isWasmInitialized) {
8099                         throw new Error("initializeWasm() must be awaited first!");
8100                 }
8101                 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
8102                 return decodeArray(nativeResponseValue);
8103         }
8104         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8105         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
8106                 if(!isWasmInitialized) {
8107                         throw new Error("initializeWasm() must be awaited first!");
8108                 }
8109                 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
8110                 // debug statements here
8111         }
8112         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
8113         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
8114                 if(!isWasmInitialized) {
8115                         throw new Error("initializeWasm() must be awaited first!");
8116                 }
8117                 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
8118                 return decodeArray(nativeResponseValue);
8119         }
8120         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8121         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8122                 if(!isWasmInitialized) {
8123                         throw new Error("initializeWasm() must be awaited first!");
8124                 }
8125                 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
8126                 // debug statements here
8127         }
8128         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
8129         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
8130                 if(!isWasmInitialized) {
8131                         throw new Error("initializeWasm() must be awaited first!");
8132                 }
8133                 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
8134                 return nativeResponseValue;
8135         }
8136         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
8137         export function DataLossProtect_clone(orig: number): number {
8138                 if(!isWasmInitialized) {
8139                         throw new Error("initializeWasm() must be awaited first!");
8140                 }
8141                 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
8142                 return nativeResponseValue;
8143         }
8144         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
8145         export function ChannelReestablish_free(this_obj: number): void {
8146                 if(!isWasmInitialized) {
8147                         throw new Error("initializeWasm() must be awaited first!");
8148                 }
8149                 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
8150                 // debug statements here
8151         }
8152         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
8153         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
8154                 if(!isWasmInitialized) {
8155                         throw new Error("initializeWasm() must be awaited first!");
8156                 }
8157                 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
8158                 return decodeArray(nativeResponseValue);
8159         }
8160         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8161         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
8162                 if(!isWasmInitialized) {
8163                         throw new Error("initializeWasm() must be awaited first!");
8164                 }
8165                 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
8166                 // debug statements here
8167         }
8168         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8169         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
8170                 if(!isWasmInitialized) {
8171                         throw new Error("initializeWasm() must be awaited first!");
8172                 }
8173                 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
8174                 return nativeResponseValue;
8175         }
8176         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8177         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
8178                 if(!isWasmInitialized) {
8179                         throw new Error("initializeWasm() must be awaited first!");
8180                 }
8181                 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
8182                 // debug statements here
8183         }
8184         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8185         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
8186                 if(!isWasmInitialized) {
8187                         throw new Error("initializeWasm() must be awaited first!");
8188                 }
8189                 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
8190                 return nativeResponseValue;
8191         }
8192         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8193         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
8194                 if(!isWasmInitialized) {
8195                         throw new Error("initializeWasm() must be awaited first!");
8196                 }
8197                 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
8198                 // debug statements here
8199         }
8200         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
8201         export function ChannelReestablish_clone(orig: number): number {
8202                 if(!isWasmInitialized) {
8203                         throw new Error("initializeWasm() must be awaited first!");
8204                 }
8205                 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
8206                 return nativeResponseValue;
8207         }
8208         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
8209         export function AnnouncementSignatures_free(this_obj: number): void {
8210                 if(!isWasmInitialized) {
8211                         throw new Error("initializeWasm() must be awaited first!");
8212                 }
8213                 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
8214                 // debug statements here
8215         }
8216         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
8217         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
8218                 if(!isWasmInitialized) {
8219                         throw new Error("initializeWasm() must be awaited first!");
8220                 }
8221                 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
8222                 return decodeArray(nativeResponseValue);
8223         }
8224         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8225         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
8226                 if(!isWasmInitialized) {
8227                         throw new Error("initializeWasm() must be awaited first!");
8228                 }
8229                 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
8230                 // debug statements here
8231         }
8232         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8233         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
8234                 if(!isWasmInitialized) {
8235                         throw new Error("initializeWasm() must be awaited first!");
8236                 }
8237                 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
8238                 return nativeResponseValue;
8239         }
8240         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
8241         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
8242                 if(!isWasmInitialized) {
8243                         throw new Error("initializeWasm() must be awaited first!");
8244                 }
8245                 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
8246                 // debug statements here
8247         }
8248         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8249         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
8250                 if(!isWasmInitialized) {
8251                         throw new Error("initializeWasm() must be awaited first!");
8252                 }
8253                 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
8254                 return decodeArray(nativeResponseValue);
8255         }
8256         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8257         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
8258                 if(!isWasmInitialized) {
8259                         throw new Error("initializeWasm() must be awaited first!");
8260                 }
8261                 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
8262                 // debug statements here
8263         }
8264         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8265         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
8266                 if(!isWasmInitialized) {
8267                         throw new Error("initializeWasm() must be awaited first!");
8268                 }
8269                 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
8270                 return decodeArray(nativeResponseValue);
8271         }
8272         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8273         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
8274                 if(!isWasmInitialized) {
8275                         throw new Error("initializeWasm() must be awaited first!");
8276                 }
8277                 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
8278                 // debug statements here
8279         }
8280         // 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);
8281         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
8282                 if(!isWasmInitialized) {
8283                         throw new Error("initializeWasm() must be awaited first!");
8284                 }
8285                 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
8286                 return nativeResponseValue;
8287         }
8288         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
8289         export function AnnouncementSignatures_clone(orig: number): number {
8290                 if(!isWasmInitialized) {
8291                         throw new Error("initializeWasm() must be awaited first!");
8292                 }
8293                 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
8294                 return nativeResponseValue;
8295         }
8296         // void NetAddress_free(struct LDKNetAddress this_ptr);
8297         export function NetAddress_free(this_ptr: number): void {
8298                 if(!isWasmInitialized) {
8299                         throw new Error("initializeWasm() must be awaited first!");
8300                 }
8301                 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
8302                 // debug statements here
8303         }
8304         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
8305         export function NetAddress_clone(orig: number): number {
8306                 if(!isWasmInitialized) {
8307                         throw new Error("initializeWasm() must be awaited first!");
8308                 }
8309                 const nativeResponseValue = wasm.NetAddress_clone(orig);
8310                 return nativeResponseValue;
8311         }
8312         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
8313         export function NetAddress_write(obj: number): Uint8Array {
8314                 if(!isWasmInitialized) {
8315                         throw new Error("initializeWasm() must be awaited first!");
8316                 }
8317                 const nativeResponseValue = wasm.NetAddress_write(obj);
8318                 return decodeArray(nativeResponseValue);
8319         }
8320         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
8321         export function Result_read(ser: Uint8Array): number {
8322                 if(!isWasmInitialized) {
8323                         throw new Error("initializeWasm() must be awaited first!");
8324                 }
8325                 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
8326                 return nativeResponseValue;
8327         }
8328         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
8329         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
8330                 if(!isWasmInitialized) {
8331                         throw new Error("initializeWasm() must be awaited first!");
8332                 }
8333                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
8334                 // debug statements here
8335         }
8336         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8337         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
8338                 if(!isWasmInitialized) {
8339                         throw new Error("initializeWasm() must be awaited first!");
8340                 }
8341                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
8342                 return nativeResponseValue;
8343         }
8344         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
8345         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
8346                 if(!isWasmInitialized) {
8347                         throw new Error("initializeWasm() must be awaited first!");
8348                 }
8349                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
8350                 // debug statements here
8351         }
8352         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8353         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
8354                 if(!isWasmInitialized) {
8355                         throw new Error("initializeWasm() must be awaited first!");
8356                 }
8357                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
8358                 return nativeResponseValue;
8359         }
8360         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
8361         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
8362                 if(!isWasmInitialized) {
8363                         throw new Error("initializeWasm() must be awaited first!");
8364                 }
8365                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
8366                 // debug statements here
8367         }
8368         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8369         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
8370                 if(!isWasmInitialized) {
8371                         throw new Error("initializeWasm() must be awaited first!");
8372                 }
8373                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
8374                 return decodeArray(nativeResponseValue);
8375         }
8376         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8377         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
8378                 if(!isWasmInitialized) {
8379                         throw new Error("initializeWasm() must be awaited first!");
8380                 }
8381                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
8382                 // debug statements here
8383         }
8384         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
8385         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
8386                 if(!isWasmInitialized) {
8387                         throw new Error("initializeWasm() must be awaited first!");
8388                 }
8389                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
8390                 return decodeArray(nativeResponseValue);
8391         }
8392         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
8393         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
8394                 if(!isWasmInitialized) {
8395                         throw new Error("initializeWasm() must be awaited first!");
8396                 }
8397                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
8398                 // debug statements here
8399         }
8400         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
8401         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
8402                 if(!isWasmInitialized) {
8403                         throw new Error("initializeWasm() must be awaited first!");
8404                 }
8405                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
8406                 return decodeArray(nativeResponseValue);
8407         }
8408         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8409         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
8410                 if(!isWasmInitialized) {
8411                         throw new Error("initializeWasm() must be awaited first!");
8412                 }
8413                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
8414                 // debug statements here
8415         }
8416         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
8417         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
8418                 if(!isWasmInitialized) {
8419                         throw new Error("initializeWasm() must be awaited first!");
8420                 }
8421                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
8422                 // debug statements here
8423         }
8424         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
8425         export function UnsignedNodeAnnouncement_clone(orig: number): number {
8426                 if(!isWasmInitialized) {
8427                         throw new Error("initializeWasm() must be awaited first!");
8428                 }
8429                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
8430                 return nativeResponseValue;
8431         }
8432         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
8433         export function NodeAnnouncement_free(this_obj: number): void {
8434                 if(!isWasmInitialized) {
8435                         throw new Error("initializeWasm() must be awaited first!");
8436                 }
8437                 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
8438                 // debug statements here
8439         }
8440         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8441         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
8442                 if(!isWasmInitialized) {
8443                         throw new Error("initializeWasm() must be awaited first!");
8444                 }
8445                 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
8446                 return decodeArray(nativeResponseValue);
8447         }
8448         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8449         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
8450                 if(!isWasmInitialized) {
8451                         throw new Error("initializeWasm() must be awaited first!");
8452                 }
8453                 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
8454                 // debug statements here
8455         }
8456         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8457         export function NodeAnnouncement_get_contents(this_ptr: number): number {
8458                 if(!isWasmInitialized) {
8459                         throw new Error("initializeWasm() must be awaited first!");
8460                 }
8461                 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
8462                 return nativeResponseValue;
8463         }
8464         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
8465         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
8466                 if(!isWasmInitialized) {
8467                         throw new Error("initializeWasm() must be awaited first!");
8468                 }
8469                 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
8470                 // debug statements here
8471         }
8472         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
8473         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
8474                 if(!isWasmInitialized) {
8475                         throw new Error("initializeWasm() must be awaited first!");
8476                 }
8477                 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
8478                 return nativeResponseValue;
8479         }
8480         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
8481         export function NodeAnnouncement_clone(orig: number): number {
8482                 if(!isWasmInitialized) {
8483                         throw new Error("initializeWasm() must be awaited first!");
8484                 }
8485                 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
8486                 return nativeResponseValue;
8487         }
8488         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
8489         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
8490                 if(!isWasmInitialized) {
8491                         throw new Error("initializeWasm() must be awaited first!");
8492                 }
8493                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
8494                 // debug statements here
8495         }
8496         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8497         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
8498                 if(!isWasmInitialized) {
8499                         throw new Error("initializeWasm() must be awaited first!");
8500                 }
8501                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
8502                 return nativeResponseValue;
8503         }
8504         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
8505         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
8506                 if(!isWasmInitialized) {
8507                         throw new Error("initializeWasm() must be awaited first!");
8508                 }
8509                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
8510                 // debug statements here
8511         }
8512         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
8513         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
8514                 if(!isWasmInitialized) {
8515                         throw new Error("initializeWasm() must be awaited first!");
8516                 }
8517                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
8518                 return decodeArray(nativeResponseValue);
8519         }
8520         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8521         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8522                 if(!isWasmInitialized) {
8523                         throw new Error("initializeWasm() must be awaited first!");
8524                 }
8525                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
8526                 // debug statements here
8527         }
8528         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8529         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
8530                 if(!isWasmInitialized) {
8531                         throw new Error("initializeWasm() must be awaited first!");
8532                 }
8533                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
8534                 return nativeResponseValue;
8535         }
8536         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
8537         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
8538                 if(!isWasmInitialized) {
8539                         throw new Error("initializeWasm() must be awaited first!");
8540                 }
8541                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
8542                 // debug statements here
8543         }
8544         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8545         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
8546                 if(!isWasmInitialized) {
8547                         throw new Error("initializeWasm() must be awaited first!");
8548                 }
8549                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
8550                 return decodeArray(nativeResponseValue);
8551         }
8552         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8553         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
8554                 if(!isWasmInitialized) {
8555                         throw new Error("initializeWasm() must be awaited first!");
8556                 }
8557                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
8558                 // debug statements here
8559         }
8560         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8561         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
8562                 if(!isWasmInitialized) {
8563                         throw new Error("initializeWasm() must be awaited first!");
8564                 }
8565                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
8566                 return decodeArray(nativeResponseValue);
8567         }
8568         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8569         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
8570                 if(!isWasmInitialized) {
8571                         throw new Error("initializeWasm() must be awaited first!");
8572                 }
8573                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
8574                 // debug statements here
8575         }
8576         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8577         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
8578                 if(!isWasmInitialized) {
8579                         throw new Error("initializeWasm() must be awaited first!");
8580                 }
8581                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
8582                 return decodeArray(nativeResponseValue);
8583         }
8584         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8585         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
8586                 if(!isWasmInitialized) {
8587                         throw new Error("initializeWasm() must be awaited first!");
8588                 }
8589                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
8590                 // debug statements here
8591         }
8592         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8593         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
8594                 if(!isWasmInitialized) {
8595                         throw new Error("initializeWasm() must be awaited first!");
8596                 }
8597                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
8598                 return decodeArray(nativeResponseValue);
8599         }
8600         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8601         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
8602                 if(!isWasmInitialized) {
8603                         throw new Error("initializeWasm() must be awaited first!");
8604                 }
8605                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
8606                 // debug statements here
8607         }
8608         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
8609         export function UnsignedChannelAnnouncement_clone(orig: number): number {
8610                 if(!isWasmInitialized) {
8611                         throw new Error("initializeWasm() must be awaited first!");
8612                 }
8613                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
8614                 return nativeResponseValue;
8615         }
8616         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
8617         export function ChannelAnnouncement_free(this_obj: number): void {
8618                 if(!isWasmInitialized) {
8619                         throw new Error("initializeWasm() must be awaited first!");
8620                 }
8621                 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
8622                 // debug statements here
8623         }
8624         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8625         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
8626                 if(!isWasmInitialized) {
8627                         throw new Error("initializeWasm() must be awaited first!");
8628                 }
8629                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
8630                 return decodeArray(nativeResponseValue);
8631         }
8632         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8633         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
8634                 if(!isWasmInitialized) {
8635                         throw new Error("initializeWasm() must be awaited first!");
8636                 }
8637                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
8638                 // debug statements here
8639         }
8640         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8641         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
8642                 if(!isWasmInitialized) {
8643                         throw new Error("initializeWasm() must be awaited first!");
8644                 }
8645                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
8646                 return decodeArray(nativeResponseValue);
8647         }
8648         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8649         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
8650                 if(!isWasmInitialized) {
8651                         throw new Error("initializeWasm() must be awaited first!");
8652                 }
8653                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
8654                 // debug statements here
8655         }
8656         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8657         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
8658                 if(!isWasmInitialized) {
8659                         throw new Error("initializeWasm() must be awaited first!");
8660                 }
8661                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
8662                 return decodeArray(nativeResponseValue);
8663         }
8664         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8665         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
8666                 if(!isWasmInitialized) {
8667                         throw new Error("initializeWasm() must be awaited first!");
8668                 }
8669                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
8670                 // debug statements here
8671         }
8672         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8673         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
8674                 if(!isWasmInitialized) {
8675                         throw new Error("initializeWasm() must be awaited first!");
8676                 }
8677                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
8678                 return decodeArray(nativeResponseValue);
8679         }
8680         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8681         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
8682                 if(!isWasmInitialized) {
8683                         throw new Error("initializeWasm() must be awaited first!");
8684                 }
8685                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
8686                 // debug statements here
8687         }
8688         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8689         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
8690                 if(!isWasmInitialized) {
8691                         throw new Error("initializeWasm() must be awaited first!");
8692                 }
8693                 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
8694                 return nativeResponseValue;
8695         }
8696         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
8697         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
8698                 if(!isWasmInitialized) {
8699                         throw new Error("initializeWasm() must be awaited first!");
8700                 }
8701                 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
8702                 // debug statements here
8703         }
8704         // 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);
8705         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 {
8706                 if(!isWasmInitialized) {
8707                         throw new Error("initializeWasm() must be awaited first!");
8708                 }
8709                 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);
8710                 return nativeResponseValue;
8711         }
8712         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
8713         export function ChannelAnnouncement_clone(orig: number): number {
8714                 if(!isWasmInitialized) {
8715                         throw new Error("initializeWasm() must be awaited first!");
8716                 }
8717                 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
8718                 return nativeResponseValue;
8719         }
8720         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
8721         export function UnsignedChannelUpdate_free(this_obj: number): void {
8722                 if(!isWasmInitialized) {
8723                         throw new Error("initializeWasm() must be awaited first!");
8724                 }
8725                 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
8726                 // debug statements here
8727         }
8728         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
8729         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
8730                 if(!isWasmInitialized) {
8731                         throw new Error("initializeWasm() must be awaited first!");
8732                 }
8733                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
8734                 return decodeArray(nativeResponseValue);
8735         }
8736         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8737         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8738                 if(!isWasmInitialized) {
8739                         throw new Error("initializeWasm() must be awaited first!");
8740                 }
8741                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
8742                 // debug statements here
8743         }
8744         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8745         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
8746                 if(!isWasmInitialized) {
8747                         throw new Error("initializeWasm() must be awaited first!");
8748                 }
8749                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
8750                 return nativeResponseValue;
8751         }
8752         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
8753         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
8754                 if(!isWasmInitialized) {
8755                         throw new Error("initializeWasm() must be awaited first!");
8756                 }
8757                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
8758                 // debug statements here
8759         }
8760         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8761         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
8762                 if(!isWasmInitialized) {
8763                         throw new Error("initializeWasm() must be awaited first!");
8764                 }
8765                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
8766                 return nativeResponseValue;
8767         }
8768         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8769         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
8770                 if(!isWasmInitialized) {
8771                         throw new Error("initializeWasm() must be awaited first!");
8772                 }
8773                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
8774                 // debug statements here
8775         }
8776         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8777         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
8778                 if(!isWasmInitialized) {
8779                         throw new Error("initializeWasm() must be awaited first!");
8780                 }
8781                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
8782                 return nativeResponseValue;
8783         }
8784         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
8785         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
8786                 if(!isWasmInitialized) {
8787                         throw new Error("initializeWasm() must be awaited first!");
8788                 }
8789                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
8790                 // debug statements here
8791         }
8792         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8793         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
8794                 if(!isWasmInitialized) {
8795                         throw new Error("initializeWasm() must be awaited first!");
8796                 }
8797                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
8798                 return nativeResponseValue;
8799         }
8800         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
8801         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
8802                 if(!isWasmInitialized) {
8803                         throw new Error("initializeWasm() must be awaited first!");
8804                 }
8805                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
8806                 // debug statements here
8807         }
8808         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8809         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
8810                 if(!isWasmInitialized) {
8811                         throw new Error("initializeWasm() must be awaited first!");
8812                 }
8813                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
8814                 return nativeResponseValue;
8815         }
8816         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
8817         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
8818                 if(!isWasmInitialized) {
8819                         throw new Error("initializeWasm() must be awaited first!");
8820                 }
8821                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
8822                 // debug statements here
8823         }
8824         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8825         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
8826                 if(!isWasmInitialized) {
8827                         throw new Error("initializeWasm() must be awaited first!");
8828                 }
8829                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
8830                 return nativeResponseValue;
8831         }
8832         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8833         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
8834                 if(!isWasmInitialized) {
8835                         throw new Error("initializeWasm() must be awaited first!");
8836                 }
8837                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
8838                 // debug statements here
8839         }
8840         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8841         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
8842                 if(!isWasmInitialized) {
8843                         throw new Error("initializeWasm() must be awaited first!");
8844                 }
8845                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
8846                 return nativeResponseValue;
8847         }
8848         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8849         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
8850                 if(!isWasmInitialized) {
8851                         throw new Error("initializeWasm() must be awaited first!");
8852                 }
8853                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
8854                 // debug statements here
8855         }
8856         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
8857         export function UnsignedChannelUpdate_clone(orig: number): number {
8858                 if(!isWasmInitialized) {
8859                         throw new Error("initializeWasm() must be awaited first!");
8860                 }
8861                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
8862                 return nativeResponseValue;
8863         }
8864         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
8865         export function ChannelUpdate_free(this_obj: number): void {
8866                 if(!isWasmInitialized) {
8867                         throw new Error("initializeWasm() must be awaited first!");
8868                 }
8869                 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
8870                 // debug statements here
8871         }
8872         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
8873         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
8874                 if(!isWasmInitialized) {
8875                         throw new Error("initializeWasm() must be awaited first!");
8876                 }
8877                 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
8878                 return decodeArray(nativeResponseValue);
8879         }
8880         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
8881         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
8882                 if(!isWasmInitialized) {
8883                         throw new Error("initializeWasm() must be awaited first!");
8884                 }
8885                 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
8886                 // debug statements here
8887         }
8888         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
8889         export function ChannelUpdate_get_contents(this_ptr: number): number {
8890                 if(!isWasmInitialized) {
8891                         throw new Error("initializeWasm() must be awaited first!");
8892                 }
8893                 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
8894                 return nativeResponseValue;
8895         }
8896         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
8897         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
8898                 if(!isWasmInitialized) {
8899                         throw new Error("initializeWasm() must be awaited first!");
8900                 }
8901                 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
8902                 // debug statements here
8903         }
8904         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
8905         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
8906                 if(!isWasmInitialized) {
8907                         throw new Error("initializeWasm() must be awaited first!");
8908                 }
8909                 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
8910                 return nativeResponseValue;
8911         }
8912         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
8913         export function ChannelUpdate_clone(orig: number): number {
8914                 if(!isWasmInitialized) {
8915                         throw new Error("initializeWasm() must be awaited first!");
8916                 }
8917                 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
8918                 return nativeResponseValue;
8919         }
8920         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
8921         export function QueryChannelRange_free(this_obj: number): void {
8922                 if(!isWasmInitialized) {
8923                         throw new Error("initializeWasm() must be awaited first!");
8924                 }
8925                 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
8926                 // debug statements here
8927         }
8928         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
8929         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
8930                 if(!isWasmInitialized) {
8931                         throw new Error("initializeWasm() must be awaited first!");
8932                 }
8933                 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
8934                 return decodeArray(nativeResponseValue);
8935         }
8936         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8937         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8938                 if(!isWasmInitialized) {
8939                         throw new Error("initializeWasm() must be awaited first!");
8940                 }
8941                 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
8942                 // debug statements here
8943         }
8944         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
8945         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
8946                 if(!isWasmInitialized) {
8947                         throw new Error("initializeWasm() must be awaited first!");
8948                 }
8949                 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
8950                 return nativeResponseValue;
8951         }
8952         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8953         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
8954                 if(!isWasmInitialized) {
8955                         throw new Error("initializeWasm() must be awaited first!");
8956                 }
8957                 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
8958                 // debug statements here
8959         }
8960         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
8961         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
8962                 if(!isWasmInitialized) {
8963                         throw new Error("initializeWasm() must be awaited first!");
8964                 }
8965                 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
8966                 return nativeResponseValue;
8967         }
8968         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8969         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
8970                 if(!isWasmInitialized) {
8971                         throw new Error("initializeWasm() must be awaited first!");
8972                 }
8973                 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
8974                 // debug statements here
8975         }
8976         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
8977         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
8978                 if(!isWasmInitialized) {
8979                         throw new Error("initializeWasm() must be awaited first!");
8980                 }
8981                 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
8982                 return nativeResponseValue;
8983         }
8984         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
8985         export function QueryChannelRange_clone(orig: number): number {
8986                 if(!isWasmInitialized) {
8987                         throw new Error("initializeWasm() must be awaited first!");
8988                 }
8989                 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
8990                 return nativeResponseValue;
8991         }
8992         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
8993         export function ReplyChannelRange_free(this_obj: number): void {
8994                 if(!isWasmInitialized) {
8995                         throw new Error("initializeWasm() must be awaited first!");
8996                 }
8997                 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
8998                 // debug statements here
8999         }
9000         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
9001         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
9002                 if(!isWasmInitialized) {
9003                         throw new Error("initializeWasm() must be awaited first!");
9004                 }
9005                 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
9006                 return decodeArray(nativeResponseValue);
9007         }
9008         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9009         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9010                 if(!isWasmInitialized) {
9011                         throw new Error("initializeWasm() must be awaited first!");
9012                 }
9013                 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
9014                 // debug statements here
9015         }
9016         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9017         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
9018                 if(!isWasmInitialized) {
9019                         throw new Error("initializeWasm() must be awaited first!");
9020                 }
9021                 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
9022                 return nativeResponseValue;
9023         }
9024         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9025         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
9026                 if(!isWasmInitialized) {
9027                         throw new Error("initializeWasm() must be awaited first!");
9028                 }
9029                 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
9030                 // debug statements here
9031         }
9032         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9033         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
9034                 if(!isWasmInitialized) {
9035                         throw new Error("initializeWasm() must be awaited first!");
9036                 }
9037                 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
9038                 return nativeResponseValue;
9039         }
9040         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9041         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
9042                 if(!isWasmInitialized) {
9043                         throw new Error("initializeWasm() must be awaited first!");
9044                 }
9045                 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
9046                 // debug statements here
9047         }
9048         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9049         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
9050                 if(!isWasmInitialized) {
9051                         throw new Error("initializeWasm() must be awaited first!");
9052                 }
9053                 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
9054                 return nativeResponseValue;
9055         }
9056         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
9057         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
9058                 if(!isWasmInitialized) {
9059                         throw new Error("initializeWasm() must be awaited first!");
9060                 }
9061                 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
9062                 // debug statements here
9063         }
9064         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9065         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
9066                 if(!isWasmInitialized) {
9067                         throw new Error("initializeWasm() must be awaited first!");
9068                 }
9069                 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
9070                 // debug statements here
9071         }
9072         // 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);
9073         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 {
9074                 if(!isWasmInitialized) {
9075                         throw new Error("initializeWasm() must be awaited first!");
9076                 }
9077                 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
9078                 return nativeResponseValue;
9079         }
9080         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
9081         export function ReplyChannelRange_clone(orig: number): number {
9082                 if(!isWasmInitialized) {
9083                         throw new Error("initializeWasm() must be awaited first!");
9084                 }
9085                 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
9086                 return nativeResponseValue;
9087         }
9088         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
9089         export function QueryShortChannelIds_free(this_obj: number): void {
9090                 if(!isWasmInitialized) {
9091                         throw new Error("initializeWasm() must be awaited first!");
9092                 }
9093                 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
9094                 // debug statements here
9095         }
9096         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
9097         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
9098                 if(!isWasmInitialized) {
9099                         throw new Error("initializeWasm() must be awaited first!");
9100                 }
9101                 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
9102                 return decodeArray(nativeResponseValue);
9103         }
9104         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9105         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9106                 if(!isWasmInitialized) {
9107                         throw new Error("initializeWasm() must be awaited first!");
9108                 }
9109                 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
9110                 // debug statements here
9111         }
9112         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9113         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
9114                 if(!isWasmInitialized) {
9115                         throw new Error("initializeWasm() must be awaited first!");
9116                 }
9117                 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
9118                 // debug statements here
9119         }
9120         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
9121         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
9122                 if(!isWasmInitialized) {
9123                         throw new Error("initializeWasm() must be awaited first!");
9124                 }
9125                 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
9126                 return nativeResponseValue;
9127         }
9128         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
9129         export function QueryShortChannelIds_clone(orig: number): number {
9130                 if(!isWasmInitialized) {
9131                         throw new Error("initializeWasm() must be awaited first!");
9132                 }
9133                 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
9134                 return nativeResponseValue;
9135         }
9136         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
9137         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
9138                 if(!isWasmInitialized) {
9139                         throw new Error("initializeWasm() must be awaited first!");
9140                 }
9141                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
9142                 // debug statements here
9143         }
9144         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
9145         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
9146                 if(!isWasmInitialized) {
9147                         throw new Error("initializeWasm() must be awaited first!");
9148                 }
9149                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
9150                 return decodeArray(nativeResponseValue);
9151         }
9152         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9153         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9154                 if(!isWasmInitialized) {
9155                         throw new Error("initializeWasm() must be awaited first!");
9156                 }
9157                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
9158                 // debug statements here
9159         }
9160         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
9161         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
9162                 if(!isWasmInitialized) {
9163                         throw new Error("initializeWasm() must be awaited first!");
9164                 }
9165                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
9166                 return nativeResponseValue;
9167         }
9168         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
9169         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
9170                 if(!isWasmInitialized) {
9171                         throw new Error("initializeWasm() must be awaited first!");
9172                 }
9173                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
9174                 // debug statements here
9175         }
9176         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
9177         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
9178                 if(!isWasmInitialized) {
9179                         throw new Error("initializeWasm() must be awaited first!");
9180                 }
9181                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
9182                 return nativeResponseValue;
9183         }
9184         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
9185         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
9186                 if(!isWasmInitialized) {
9187                         throw new Error("initializeWasm() must be awaited first!");
9188                 }
9189                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
9190                 return nativeResponseValue;
9191         }
9192         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
9193         export function GossipTimestampFilter_free(this_obj: number): void {
9194                 if(!isWasmInitialized) {
9195                         throw new Error("initializeWasm() must be awaited first!");
9196                 }
9197                 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
9198                 // debug statements here
9199         }
9200         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
9201         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
9202                 if(!isWasmInitialized) {
9203                         throw new Error("initializeWasm() must be awaited first!");
9204                 }
9205                 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
9206                 return decodeArray(nativeResponseValue);
9207         }
9208         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9209         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9210                 if(!isWasmInitialized) {
9211                         throw new Error("initializeWasm() must be awaited first!");
9212                 }
9213                 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
9214                 // debug statements here
9215         }
9216         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9217         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
9218                 if(!isWasmInitialized) {
9219                         throw new Error("initializeWasm() must be awaited first!");
9220                 }
9221                 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
9222                 return nativeResponseValue;
9223         }
9224         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9225         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
9226                 if(!isWasmInitialized) {
9227                         throw new Error("initializeWasm() must be awaited first!");
9228                 }
9229                 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
9230                 // debug statements here
9231         }
9232         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9233         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
9234                 if(!isWasmInitialized) {
9235                         throw new Error("initializeWasm() must be awaited first!");
9236                 }
9237                 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
9238                 return nativeResponseValue;
9239         }
9240         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9241         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
9242                 if(!isWasmInitialized) {
9243                         throw new Error("initializeWasm() must be awaited first!");
9244                 }
9245                 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
9246                 // debug statements here
9247         }
9248         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
9249         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
9250                 if(!isWasmInitialized) {
9251                         throw new Error("initializeWasm() must be awaited first!");
9252                 }
9253                 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
9254                 return nativeResponseValue;
9255         }
9256         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
9257         export function GossipTimestampFilter_clone(orig: number): number {
9258                 if(!isWasmInitialized) {
9259                         throw new Error("initializeWasm() must be awaited first!");
9260                 }
9261                 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
9262                 return nativeResponseValue;
9263         }
9264         // void ErrorAction_free(struct LDKErrorAction this_ptr);
9265         export function ErrorAction_free(this_ptr: number): void {
9266                 if(!isWasmInitialized) {
9267                         throw new Error("initializeWasm() must be awaited first!");
9268                 }
9269                 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
9270                 // debug statements here
9271         }
9272         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
9273         export function ErrorAction_clone(orig: number): number {
9274                 if(!isWasmInitialized) {
9275                         throw new Error("initializeWasm() must be awaited first!");
9276                 }
9277                 const nativeResponseValue = wasm.ErrorAction_clone(orig);
9278                 return nativeResponseValue;
9279         }
9280         // void LightningError_free(struct LDKLightningError this_obj);
9281         export function LightningError_free(this_obj: number): void {
9282                 if(!isWasmInitialized) {
9283                         throw new Error("initializeWasm() must be awaited first!");
9284                 }
9285                 const nativeResponseValue = wasm.LightningError_free(this_obj);
9286                 // debug statements here
9287         }
9288         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
9289         export function LightningError_get_err(this_ptr: number): String {
9290                 if(!isWasmInitialized) {
9291                         throw new Error("initializeWasm() must be awaited first!");
9292                 }
9293                 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
9294                 return nativeResponseValue;
9295         }
9296         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
9297         export function LightningError_set_err(this_ptr: number, val: Uint8Array): void {
9298                 if(!isWasmInitialized) {
9299                         throw new Error("initializeWasm() must be awaited first!");
9300                 }
9301                 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, encodeArray(val));
9302                 // debug statements here
9303         }
9304         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
9305         export function LightningError_get_action(this_ptr: number): number {
9306                 if(!isWasmInitialized) {
9307                         throw new Error("initializeWasm() must be awaited first!");
9308                 }
9309                 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
9310                 return nativeResponseValue;
9311         }
9312         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
9313         export function LightningError_set_action(this_ptr: number, val: number): void {
9314                 if(!isWasmInitialized) {
9315                         throw new Error("initializeWasm() must be awaited first!");
9316                 }
9317                 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
9318                 // debug statements here
9319         }
9320         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKCVec_u8Z err_arg, struct LDKErrorAction action_arg);
9321         export function LightningError_new(err_arg: Uint8Array, action_arg: number): number {
9322                 if(!isWasmInitialized) {
9323                         throw new Error("initializeWasm() must be awaited first!");
9324                 }
9325                 const nativeResponseValue = wasm.LightningError_new(encodeArray(err_arg), action_arg);
9326                 return nativeResponseValue;
9327         }
9328         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
9329         export function LightningError_clone(orig: number): number {
9330                 if(!isWasmInitialized) {
9331                         throw new Error("initializeWasm() must be awaited first!");
9332                 }
9333                 const nativeResponseValue = wasm.LightningError_clone(orig);
9334                 return nativeResponseValue;
9335         }
9336         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
9337         export function CommitmentUpdate_free(this_obj: number): void {
9338                 if(!isWasmInitialized) {
9339                         throw new Error("initializeWasm() must be awaited first!");
9340                 }
9341                 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
9342                 // debug statements here
9343         }
9344         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
9345         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
9346                 if(!isWasmInitialized) {
9347                         throw new Error("initializeWasm() must be awaited first!");
9348                 }
9349                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
9350                 // debug statements here
9351         }
9352         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
9353         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
9354                 if(!isWasmInitialized) {
9355                         throw new Error("initializeWasm() must be awaited first!");
9356                 }
9357                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
9358                 // debug statements here
9359         }
9360         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
9361         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
9362                 if(!isWasmInitialized) {
9363                         throw new Error("initializeWasm() must be awaited first!");
9364                 }
9365                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
9366                 // debug statements here
9367         }
9368         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
9369         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
9370                 if(!isWasmInitialized) {
9371                         throw new Error("initializeWasm() must be awaited first!");
9372                 }
9373                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
9374                 // debug statements here
9375         }
9376         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9377         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
9378                 if(!isWasmInitialized) {
9379                         throw new Error("initializeWasm() must be awaited first!");
9380                 }
9381                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
9382                 return nativeResponseValue;
9383         }
9384         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
9385         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
9386                 if(!isWasmInitialized) {
9387                         throw new Error("initializeWasm() must be awaited first!");
9388                 }
9389                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
9390                 // debug statements here
9391         }
9392         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9393         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
9394                 if(!isWasmInitialized) {
9395                         throw new Error("initializeWasm() must be awaited first!");
9396                 }
9397                 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
9398                 return nativeResponseValue;
9399         }
9400         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
9401         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
9402                 if(!isWasmInitialized) {
9403                         throw new Error("initializeWasm() must be awaited first!");
9404                 }
9405                 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
9406                 // debug statements here
9407         }
9408         // 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);
9409         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 {
9410                 if(!isWasmInitialized) {
9411                         throw new Error("initializeWasm() must be awaited first!");
9412                 }
9413                 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);
9414                 return nativeResponseValue;
9415         }
9416         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
9417         export function CommitmentUpdate_clone(orig: number): number {
9418                 if(!isWasmInitialized) {
9419                         throw new Error("initializeWasm() must be awaited first!");
9420                 }
9421                 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
9422                 return nativeResponseValue;
9423         }
9424         // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
9425         export function HTLCFailChannelUpdate_free(this_ptr: number): void {
9426                 if(!isWasmInitialized) {
9427                         throw new Error("initializeWasm() must be awaited first!");
9428                 }
9429                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
9430                 // debug statements here
9431         }
9432         // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
9433         export function HTLCFailChannelUpdate_clone(orig: number): number {
9434                 if(!isWasmInitialized) {
9435                         throw new Error("initializeWasm() must be awaited first!");
9436                 }
9437                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
9438                 return nativeResponseValue;
9439         }
9440         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
9441         export function ChannelMessageHandler_free(this_ptr: number): void {
9442                 if(!isWasmInitialized) {
9443                         throw new Error("initializeWasm() must be awaited first!");
9444                 }
9445                 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
9446                 // debug statements here
9447         }
9448         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
9449         export function RoutingMessageHandler_free(this_ptr: number): void {
9450                 if(!isWasmInitialized) {
9451                         throw new Error("initializeWasm() must be awaited first!");
9452                 }
9453                 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
9454                 // debug statements here
9455         }
9456         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
9457         export function AcceptChannel_write(obj: number): Uint8Array {
9458                 if(!isWasmInitialized) {
9459                         throw new Error("initializeWasm() must be awaited first!");
9460                 }
9461                 const nativeResponseValue = wasm.AcceptChannel_write(obj);
9462                 return decodeArray(nativeResponseValue);
9463         }
9464         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
9465         export function AcceptChannel_read(ser: Uint8Array): number {
9466                 if(!isWasmInitialized) {
9467                         throw new Error("initializeWasm() must be awaited first!");
9468                 }
9469                 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
9470                 return nativeResponseValue;
9471         }
9472         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
9473         export function AnnouncementSignatures_write(obj: number): Uint8Array {
9474                 if(!isWasmInitialized) {
9475                         throw new Error("initializeWasm() must be awaited first!");
9476                 }
9477                 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
9478                 return decodeArray(nativeResponseValue);
9479         }
9480         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
9481         export function AnnouncementSignatures_read(ser: Uint8Array): number {
9482                 if(!isWasmInitialized) {
9483                         throw new Error("initializeWasm() must be awaited first!");
9484                 }
9485                 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
9486                 return nativeResponseValue;
9487         }
9488         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
9489         export function ChannelReestablish_write(obj: number): Uint8Array {
9490                 if(!isWasmInitialized) {
9491                         throw new Error("initializeWasm() must be awaited first!");
9492                 }
9493                 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
9494                 return decodeArray(nativeResponseValue);
9495         }
9496         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
9497         export function ChannelReestablish_read(ser: Uint8Array): number {
9498                 if(!isWasmInitialized) {
9499                         throw new Error("initializeWasm() must be awaited first!");
9500                 }
9501                 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
9502                 return nativeResponseValue;
9503         }
9504         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
9505         export function ClosingSigned_write(obj: number): Uint8Array {
9506                 if(!isWasmInitialized) {
9507                         throw new Error("initializeWasm() must be awaited first!");
9508                 }
9509                 const nativeResponseValue = wasm.ClosingSigned_write(obj);
9510                 return decodeArray(nativeResponseValue);
9511         }
9512         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
9513         export function ClosingSigned_read(ser: Uint8Array): number {
9514                 if(!isWasmInitialized) {
9515                         throw new Error("initializeWasm() must be awaited first!");
9516                 }
9517                 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
9518                 return nativeResponseValue;
9519         }
9520         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
9521         export function CommitmentSigned_write(obj: number): Uint8Array {
9522                 if(!isWasmInitialized) {
9523                         throw new Error("initializeWasm() must be awaited first!");
9524                 }
9525                 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
9526                 return decodeArray(nativeResponseValue);
9527         }
9528         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
9529         export function CommitmentSigned_read(ser: Uint8Array): number {
9530                 if(!isWasmInitialized) {
9531                         throw new Error("initializeWasm() must be awaited first!");
9532                 }
9533                 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
9534                 return nativeResponseValue;
9535         }
9536         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
9537         export function FundingCreated_write(obj: number): Uint8Array {
9538                 if(!isWasmInitialized) {
9539                         throw new Error("initializeWasm() must be awaited first!");
9540                 }
9541                 const nativeResponseValue = wasm.FundingCreated_write(obj);
9542                 return decodeArray(nativeResponseValue);
9543         }
9544         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
9545         export function FundingCreated_read(ser: Uint8Array): number {
9546                 if(!isWasmInitialized) {
9547                         throw new Error("initializeWasm() must be awaited first!");
9548                 }
9549                 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
9550                 return nativeResponseValue;
9551         }
9552         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
9553         export function FundingSigned_write(obj: number): Uint8Array {
9554                 if(!isWasmInitialized) {
9555                         throw new Error("initializeWasm() must be awaited first!");
9556                 }
9557                 const nativeResponseValue = wasm.FundingSigned_write(obj);
9558                 return decodeArray(nativeResponseValue);
9559         }
9560         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
9561         export function FundingSigned_read(ser: Uint8Array): number {
9562                 if(!isWasmInitialized) {
9563                         throw new Error("initializeWasm() must be awaited first!");
9564                 }
9565                 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
9566                 return nativeResponseValue;
9567         }
9568         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
9569         export function FundingLocked_write(obj: number): Uint8Array {
9570                 if(!isWasmInitialized) {
9571                         throw new Error("initializeWasm() must be awaited first!");
9572                 }
9573                 const nativeResponseValue = wasm.FundingLocked_write(obj);
9574                 return decodeArray(nativeResponseValue);
9575         }
9576         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
9577         export function FundingLocked_read(ser: Uint8Array): number {
9578                 if(!isWasmInitialized) {
9579                         throw new Error("initializeWasm() must be awaited first!");
9580                 }
9581                 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
9582                 return nativeResponseValue;
9583         }
9584         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
9585         export function Init_write(obj: number): Uint8Array {
9586                 if(!isWasmInitialized) {
9587                         throw new Error("initializeWasm() must be awaited first!");
9588                 }
9589                 const nativeResponseValue = wasm.Init_write(obj);
9590                 return decodeArray(nativeResponseValue);
9591         }
9592         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
9593         export function Init_read(ser: Uint8Array): number {
9594                 if(!isWasmInitialized) {
9595                         throw new Error("initializeWasm() must be awaited first!");
9596                 }
9597                 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
9598                 return nativeResponseValue;
9599         }
9600         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
9601         export function OpenChannel_write(obj: number): Uint8Array {
9602                 if(!isWasmInitialized) {
9603                         throw new Error("initializeWasm() must be awaited first!");
9604                 }
9605                 const nativeResponseValue = wasm.OpenChannel_write(obj);
9606                 return decodeArray(nativeResponseValue);
9607         }
9608         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
9609         export function OpenChannel_read(ser: Uint8Array): number {
9610                 if(!isWasmInitialized) {
9611                         throw new Error("initializeWasm() must be awaited first!");
9612                 }
9613                 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
9614                 return nativeResponseValue;
9615         }
9616         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
9617         export function RevokeAndACK_write(obj: number): Uint8Array {
9618                 if(!isWasmInitialized) {
9619                         throw new Error("initializeWasm() must be awaited first!");
9620                 }
9621                 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
9622                 return decodeArray(nativeResponseValue);
9623         }
9624         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
9625         export function RevokeAndACK_read(ser: Uint8Array): number {
9626                 if(!isWasmInitialized) {
9627                         throw new Error("initializeWasm() must be awaited first!");
9628                 }
9629                 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
9630                 return nativeResponseValue;
9631         }
9632         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
9633         export function Shutdown_write(obj: number): Uint8Array {
9634                 if(!isWasmInitialized) {
9635                         throw new Error("initializeWasm() must be awaited first!");
9636                 }
9637                 const nativeResponseValue = wasm.Shutdown_write(obj);
9638                 return decodeArray(nativeResponseValue);
9639         }
9640         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
9641         export function Shutdown_read(ser: Uint8Array): number {
9642                 if(!isWasmInitialized) {
9643                         throw new Error("initializeWasm() must be awaited first!");
9644                 }
9645                 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
9646                 return nativeResponseValue;
9647         }
9648         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
9649         export function UpdateFailHTLC_write(obj: number): Uint8Array {
9650                 if(!isWasmInitialized) {
9651                         throw new Error("initializeWasm() must be awaited first!");
9652                 }
9653                 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
9654                 return decodeArray(nativeResponseValue);
9655         }
9656         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
9657         export function UpdateFailHTLC_read(ser: Uint8Array): number {
9658                 if(!isWasmInitialized) {
9659                         throw new Error("initializeWasm() must be awaited first!");
9660                 }
9661                 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
9662                 return nativeResponseValue;
9663         }
9664         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
9665         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
9666                 if(!isWasmInitialized) {
9667                         throw new Error("initializeWasm() must be awaited first!");
9668                 }
9669                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
9670                 return decodeArray(nativeResponseValue);
9671         }
9672         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
9673         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
9674                 if(!isWasmInitialized) {
9675                         throw new Error("initializeWasm() must be awaited first!");
9676                 }
9677                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
9678                 return nativeResponseValue;
9679         }
9680         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
9681         export function UpdateFee_write(obj: number): Uint8Array {
9682                 if(!isWasmInitialized) {
9683                         throw new Error("initializeWasm() must be awaited first!");
9684                 }
9685                 const nativeResponseValue = wasm.UpdateFee_write(obj);
9686                 return decodeArray(nativeResponseValue);
9687         }
9688         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
9689         export function UpdateFee_read(ser: Uint8Array): number {
9690                 if(!isWasmInitialized) {
9691                         throw new Error("initializeWasm() must be awaited first!");
9692                 }
9693                 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
9694                 return nativeResponseValue;
9695         }
9696         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
9697         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
9698                 if(!isWasmInitialized) {
9699                         throw new Error("initializeWasm() must be awaited first!");
9700                 }
9701                 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
9702                 return decodeArray(nativeResponseValue);
9703         }
9704         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
9705         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
9706                 if(!isWasmInitialized) {
9707                         throw new Error("initializeWasm() must be awaited first!");
9708                 }
9709                 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
9710                 return nativeResponseValue;
9711         }
9712         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
9713         export function UpdateAddHTLC_write(obj: number): Uint8Array {
9714                 if(!isWasmInitialized) {
9715                         throw new Error("initializeWasm() must be awaited first!");
9716                 }
9717                 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
9718                 return decodeArray(nativeResponseValue);
9719         }
9720         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
9721         export function UpdateAddHTLC_read(ser: Uint8Array): number {
9722                 if(!isWasmInitialized) {
9723                         throw new Error("initializeWasm() must be awaited first!");
9724                 }
9725                 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
9726                 return nativeResponseValue;
9727         }
9728         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
9729         export function Ping_write(obj: number): Uint8Array {
9730                 if(!isWasmInitialized) {
9731                         throw new Error("initializeWasm() must be awaited first!");
9732                 }
9733                 const nativeResponseValue = wasm.Ping_write(obj);
9734                 return decodeArray(nativeResponseValue);
9735         }
9736         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
9737         export function Ping_read(ser: Uint8Array): number {
9738                 if(!isWasmInitialized) {
9739                         throw new Error("initializeWasm() must be awaited first!");
9740                 }
9741                 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
9742                 return nativeResponseValue;
9743         }
9744         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
9745         export function Pong_write(obj: number): Uint8Array {
9746                 if(!isWasmInitialized) {
9747                         throw new Error("initializeWasm() must be awaited first!");
9748                 }
9749                 const nativeResponseValue = wasm.Pong_write(obj);
9750                 return decodeArray(nativeResponseValue);
9751         }
9752         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
9753         export function Pong_read(ser: Uint8Array): number {
9754                 if(!isWasmInitialized) {
9755                         throw new Error("initializeWasm() must be awaited first!");
9756                 }
9757                 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
9758                 return nativeResponseValue;
9759         }
9760         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
9761         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
9762                 if(!isWasmInitialized) {
9763                         throw new Error("initializeWasm() must be awaited first!");
9764                 }
9765                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
9766                 return decodeArray(nativeResponseValue);
9767         }
9768         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
9769         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
9770                 if(!isWasmInitialized) {
9771                         throw new Error("initializeWasm() must be awaited first!");
9772                 }
9773                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
9774                 return nativeResponseValue;
9775         }
9776         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
9777         export function ChannelAnnouncement_write(obj: number): Uint8Array {
9778                 if(!isWasmInitialized) {
9779                         throw new Error("initializeWasm() must be awaited first!");
9780                 }
9781                 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
9782                 return decodeArray(nativeResponseValue);
9783         }
9784         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
9785         export function ChannelAnnouncement_read(ser: Uint8Array): number {
9786                 if(!isWasmInitialized) {
9787                         throw new Error("initializeWasm() must be awaited first!");
9788                 }
9789                 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
9790                 return nativeResponseValue;
9791         }
9792         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
9793         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
9794                 if(!isWasmInitialized) {
9795                         throw new Error("initializeWasm() must be awaited first!");
9796                 }
9797                 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
9798                 return decodeArray(nativeResponseValue);
9799         }
9800         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
9801         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
9802                 if(!isWasmInitialized) {
9803                         throw new Error("initializeWasm() must be awaited first!");
9804                 }
9805                 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
9806                 return nativeResponseValue;
9807         }
9808         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
9809         export function ChannelUpdate_write(obj: number): Uint8Array {
9810                 if(!isWasmInitialized) {
9811                         throw new Error("initializeWasm() must be awaited first!");
9812                 }
9813                 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
9814                 return decodeArray(nativeResponseValue);
9815         }
9816         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
9817         export function ChannelUpdate_read(ser: Uint8Array): number {
9818                 if(!isWasmInitialized) {
9819                         throw new Error("initializeWasm() must be awaited first!");
9820                 }
9821                 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
9822                 return nativeResponseValue;
9823         }
9824         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
9825         export function ErrorMessage_write(obj: number): Uint8Array {
9826                 if(!isWasmInitialized) {
9827                         throw new Error("initializeWasm() must be awaited first!");
9828                 }
9829                 const nativeResponseValue = wasm.ErrorMessage_write(obj);
9830                 return decodeArray(nativeResponseValue);
9831         }
9832         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
9833         export function ErrorMessage_read(ser: Uint8Array): number {
9834                 if(!isWasmInitialized) {
9835                         throw new Error("initializeWasm() must be awaited first!");
9836                 }
9837                 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
9838                 return nativeResponseValue;
9839         }
9840         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
9841         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
9842                 if(!isWasmInitialized) {
9843                         throw new Error("initializeWasm() must be awaited first!");
9844                 }
9845                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
9846                 return decodeArray(nativeResponseValue);
9847         }
9848         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
9849         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
9850                 if(!isWasmInitialized) {
9851                         throw new Error("initializeWasm() must be awaited first!");
9852                 }
9853                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
9854                 return nativeResponseValue;
9855         }
9856         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
9857         export function NodeAnnouncement_write(obj: number): Uint8Array {
9858                 if(!isWasmInitialized) {
9859                         throw new Error("initializeWasm() must be awaited first!");
9860                 }
9861                 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
9862                 return decodeArray(nativeResponseValue);
9863         }
9864         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
9865         export function NodeAnnouncement_read(ser: Uint8Array): number {
9866                 if(!isWasmInitialized) {
9867                         throw new Error("initializeWasm() must be awaited first!");
9868                 }
9869                 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
9870                 return nativeResponseValue;
9871         }
9872         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
9873         export function QueryShortChannelIds_read(ser: Uint8Array): number {
9874                 if(!isWasmInitialized) {
9875                         throw new Error("initializeWasm() must be awaited first!");
9876                 }
9877                 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
9878                 return nativeResponseValue;
9879         }
9880         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
9881         export function QueryShortChannelIds_write(obj: number): Uint8Array {
9882                 if(!isWasmInitialized) {
9883                         throw new Error("initializeWasm() must be awaited first!");
9884                 }
9885                 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
9886                 return decodeArray(nativeResponseValue);
9887         }
9888         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
9889         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
9890                 if(!isWasmInitialized) {
9891                         throw new Error("initializeWasm() must be awaited first!");
9892                 }
9893                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
9894                 return nativeResponseValue;
9895         }
9896         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
9897         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
9898                 if(!isWasmInitialized) {
9899                         throw new Error("initializeWasm() must be awaited first!");
9900                 }
9901                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
9902                 return decodeArray(nativeResponseValue);
9903         }
9904         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
9905         export function QueryChannelRange_read(ser: Uint8Array): number {
9906                 if(!isWasmInitialized) {
9907                         throw new Error("initializeWasm() must be awaited first!");
9908                 }
9909                 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
9910                 return nativeResponseValue;
9911         }
9912         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
9913         export function QueryChannelRange_write(obj: number): Uint8Array {
9914                 if(!isWasmInitialized) {
9915                         throw new Error("initializeWasm() must be awaited first!");
9916                 }
9917                 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
9918                 return decodeArray(nativeResponseValue);
9919         }
9920         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
9921         export function ReplyChannelRange_read(ser: Uint8Array): number {
9922                 if(!isWasmInitialized) {
9923                         throw new Error("initializeWasm() must be awaited first!");
9924                 }
9925                 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
9926                 return nativeResponseValue;
9927         }
9928         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
9929         export function ReplyChannelRange_write(obj: number): Uint8Array {
9930                 if(!isWasmInitialized) {
9931                         throw new Error("initializeWasm() must be awaited first!");
9932                 }
9933                 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
9934                 return decodeArray(nativeResponseValue);
9935         }
9936         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
9937         export function GossipTimestampFilter_read(ser: Uint8Array): number {
9938                 if(!isWasmInitialized) {
9939                         throw new Error("initializeWasm() must be awaited first!");
9940                 }
9941                 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
9942                 return nativeResponseValue;
9943         }
9944         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
9945         export function GossipTimestampFilter_write(obj: number): Uint8Array {
9946                 if(!isWasmInitialized) {
9947                         throw new Error("initializeWasm() must be awaited first!");
9948                 }
9949                 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
9950                 return decodeArray(nativeResponseValue);
9951         }
9952         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
9953         export function IgnoringMessageHandler_free(this_obj: number): void {
9954                 if(!isWasmInitialized) {
9955                         throw new Error("initializeWasm() must be awaited first!");
9956                 }
9957                 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
9958                 // debug statements here
9959         }
9960         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
9961         export function IgnoringMessageHandler_new(): number {
9962                 if(!isWasmInitialized) {
9963                         throw new Error("initializeWasm() must be awaited first!");
9964                 }
9965                 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
9966                 return nativeResponseValue;
9967         }
9968         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
9969         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
9970                 if(!isWasmInitialized) {
9971                         throw new Error("initializeWasm() must be awaited first!");
9972                 }
9973                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
9974                 return nativeResponseValue;
9975         }
9976         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
9977         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
9978                 if(!isWasmInitialized) {
9979                         throw new Error("initializeWasm() must be awaited first!");
9980                 }
9981                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
9982                 return nativeResponseValue;
9983         }
9984         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
9985         export function ErroringMessageHandler_free(this_obj: number): void {
9986                 if(!isWasmInitialized) {
9987                         throw new Error("initializeWasm() must be awaited first!");
9988                 }
9989                 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
9990                 // debug statements here
9991         }
9992         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
9993         export function ErroringMessageHandler_new(): number {
9994                 if(!isWasmInitialized) {
9995                         throw new Error("initializeWasm() must be awaited first!");
9996                 }
9997                 const nativeResponseValue = wasm.ErroringMessageHandler_new();
9998                 return nativeResponseValue;
9999         }
10000         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
10001         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
10002                 if(!isWasmInitialized) {
10003                         throw new Error("initializeWasm() must be awaited first!");
10004                 }
10005                 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
10006                 return nativeResponseValue;
10007         }
10008         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
10009         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
10010                 if(!isWasmInitialized) {
10011                         throw new Error("initializeWasm() must be awaited first!");
10012                 }
10013                 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
10014                 return nativeResponseValue;
10015         }
10016         // void MessageHandler_free(struct LDKMessageHandler this_obj);
10017         export function MessageHandler_free(this_obj: number): void {
10018                 if(!isWasmInitialized) {
10019                         throw new Error("initializeWasm() must be awaited first!");
10020                 }
10021                 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
10022                 // debug statements here
10023         }
10024         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
10025         export function MessageHandler_get_chan_handler(this_ptr: number): number {
10026                 if(!isWasmInitialized) {
10027                         throw new Error("initializeWasm() must be awaited first!");
10028                 }
10029                 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
10030                 return nativeResponseValue;
10031         }
10032         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
10033         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
10034                 if(!isWasmInitialized) {
10035                         throw new Error("initializeWasm() must be awaited first!");
10036                 }
10037                 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
10038                 // debug statements here
10039         }
10040         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
10041         export function MessageHandler_get_route_handler(this_ptr: number): number {
10042                 if(!isWasmInitialized) {
10043                         throw new Error("initializeWasm() must be awaited first!");
10044                 }
10045                 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
10046                 return nativeResponseValue;
10047         }
10048         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
10049         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
10050                 if(!isWasmInitialized) {
10051                         throw new Error("initializeWasm() must be awaited first!");
10052                 }
10053                 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
10054                 // debug statements here
10055         }
10056         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
10057         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
10058                 if(!isWasmInitialized) {
10059                         throw new Error("initializeWasm() must be awaited first!");
10060                 }
10061                 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
10062                 return nativeResponseValue;
10063         }
10064         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
10065         export function SocketDescriptor_clone(orig: number): number {
10066                 if(!isWasmInitialized) {
10067                         throw new Error("initializeWasm() must be awaited first!");
10068                 }
10069                 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
10070                 return nativeResponseValue;
10071         }
10072         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
10073         export function SocketDescriptor_free(this_ptr: number): void {
10074                 if(!isWasmInitialized) {
10075                         throw new Error("initializeWasm() must be awaited first!");
10076                 }
10077                 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
10078                 // debug statements here
10079         }
10080         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
10081         export function PeerHandleError_free(this_obj: number): void {
10082                 if(!isWasmInitialized) {
10083                         throw new Error("initializeWasm() must be awaited first!");
10084                 }
10085                 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
10086                 // debug statements here
10087         }
10088         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
10089         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
10090                 if(!isWasmInitialized) {
10091                         throw new Error("initializeWasm() must be awaited first!");
10092                 }
10093                 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
10094                 return nativeResponseValue;
10095         }
10096         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
10097         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
10098                 if(!isWasmInitialized) {
10099                         throw new Error("initializeWasm() must be awaited first!");
10100                 }
10101                 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
10102                 // debug statements here
10103         }
10104         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
10105         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
10106                 if(!isWasmInitialized) {
10107                         throw new Error("initializeWasm() must be awaited first!");
10108                 }
10109                 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
10110                 return nativeResponseValue;
10111         }
10112         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
10113         export function PeerHandleError_clone(orig: number): number {
10114                 if(!isWasmInitialized) {
10115                         throw new Error("initializeWasm() must be awaited first!");
10116                 }
10117                 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
10118                 return nativeResponseValue;
10119         }
10120         // void PeerManager_free(struct LDKPeerManager this_obj);
10121         export function PeerManager_free(this_obj: number): void {
10122                 if(!isWasmInitialized) {
10123                         throw new Error("initializeWasm() must be awaited first!");
10124                 }
10125                 const nativeResponseValue = wasm.PeerManager_free(this_obj);
10126                 // debug statements here
10127         }
10128         // 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);
10129         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
10130                 if(!isWasmInitialized) {
10131                         throw new Error("initializeWasm() must be awaited first!");
10132                 }
10133                 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
10134                 return nativeResponseValue;
10135         }
10136         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
10137         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
10138                 if(!isWasmInitialized) {
10139                         throw new Error("initializeWasm() must be awaited first!");
10140                 }
10141                 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
10142                 return nativeResponseValue;
10143         }
10144         // 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);
10145         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
10146                 if(!isWasmInitialized) {
10147                         throw new Error("initializeWasm() must be awaited first!");
10148                 }
10149                 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
10150                 return nativeResponseValue;
10151         }
10152         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
10153         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
10154                 if(!isWasmInitialized) {
10155                         throw new Error("initializeWasm() must be awaited first!");
10156                 }
10157                 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
10158                 return nativeResponseValue;
10159         }
10160         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10161         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
10162                 if(!isWasmInitialized) {
10163                         throw new Error("initializeWasm() must be awaited first!");
10164                 }
10165                 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
10166                 return nativeResponseValue;
10167         }
10168         // 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);
10169         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
10170                 if(!isWasmInitialized) {
10171                         throw new Error("initializeWasm() must be awaited first!");
10172                 }
10173                 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
10174                 return nativeResponseValue;
10175         }
10176         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
10177         export function PeerManager_process_events(this_arg: number): void {
10178                 if(!isWasmInitialized) {
10179                         throw new Error("initializeWasm() must be awaited first!");
10180                 }
10181                 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
10182                 // debug statements here
10183         }
10184         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10185         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
10186                 if(!isWasmInitialized) {
10187                         throw new Error("initializeWasm() must be awaited first!");
10188                 }
10189                 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
10190                 // debug statements here
10191         }
10192         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
10193         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
10194                 if(!isWasmInitialized) {
10195                         throw new Error("initializeWasm() must be awaited first!");
10196                 }
10197                 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
10198                 // debug statements here
10199         }
10200         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
10201         export function PeerManager_timer_tick_occurred(this_arg: number): void {
10202                 if(!isWasmInitialized) {
10203                         throw new Error("initializeWasm() must be awaited first!");
10204                 }
10205                 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
10206                 // debug statements here
10207         }
10208         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
10209         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
10210                 if(!isWasmInitialized) {
10211                         throw new Error("initializeWasm() must be awaited first!");
10212                 }
10213                 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
10214                 return decodeArray(nativeResponseValue);
10215         }
10216         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
10217         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
10218                 if(!isWasmInitialized) {
10219                         throw new Error("initializeWasm() must be awaited first!");
10220                 }
10221                 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
10222                 return nativeResponseValue;
10223         }
10224         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
10225         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
10226                 if(!isWasmInitialized) {
10227                         throw new Error("initializeWasm() must be awaited first!");
10228                 }
10229                 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
10230                 return nativeResponseValue;
10231         }
10232         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
10233         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
10234                 if(!isWasmInitialized) {
10235                         throw new Error("initializeWasm() must be awaited first!");
10236                 }
10237                 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
10238                 return nativeResponseValue;
10239         }
10240         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
10241         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
10242                 if(!isWasmInitialized) {
10243                         throw new Error("initializeWasm() must be awaited first!");
10244                 }
10245                 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
10246                 return nativeResponseValue;
10247         }
10248         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
10249         export function TxCreationKeys_free(this_obj: number): void {
10250                 if(!isWasmInitialized) {
10251                         throw new Error("initializeWasm() must be awaited first!");
10252                 }
10253                 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
10254                 // debug statements here
10255         }
10256         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10257         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
10258                 if(!isWasmInitialized) {
10259                         throw new Error("initializeWasm() must be awaited first!");
10260                 }
10261                 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
10262                 return decodeArray(nativeResponseValue);
10263         }
10264         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10265         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10266                 if(!isWasmInitialized) {
10267                         throw new Error("initializeWasm() must be awaited first!");
10268                 }
10269                 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
10270                 // debug statements here
10271         }
10272         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10273         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
10274                 if(!isWasmInitialized) {
10275                         throw new Error("initializeWasm() must be awaited first!");
10276                 }
10277                 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
10278                 return decodeArray(nativeResponseValue);
10279         }
10280         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10281         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
10282                 if(!isWasmInitialized) {
10283                         throw new Error("initializeWasm() must be awaited first!");
10284                 }
10285                 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
10286                 // debug statements here
10287         }
10288         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10289         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
10290                 if(!isWasmInitialized) {
10291                         throw new Error("initializeWasm() must be awaited first!");
10292                 }
10293                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
10294                 return decodeArray(nativeResponseValue);
10295         }
10296         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10297         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
10298                 if(!isWasmInitialized) {
10299                         throw new Error("initializeWasm() must be awaited first!");
10300                 }
10301                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
10302                 // debug statements here
10303         }
10304         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10305         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
10306                 if(!isWasmInitialized) {
10307                         throw new Error("initializeWasm() must be awaited first!");
10308                 }
10309                 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
10310                 return decodeArray(nativeResponseValue);
10311         }
10312         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10313         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
10314                 if(!isWasmInitialized) {
10315                         throw new Error("initializeWasm() must be awaited first!");
10316                 }
10317                 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
10318                 // debug statements here
10319         }
10320         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10321         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
10322                 if(!isWasmInitialized) {
10323                         throw new Error("initializeWasm() must be awaited first!");
10324                 }
10325                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
10326                 return decodeArray(nativeResponseValue);
10327         }
10328         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10329         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
10330                 if(!isWasmInitialized) {
10331                         throw new Error("initializeWasm() must be awaited first!");
10332                 }
10333                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
10334                 // debug statements here
10335         }
10336         // 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);
10337         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 {
10338                 if(!isWasmInitialized) {
10339                         throw new Error("initializeWasm() must be awaited first!");
10340                 }
10341                 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));
10342                 return nativeResponseValue;
10343         }
10344         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
10345         export function TxCreationKeys_clone(orig: number): number {
10346                 if(!isWasmInitialized) {
10347                         throw new Error("initializeWasm() must be awaited first!");
10348                 }
10349                 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
10350                 return nativeResponseValue;
10351         }
10352         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
10353         export function TxCreationKeys_write(obj: number): Uint8Array {
10354                 if(!isWasmInitialized) {
10355                         throw new Error("initializeWasm() must be awaited first!");
10356                 }
10357                 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
10358                 return decodeArray(nativeResponseValue);
10359         }
10360         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
10361         export function TxCreationKeys_read(ser: Uint8Array): number {
10362                 if(!isWasmInitialized) {
10363                         throw new Error("initializeWasm() must be awaited first!");
10364                 }
10365                 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
10366                 return nativeResponseValue;
10367         }
10368         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
10369         export function ChannelPublicKeys_free(this_obj: number): void {
10370                 if(!isWasmInitialized) {
10371                         throw new Error("initializeWasm() must be awaited first!");
10372                 }
10373                 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
10374                 // debug statements here
10375         }
10376         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10377         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
10378                 if(!isWasmInitialized) {
10379                         throw new Error("initializeWasm() must be awaited first!");
10380                 }
10381                 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
10382                 return decodeArray(nativeResponseValue);
10383         }
10384         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10385         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10386                 if(!isWasmInitialized) {
10387                         throw new Error("initializeWasm() must be awaited first!");
10388                 }
10389                 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
10390                 // debug statements here
10391         }
10392         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10393         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
10394                 if(!isWasmInitialized) {
10395                         throw new Error("initializeWasm() must be awaited first!");
10396                 }
10397                 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
10398                 return decodeArray(nativeResponseValue);
10399         }
10400         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10401         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10402                 if(!isWasmInitialized) {
10403                         throw new Error("initializeWasm() must be awaited first!");
10404                 }
10405                 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
10406                 // debug statements here
10407         }
10408         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10409         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
10410                 if(!isWasmInitialized) {
10411                         throw new Error("initializeWasm() must be awaited first!");
10412                 }
10413                 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
10414                 return decodeArray(nativeResponseValue);
10415         }
10416         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10417         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
10418                 if(!isWasmInitialized) {
10419                         throw new Error("initializeWasm() must be awaited first!");
10420                 }
10421                 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
10422                 // debug statements here
10423         }
10424         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10425         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10426                 if(!isWasmInitialized) {
10427                         throw new Error("initializeWasm() must be awaited first!");
10428                 }
10429                 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
10430                 return decodeArray(nativeResponseValue);
10431         }
10432         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10433         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10434                 if(!isWasmInitialized) {
10435                         throw new Error("initializeWasm() must be awaited first!");
10436                 }
10437                 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10438                 // debug statements here
10439         }
10440         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10441         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
10442                 if(!isWasmInitialized) {
10443                         throw new Error("initializeWasm() must be awaited first!");
10444                 }
10445                 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
10446                 return decodeArray(nativeResponseValue);
10447         }
10448         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10449         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10450                 if(!isWasmInitialized) {
10451                         throw new Error("initializeWasm() must be awaited first!");
10452                 }
10453                 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
10454                 // debug statements here
10455         }
10456         // 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);
10457         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 {
10458                 if(!isWasmInitialized) {
10459                         throw new Error("initializeWasm() must be awaited first!");
10460                 }
10461                 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));
10462                 return nativeResponseValue;
10463         }
10464         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
10465         export function ChannelPublicKeys_clone(orig: number): number {
10466                 if(!isWasmInitialized) {
10467                         throw new Error("initializeWasm() must be awaited first!");
10468                 }
10469                 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
10470                 return nativeResponseValue;
10471         }
10472         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
10473         export function ChannelPublicKeys_write(obj: number): Uint8Array {
10474                 if(!isWasmInitialized) {
10475                         throw new Error("initializeWasm() must be awaited first!");
10476                 }
10477                 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
10478                 return decodeArray(nativeResponseValue);
10479         }
10480         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
10481         export function ChannelPublicKeys_read(ser: Uint8Array): number {
10482                 if(!isWasmInitialized) {
10483                         throw new Error("initializeWasm() must be awaited first!");
10484                 }
10485                 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
10486                 return nativeResponseValue;
10487         }
10488         // 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);
10489         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 {
10490                 if(!isWasmInitialized) {
10491                         throw new Error("initializeWasm() must be awaited first!");
10492                 }
10493                 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));
10494                 return nativeResponseValue;
10495         }
10496         // 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);
10497         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
10498                 if(!isWasmInitialized) {
10499                         throw new Error("initializeWasm() must be awaited first!");
10500                 }
10501                 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
10502                 return nativeResponseValue;
10503         }
10504         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
10505         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
10506                 if(!isWasmInitialized) {
10507                         throw new Error("initializeWasm() must be awaited first!");
10508                 }
10509                 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
10510                 return decodeArray(nativeResponseValue);
10511         }
10512         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
10513         export function HTLCOutputInCommitment_free(this_obj: number): void {
10514                 if(!isWasmInitialized) {
10515                         throw new Error("initializeWasm() must be awaited first!");
10516                 }
10517                 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
10518                 // debug statements here
10519         }
10520         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10521         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
10522                 if(!isWasmInitialized) {
10523                         throw new Error("initializeWasm() must be awaited first!");
10524                 }
10525                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
10526                 return nativeResponseValue;
10527         }
10528         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
10529         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
10530                 if(!isWasmInitialized) {
10531                         throw new Error("initializeWasm() must be awaited first!");
10532                 }
10533                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
10534                 // debug statements here
10535         }
10536         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10537         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
10538                 if(!isWasmInitialized) {
10539                         throw new Error("initializeWasm() must be awaited first!");
10540                 }
10541                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
10542                 return nativeResponseValue;
10543         }
10544         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
10545         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
10546                 if(!isWasmInitialized) {
10547                         throw new Error("initializeWasm() must be awaited first!");
10548                 }
10549                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
10550                 // debug statements here
10551         }
10552         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10553         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
10554                 if(!isWasmInitialized) {
10555                         throw new Error("initializeWasm() must be awaited first!");
10556                 }
10557                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
10558                 return nativeResponseValue;
10559         }
10560         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
10561         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
10562                 if(!isWasmInitialized) {
10563                         throw new Error("initializeWasm() must be awaited first!");
10564                 }
10565                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
10566                 // debug statements here
10567         }
10568         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
10569         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
10570                 if(!isWasmInitialized) {
10571                         throw new Error("initializeWasm() must be awaited first!");
10572                 }
10573                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
10574                 return decodeArray(nativeResponseValue);
10575         }
10576         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10577         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
10578                 if(!isWasmInitialized) {
10579                         throw new Error("initializeWasm() must be awaited first!");
10580                 }
10581                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
10582                 // debug statements here
10583         }
10584         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
10585         export function HTLCOutputInCommitment_clone(orig: number): number {
10586                 if(!isWasmInitialized) {
10587                         throw new Error("initializeWasm() must be awaited first!");
10588                 }
10589                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
10590                 return nativeResponseValue;
10591         }
10592         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
10593         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
10594                 if(!isWasmInitialized) {
10595                         throw new Error("initializeWasm() must be awaited first!");
10596                 }
10597                 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
10598                 return decodeArray(nativeResponseValue);
10599         }
10600         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
10601         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
10602                 if(!isWasmInitialized) {
10603                         throw new Error("initializeWasm() must be awaited first!");
10604                 }
10605                 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
10606                 return nativeResponseValue;
10607         }
10608         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
10609         export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
10610                 if(!isWasmInitialized) {
10611                         throw new Error("initializeWasm() must be awaited first!");
10612                 }
10613                 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
10614                 return decodeArray(nativeResponseValue);
10615         }
10616         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
10617         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
10618                 if(!isWasmInitialized) {
10619                         throw new Error("initializeWasm() must be awaited first!");
10620                 }
10621                 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
10622                 return decodeArray(nativeResponseValue);
10623         }
10624         // 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);
10625         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 {
10626                 if(!isWasmInitialized) {
10627                         throw new Error("initializeWasm() must be awaited first!");
10628                 }
10629                 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(prev_hash), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
10630                 return decodeArray(nativeResponseValue);
10631         }
10632         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
10633         export function ChannelTransactionParameters_free(this_obj: number): void {
10634                 if(!isWasmInitialized) {
10635                         throw new Error("initializeWasm() must be awaited first!");
10636                 }
10637                 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
10638                 // debug statements here
10639         }
10640         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10641         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
10642                 if(!isWasmInitialized) {
10643                         throw new Error("initializeWasm() must be awaited first!");
10644                 }
10645                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
10646                 return nativeResponseValue;
10647         }
10648         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
10649         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
10650                 if(!isWasmInitialized) {
10651                         throw new Error("initializeWasm() must be awaited first!");
10652                 }
10653                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
10654                 // debug statements here
10655         }
10656         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10657         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
10658                 if(!isWasmInitialized) {
10659                         throw new Error("initializeWasm() must be awaited first!");
10660                 }
10661                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
10662                 return nativeResponseValue;
10663         }
10664         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
10665         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
10666                 if(!isWasmInitialized) {
10667                         throw new Error("initializeWasm() must be awaited first!");
10668                 }
10669                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
10670                 // debug statements here
10671         }
10672         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10673         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
10674                 if(!isWasmInitialized) {
10675                         throw new Error("initializeWasm() must be awaited first!");
10676                 }
10677                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
10678                 return nativeResponseValue;
10679         }
10680         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
10681         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
10682                 if(!isWasmInitialized) {
10683                         throw new Error("initializeWasm() must be awaited first!");
10684                 }
10685                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
10686                 // debug statements here
10687         }
10688         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10689         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
10690                 if(!isWasmInitialized) {
10691                         throw new Error("initializeWasm() must be awaited first!");
10692                 }
10693                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
10694                 return nativeResponseValue;
10695         }
10696         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
10697         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
10698                 if(!isWasmInitialized) {
10699                         throw new Error("initializeWasm() must be awaited first!");
10700                 }
10701                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
10702                 // debug statements here
10703         }
10704         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10705         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
10706                 if(!isWasmInitialized) {
10707                         throw new Error("initializeWasm() must be awaited first!");
10708                 }
10709                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
10710                 return nativeResponseValue;
10711         }
10712         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
10713         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
10714                 if(!isWasmInitialized) {
10715                         throw new Error("initializeWasm() must be awaited first!");
10716                 }
10717                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
10718                 // debug statements here
10719         }
10720         // 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);
10721         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 {
10722                 if(!isWasmInitialized) {
10723                         throw new Error("initializeWasm() must be awaited first!");
10724                 }
10725                 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
10726                 return nativeResponseValue;
10727         }
10728         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
10729         export function ChannelTransactionParameters_clone(orig: number): number {
10730                 if(!isWasmInitialized) {
10731                         throw new Error("initializeWasm() must be awaited first!");
10732                 }
10733                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
10734                 return nativeResponseValue;
10735         }
10736         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
10737         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
10738                 if(!isWasmInitialized) {
10739                         throw new Error("initializeWasm() must be awaited first!");
10740                 }
10741                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
10742                 // debug statements here
10743         }
10744         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
10745         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
10746                 if(!isWasmInitialized) {
10747                         throw new Error("initializeWasm() must be awaited first!");
10748                 }
10749                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
10750                 return nativeResponseValue;
10751         }
10752         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
10753         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
10754                 if(!isWasmInitialized) {
10755                         throw new Error("initializeWasm() must be awaited first!");
10756                 }
10757                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
10758                 // debug statements here
10759         }
10760         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
10761         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
10762                 if(!isWasmInitialized) {
10763                         throw new Error("initializeWasm() must be awaited first!");
10764                 }
10765                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
10766                 return nativeResponseValue;
10767         }
10768         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
10769         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
10770                 if(!isWasmInitialized) {
10771                         throw new Error("initializeWasm() must be awaited first!");
10772                 }
10773                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
10774                 // debug statements here
10775         }
10776         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
10777         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
10778                 if(!isWasmInitialized) {
10779                         throw new Error("initializeWasm() must be awaited first!");
10780                 }
10781                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
10782                 return nativeResponseValue;
10783         }
10784         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
10785         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
10786                 if(!isWasmInitialized) {
10787                         throw new Error("initializeWasm() must be awaited first!");
10788                 }
10789                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
10790                 return nativeResponseValue;
10791         }
10792         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10793         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
10794                 if(!isWasmInitialized) {
10795                         throw new Error("initializeWasm() must be awaited first!");
10796                 }
10797                 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
10798                 return nativeResponseValue;
10799         }
10800         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10801         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
10802                 if(!isWasmInitialized) {
10803                         throw new Error("initializeWasm() must be awaited first!");
10804                 }
10805                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
10806                 return nativeResponseValue;
10807         }
10808         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10809         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
10810                 if(!isWasmInitialized) {
10811                         throw new Error("initializeWasm() must be awaited first!");
10812                 }
10813                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
10814                 return nativeResponseValue;
10815         }
10816         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
10817         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
10818                 if(!isWasmInitialized) {
10819                         throw new Error("initializeWasm() must be awaited first!");
10820                 }
10821                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
10822                 return decodeArray(nativeResponseValue);
10823         }
10824         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
10825         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
10826                 if(!isWasmInitialized) {
10827                         throw new Error("initializeWasm() must be awaited first!");
10828                 }
10829                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
10830                 return nativeResponseValue;
10831         }
10832         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
10833         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
10834                 if(!isWasmInitialized) {
10835                         throw new Error("initializeWasm() must be awaited first!");
10836                 }
10837                 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
10838                 return decodeArray(nativeResponseValue);
10839         }
10840         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
10841         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
10842                 if(!isWasmInitialized) {
10843                         throw new Error("initializeWasm() must be awaited first!");
10844                 }
10845                 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
10846                 return nativeResponseValue;
10847         }
10848         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
10849         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
10850                 if(!isWasmInitialized) {
10851                         throw new Error("initializeWasm() must be awaited first!");
10852                 }
10853                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
10854                 // debug statements here
10855         }
10856         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10857         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
10858                 if(!isWasmInitialized) {
10859                         throw new Error("initializeWasm() must be awaited first!");
10860                 }
10861                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
10862                 return nativeResponseValue;
10863         }
10864         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10865         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
10866                 if(!isWasmInitialized) {
10867                         throw new Error("initializeWasm() must be awaited first!");
10868                 }
10869                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
10870                 return nativeResponseValue;
10871         }
10872         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10873         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
10874                 if(!isWasmInitialized) {
10875                         throw new Error("initializeWasm() must be awaited first!");
10876                 }
10877                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
10878                 return nativeResponseValue;
10879         }
10880         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10881         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
10882                 if(!isWasmInitialized) {
10883                         throw new Error("initializeWasm() must be awaited first!");
10884                 }
10885                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
10886                 return nativeResponseValue;
10887         }
10888         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10889         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
10890                 if(!isWasmInitialized) {
10891                         throw new Error("initializeWasm() must be awaited first!");
10892                 }
10893                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
10894                 return nativeResponseValue;
10895         }
10896         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
10897         export function HolderCommitmentTransaction_free(this_obj: number): void {
10898                 if(!isWasmInitialized) {
10899                         throw new Error("initializeWasm() must be awaited first!");
10900                 }
10901                 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
10902                 // debug statements here
10903         }
10904         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
10905         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
10906                 if(!isWasmInitialized) {
10907                         throw new Error("initializeWasm() must be awaited first!");
10908                 }
10909                 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
10910                 return decodeArray(nativeResponseValue);
10911         }
10912         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
10913         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
10914                 if(!isWasmInitialized) {
10915                         throw new Error("initializeWasm() must be awaited first!");
10916                 }
10917                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
10918                 // debug statements here
10919         }
10920         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
10921         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
10922                 if(!isWasmInitialized) {
10923                         throw new Error("initializeWasm() must be awaited first!");
10924                 }
10925                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
10926                 // debug statements here
10927         }
10928         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
10929         export function HolderCommitmentTransaction_clone(orig: number): number {
10930                 if(!isWasmInitialized) {
10931                         throw new Error("initializeWasm() must be awaited first!");
10932                 }
10933                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
10934                 return nativeResponseValue;
10935         }
10936         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
10937         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
10938                 if(!isWasmInitialized) {
10939                         throw new Error("initializeWasm() must be awaited first!");
10940                 }
10941                 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
10942                 return decodeArray(nativeResponseValue);
10943         }
10944         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
10945         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
10946                 if(!isWasmInitialized) {
10947                         throw new Error("initializeWasm() must be awaited first!");
10948                 }
10949                 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
10950                 return nativeResponseValue;
10951         }
10952         // 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);
10953         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
10954                 if(!isWasmInitialized) {
10955                         throw new Error("initializeWasm() must be awaited first!");
10956                 }
10957                 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
10958                 return nativeResponseValue;
10959         }
10960         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
10961         export function BuiltCommitmentTransaction_free(this_obj: number): void {
10962                 if(!isWasmInitialized) {
10963                         throw new Error("initializeWasm() must be awaited first!");
10964                 }
10965                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
10966                 // debug statements here
10967         }
10968         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
10969         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
10970                 if(!isWasmInitialized) {
10971                         throw new Error("initializeWasm() must be awaited first!");
10972                 }
10973                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
10974                 return decodeArray(nativeResponseValue);
10975         }
10976         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
10977         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
10978                 if(!isWasmInitialized) {
10979                         throw new Error("initializeWasm() must be awaited first!");
10980                 }
10981                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
10982                 // debug statements here
10983         }
10984         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
10985         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
10986                 if(!isWasmInitialized) {
10987                         throw new Error("initializeWasm() must be awaited first!");
10988                 }
10989                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
10990                 return decodeArray(nativeResponseValue);
10991         }
10992         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10993         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
10994                 if(!isWasmInitialized) {
10995                         throw new Error("initializeWasm() must be awaited first!");
10996                 }
10997                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
10998                 // debug statements here
10999         }
11000         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
11001         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
11002                 if(!isWasmInitialized) {
11003                         throw new Error("initializeWasm() must be awaited first!");
11004                 }
11005                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
11006                 return nativeResponseValue;
11007         }
11008         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
11009         export function BuiltCommitmentTransaction_clone(orig: number): number {
11010                 if(!isWasmInitialized) {
11011                         throw new Error("initializeWasm() must be awaited first!");
11012                 }
11013                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
11014                 return nativeResponseValue;
11015         }
11016         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
11017         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
11018                 if(!isWasmInitialized) {
11019                         throw new Error("initializeWasm() must be awaited first!");
11020                 }
11021                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
11022                 return decodeArray(nativeResponseValue);
11023         }
11024         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
11025         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
11026                 if(!isWasmInitialized) {
11027                         throw new Error("initializeWasm() must be awaited first!");
11028                 }
11029                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
11030                 return nativeResponseValue;
11031         }
11032         // 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);
11033         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11034                 if(!isWasmInitialized) {
11035                         throw new Error("initializeWasm() must be awaited first!");
11036                 }
11037                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
11038                 return decodeArray(nativeResponseValue);
11039         }
11040         // 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);
11041         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11042                 if(!isWasmInitialized) {
11043                         throw new Error("initializeWasm() must be awaited first!");
11044                 }
11045                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
11046                 return decodeArray(nativeResponseValue);
11047         }
11048         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
11049         export function CommitmentTransaction_free(this_obj: number): void {
11050                 if(!isWasmInitialized) {
11051                         throw new Error("initializeWasm() must be awaited first!");
11052                 }
11053                 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
11054                 // debug statements here
11055         }
11056         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
11057         export function CommitmentTransaction_clone(orig: number): number {
11058                 if(!isWasmInitialized) {
11059                         throw new Error("initializeWasm() must be awaited first!");
11060                 }
11061                 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
11062                 return nativeResponseValue;
11063         }
11064         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
11065         export function CommitmentTransaction_write(obj: number): Uint8Array {
11066                 if(!isWasmInitialized) {
11067                         throw new Error("initializeWasm() must be awaited first!");
11068                 }
11069                 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
11070                 return decodeArray(nativeResponseValue);
11071         }
11072         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
11073         export function CommitmentTransaction_read(ser: Uint8Array): number {
11074                 if(!isWasmInitialized) {
11075                         throw new Error("initializeWasm() must be awaited first!");
11076                 }
11077                 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
11078                 return nativeResponseValue;
11079         }
11080         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11081         export function CommitmentTransaction_commitment_number(this_arg: number): number {
11082                 if(!isWasmInitialized) {
11083                         throw new Error("initializeWasm() must be awaited first!");
11084                 }
11085                 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
11086                 return nativeResponseValue;
11087         }
11088         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11089         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
11090                 if(!isWasmInitialized) {
11091                         throw new Error("initializeWasm() must be awaited first!");
11092                 }
11093                 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
11094                 return nativeResponseValue;
11095         }
11096         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11097         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
11098                 if(!isWasmInitialized) {
11099                         throw new Error("initializeWasm() must be awaited first!");
11100                 }
11101                 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
11102                 return nativeResponseValue;
11103         }
11104         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11105         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
11106                 if(!isWasmInitialized) {
11107                         throw new Error("initializeWasm() must be awaited first!");
11108                 }
11109                 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
11110                 return nativeResponseValue;
11111         }
11112         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11113         export function CommitmentTransaction_trust(this_arg: number): number {
11114                 if(!isWasmInitialized) {
11115                         throw new Error("initializeWasm() must be awaited first!");
11116                 }
11117                 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
11118                 return nativeResponseValue;
11119         }
11120         // 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);
11121         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
11122                 if(!isWasmInitialized) {
11123                         throw new Error("initializeWasm() must be awaited first!");
11124                 }
11125                 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
11126                 return nativeResponseValue;
11127         }
11128         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
11129         export function TrustedCommitmentTransaction_free(this_obj: number): void {
11130                 if(!isWasmInitialized) {
11131                         throw new Error("initializeWasm() must be awaited first!");
11132                 }
11133                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
11134                 // debug statements here
11135         }
11136         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11137         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
11138                 if(!isWasmInitialized) {
11139                         throw new Error("initializeWasm() must be awaited first!");
11140                 }
11141                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
11142                 return decodeArray(nativeResponseValue);
11143         }
11144         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11145         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
11146                 if(!isWasmInitialized) {
11147                         throw new Error("initializeWasm() must be awaited first!");
11148                 }
11149                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
11150                 return nativeResponseValue;
11151         }
11152         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11153         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
11154                 if(!isWasmInitialized) {
11155                         throw new Error("initializeWasm() must be awaited first!");
11156                 }
11157                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
11158                 return nativeResponseValue;
11159         }
11160         // 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);
11161         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
11162                 if(!isWasmInitialized) {
11163                         throw new Error("initializeWasm() must be awaited first!");
11164                 }
11165                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
11166                 return nativeResponseValue;
11167         }
11168         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
11169         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
11170                 if(!isWasmInitialized) {
11171                         throw new Error("initializeWasm() must be awaited first!");
11172                 }
11173                 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
11174                 return nativeResponseValue;
11175         }
11176         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
11177         export function InitFeatures_clone(orig: number): number {
11178                 if(!isWasmInitialized) {
11179                         throw new Error("initializeWasm() must be awaited first!");
11180                 }
11181                 const nativeResponseValue = wasm.InitFeatures_clone(orig);
11182                 return nativeResponseValue;
11183         }
11184         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
11185         export function NodeFeatures_clone(orig: number): number {
11186                 if(!isWasmInitialized) {
11187                         throw new Error("initializeWasm() must be awaited first!");
11188                 }
11189                 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
11190                 return nativeResponseValue;
11191         }
11192         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
11193         export function ChannelFeatures_clone(orig: number): number {
11194                 if(!isWasmInitialized) {
11195                         throw new Error("initializeWasm() must be awaited first!");
11196                 }
11197                 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
11198                 return nativeResponseValue;
11199         }
11200         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
11201         export function InvoiceFeatures_clone(orig: number): number {
11202                 if(!isWasmInitialized) {
11203                         throw new Error("initializeWasm() must be awaited first!");
11204                 }
11205                 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
11206                 return nativeResponseValue;
11207         }
11208         // void InitFeatures_free(struct LDKInitFeatures this_obj);
11209         export function InitFeatures_free(this_obj: number): void {
11210                 if(!isWasmInitialized) {
11211                         throw new Error("initializeWasm() must be awaited first!");
11212                 }
11213                 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
11214                 // debug statements here
11215         }
11216         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
11217         export function NodeFeatures_free(this_obj: number): void {
11218                 if(!isWasmInitialized) {
11219                         throw new Error("initializeWasm() must be awaited first!");
11220                 }
11221                 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
11222                 // debug statements here
11223         }
11224         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
11225         export function ChannelFeatures_free(this_obj: number): void {
11226                 if(!isWasmInitialized) {
11227                         throw new Error("initializeWasm() must be awaited first!");
11228                 }
11229                 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
11230                 // debug statements here
11231         }
11232         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
11233         export function InvoiceFeatures_free(this_obj: number): void {
11234                 if(!isWasmInitialized) {
11235                         throw new Error("initializeWasm() must be awaited first!");
11236                 }
11237                 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
11238                 // debug statements here
11239         }
11240         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
11241         export function InitFeatures_empty(): number {
11242                 if(!isWasmInitialized) {
11243                         throw new Error("initializeWasm() must be awaited first!");
11244                 }
11245                 const nativeResponseValue = wasm.InitFeatures_empty();
11246                 return nativeResponseValue;
11247         }
11248         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
11249         export function InitFeatures_known(): number {
11250                 if(!isWasmInitialized) {
11251                         throw new Error("initializeWasm() must be awaited first!");
11252                 }
11253                 const nativeResponseValue = wasm.InitFeatures_known();
11254                 return nativeResponseValue;
11255         }
11256         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
11257         export function NodeFeatures_empty(): number {
11258                 if(!isWasmInitialized) {
11259                         throw new Error("initializeWasm() must be awaited first!");
11260                 }
11261                 const nativeResponseValue = wasm.NodeFeatures_empty();
11262                 return nativeResponseValue;
11263         }
11264         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
11265         export function NodeFeatures_known(): number {
11266                 if(!isWasmInitialized) {
11267                         throw new Error("initializeWasm() must be awaited first!");
11268                 }
11269                 const nativeResponseValue = wasm.NodeFeatures_known();
11270                 return nativeResponseValue;
11271         }
11272         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
11273         export function ChannelFeatures_empty(): number {
11274                 if(!isWasmInitialized) {
11275                         throw new Error("initializeWasm() must be awaited first!");
11276                 }
11277                 const nativeResponseValue = wasm.ChannelFeatures_empty();
11278                 return nativeResponseValue;
11279         }
11280         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
11281         export function ChannelFeatures_known(): number {
11282                 if(!isWasmInitialized) {
11283                         throw new Error("initializeWasm() must be awaited first!");
11284                 }
11285                 const nativeResponseValue = wasm.ChannelFeatures_known();
11286                 return nativeResponseValue;
11287         }
11288         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
11289         export function InvoiceFeatures_empty(): number {
11290                 if(!isWasmInitialized) {
11291                         throw new Error("initializeWasm() must be awaited first!");
11292                 }
11293                 const nativeResponseValue = wasm.InvoiceFeatures_empty();
11294                 return nativeResponseValue;
11295         }
11296         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
11297         export function InvoiceFeatures_known(): number {
11298                 if(!isWasmInitialized) {
11299                         throw new Error("initializeWasm() must be awaited first!");
11300                 }
11301                 const nativeResponseValue = wasm.InvoiceFeatures_known();
11302                 return nativeResponseValue;
11303         }
11304         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
11305         export function InitFeatures_write(obj: number): Uint8Array {
11306                 if(!isWasmInitialized) {
11307                         throw new Error("initializeWasm() must be awaited first!");
11308                 }
11309                 const nativeResponseValue = wasm.InitFeatures_write(obj);
11310                 return decodeArray(nativeResponseValue);
11311         }
11312         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
11313         export function NodeFeatures_write(obj: number): Uint8Array {
11314                 if(!isWasmInitialized) {
11315                         throw new Error("initializeWasm() must be awaited first!");
11316                 }
11317                 const nativeResponseValue = wasm.NodeFeatures_write(obj);
11318                 return decodeArray(nativeResponseValue);
11319         }
11320         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
11321         export function ChannelFeatures_write(obj: number): Uint8Array {
11322                 if(!isWasmInitialized) {
11323                         throw new Error("initializeWasm() must be awaited first!");
11324                 }
11325                 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
11326                 return decodeArray(nativeResponseValue);
11327         }
11328         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
11329         export function InvoiceFeatures_write(obj: number): Uint8Array {
11330                 if(!isWasmInitialized) {
11331                         throw new Error("initializeWasm() must be awaited first!");
11332                 }
11333                 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
11334                 return decodeArray(nativeResponseValue);
11335         }
11336         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
11337         export function InitFeatures_read(ser: Uint8Array): number {
11338                 if(!isWasmInitialized) {
11339                         throw new Error("initializeWasm() must be awaited first!");
11340                 }
11341                 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
11342                 return nativeResponseValue;
11343         }
11344         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
11345         export function NodeFeatures_read(ser: Uint8Array): number {
11346                 if(!isWasmInitialized) {
11347                         throw new Error("initializeWasm() must be awaited first!");
11348                 }
11349                 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
11350                 return nativeResponseValue;
11351         }
11352         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
11353         export function ChannelFeatures_read(ser: Uint8Array): number {
11354                 if(!isWasmInitialized) {
11355                         throw new Error("initializeWasm() must be awaited first!");
11356                 }
11357                 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
11358                 return nativeResponseValue;
11359         }
11360         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
11361         export function InvoiceFeatures_read(ser: Uint8Array): number {
11362                 if(!isWasmInitialized) {
11363                         throw new Error("initializeWasm() must be awaited first!");
11364                 }
11365                 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
11366                 return nativeResponseValue;
11367         }
11368         // void RouteHop_free(struct LDKRouteHop this_obj);
11369         export function RouteHop_free(this_obj: number): void {
11370                 if(!isWasmInitialized) {
11371                         throw new Error("initializeWasm() must be awaited first!");
11372                 }
11373                 const nativeResponseValue = wasm.RouteHop_free(this_obj);
11374                 // debug statements here
11375         }
11376         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11377         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
11378                 if(!isWasmInitialized) {
11379                         throw new Error("initializeWasm() must be awaited first!");
11380                 }
11381                 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
11382                 return decodeArray(nativeResponseValue);
11383         }
11384         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11385         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
11386                 if(!isWasmInitialized) {
11387                         throw new Error("initializeWasm() must be awaited first!");
11388                 }
11389                 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
11390                 // debug statements here
11391         }
11392         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11393         export function RouteHop_get_node_features(this_ptr: number): number {
11394                 if(!isWasmInitialized) {
11395                         throw new Error("initializeWasm() must be awaited first!");
11396                 }
11397                 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
11398                 return nativeResponseValue;
11399         }
11400         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
11401         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
11402                 if(!isWasmInitialized) {
11403                         throw new Error("initializeWasm() must be awaited first!");
11404                 }
11405                 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
11406                 // debug statements here
11407         }
11408         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11409         export function RouteHop_get_short_channel_id(this_ptr: number): number {
11410                 if(!isWasmInitialized) {
11411                         throw new Error("initializeWasm() must be awaited first!");
11412                 }
11413                 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
11414                 return nativeResponseValue;
11415         }
11416         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11417         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
11418                 if(!isWasmInitialized) {
11419                         throw new Error("initializeWasm() must be awaited first!");
11420                 }
11421                 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
11422                 // debug statements here
11423         }
11424         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11425         export function RouteHop_get_channel_features(this_ptr: number): number {
11426                 if(!isWasmInitialized) {
11427                         throw new Error("initializeWasm() must be awaited first!");
11428                 }
11429                 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
11430                 return nativeResponseValue;
11431         }
11432         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11433         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
11434                 if(!isWasmInitialized) {
11435                         throw new Error("initializeWasm() must be awaited first!");
11436                 }
11437                 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
11438                 // debug statements here
11439         }
11440         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11441         export function RouteHop_get_fee_msat(this_ptr: number): number {
11442                 if(!isWasmInitialized) {
11443                         throw new Error("initializeWasm() must be awaited first!");
11444                 }
11445                 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
11446                 return nativeResponseValue;
11447         }
11448         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11449         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
11450                 if(!isWasmInitialized) {
11451                         throw new Error("initializeWasm() must be awaited first!");
11452                 }
11453                 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
11454                 // debug statements here
11455         }
11456         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11457         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
11458                 if(!isWasmInitialized) {
11459                         throw new Error("initializeWasm() must be awaited first!");
11460                 }
11461                 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
11462                 return nativeResponseValue;
11463         }
11464         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
11465         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11466                 if(!isWasmInitialized) {
11467                         throw new Error("initializeWasm() must be awaited first!");
11468                 }
11469                 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
11470                 // debug statements here
11471         }
11472         // 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);
11473         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 {
11474                 if(!isWasmInitialized) {
11475                         throw new Error("initializeWasm() must be awaited first!");
11476                 }
11477                 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);
11478                 return nativeResponseValue;
11479         }
11480         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
11481         export function RouteHop_clone(orig: number): number {
11482                 if(!isWasmInitialized) {
11483                         throw new Error("initializeWasm() must be awaited first!");
11484                 }
11485                 const nativeResponseValue = wasm.RouteHop_clone(orig);
11486                 return nativeResponseValue;
11487         }
11488         // void Route_free(struct LDKRoute this_obj);
11489         export function Route_free(this_obj: number): void {
11490                 if(!isWasmInitialized) {
11491                         throw new Error("initializeWasm() must be awaited first!");
11492                 }
11493                 const nativeResponseValue = wasm.Route_free(this_obj);
11494                 // debug statements here
11495         }
11496         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
11497         export function Route_set_paths(this_ptr: number, val: number[][]): void {
11498                 if(!isWasmInitialized) {
11499                         throw new Error("initializeWasm() must be awaited first!");
11500                 }
11501                 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
11502                 // debug statements here
11503         }
11504         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
11505         export function Route_new(paths_arg: number[][]): number {
11506                 if(!isWasmInitialized) {
11507                         throw new Error("initializeWasm() must be awaited first!");
11508                 }
11509                 const nativeResponseValue = wasm.Route_new(paths_arg);
11510                 return nativeResponseValue;
11511         }
11512         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
11513         export function Route_clone(orig: number): number {
11514                 if(!isWasmInitialized) {
11515                         throw new Error("initializeWasm() must be awaited first!");
11516                 }
11517                 const nativeResponseValue = wasm.Route_clone(orig);
11518                 return nativeResponseValue;
11519         }
11520         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
11521         export function Route_write(obj: number): Uint8Array {
11522                 if(!isWasmInitialized) {
11523                         throw new Error("initializeWasm() must be awaited first!");
11524                 }
11525                 const nativeResponseValue = wasm.Route_write(obj);
11526                 return decodeArray(nativeResponseValue);
11527         }
11528         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
11529         export function Route_read(ser: Uint8Array): number {
11530                 if(!isWasmInitialized) {
11531                         throw new Error("initializeWasm() must be awaited first!");
11532                 }
11533                 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
11534                 return nativeResponseValue;
11535         }
11536         // void RouteHint_free(struct LDKRouteHint this_obj);
11537         export function RouteHint_free(this_obj: number): void {
11538                 if(!isWasmInitialized) {
11539                         throw new Error("initializeWasm() must be awaited first!");
11540                 }
11541                 const nativeResponseValue = wasm.RouteHint_free(this_obj);
11542                 // debug statements here
11543         }
11544         // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11545         export function RouteHint_get_src_node_id(this_ptr: number): Uint8Array {
11546                 if(!isWasmInitialized) {
11547                         throw new Error("initializeWasm() must be awaited first!");
11548                 }
11549                 const nativeResponseValue = wasm.RouteHint_get_src_node_id(this_ptr);
11550                 return decodeArray(nativeResponseValue);
11551         }
11552         // void RouteHint_set_src_node_id(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11553         export function RouteHint_set_src_node_id(this_ptr: number, val: Uint8Array): void {
11554                 if(!isWasmInitialized) {
11555                         throw new Error("initializeWasm() must be awaited first!");
11556                 }
11557                 const nativeResponseValue = wasm.RouteHint_set_src_node_id(this_ptr, encodeArray(val));
11558                 // debug statements here
11559         }
11560         // uint64_t RouteHint_get_short_channel_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11561         export function RouteHint_get_short_channel_id(this_ptr: number): number {
11562                 if(!isWasmInitialized) {
11563                         throw new Error("initializeWasm() must be awaited first!");
11564                 }
11565                 const nativeResponseValue = wasm.RouteHint_get_short_channel_id(this_ptr);
11566                 return nativeResponseValue;
11567         }
11568         // void RouteHint_set_short_channel_id(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
11569         export function RouteHint_set_short_channel_id(this_ptr: number, val: number): void {
11570                 if(!isWasmInitialized) {
11571                         throw new Error("initializeWasm() must be awaited first!");
11572                 }
11573                 const nativeResponseValue = wasm.RouteHint_set_short_channel_id(this_ptr, val);
11574                 // debug statements here
11575         }
11576         // struct LDKRoutingFees RouteHint_get_fees(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11577         export function RouteHint_get_fees(this_ptr: number): number {
11578                 if(!isWasmInitialized) {
11579                         throw new Error("initializeWasm() must be awaited first!");
11580                 }
11581                 const nativeResponseValue = wasm.RouteHint_get_fees(this_ptr);
11582                 return nativeResponseValue;
11583         }
11584         // void RouteHint_set_fees(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
11585         export function RouteHint_set_fees(this_ptr: number, val: number): void {
11586                 if(!isWasmInitialized) {
11587                         throw new Error("initializeWasm() must be awaited first!");
11588                 }
11589                 const nativeResponseValue = wasm.RouteHint_set_fees(this_ptr, val);
11590                 // debug statements here
11591         }
11592         // uint16_t RouteHint_get_cltv_expiry_delta(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11593         export function RouteHint_get_cltv_expiry_delta(this_ptr: number): number {
11594                 if(!isWasmInitialized) {
11595                         throw new Error("initializeWasm() must be awaited first!");
11596                 }
11597                 const nativeResponseValue = wasm.RouteHint_get_cltv_expiry_delta(this_ptr);
11598                 return nativeResponseValue;
11599         }
11600         // void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
11601         export function RouteHint_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11602                 if(!isWasmInitialized) {
11603                         throw new Error("initializeWasm() must be awaited first!");
11604                 }
11605                 const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
11606                 // debug statements here
11607         }
11608         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
11609         export function RouteHint_clone(orig: number): number {
11610                 if(!isWasmInitialized) {
11611                         throw new Error("initializeWasm() must be awaited first!");
11612                 }
11613                 const nativeResponseValue = wasm.RouteHint_clone(orig);
11614                 return nativeResponseValue;
11615         }
11616         // 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);
11617         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 {
11618                 if(!isWasmInitialized) {
11619                         throw new Error("initializeWasm() must be awaited first!");
11620                 }
11621                 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger);
11622                 return nativeResponseValue;
11623         }
11624         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
11625         export function NetworkGraph_free(this_obj: number): void {
11626                 if(!isWasmInitialized) {
11627                         throw new Error("initializeWasm() must be awaited first!");
11628                 }
11629                 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
11630                 // debug statements here
11631         }
11632         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
11633         export function NetworkGraph_clone(orig: number): number {
11634                 if(!isWasmInitialized) {
11635                         throw new Error("initializeWasm() must be awaited first!");
11636                 }
11637                 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
11638                 return nativeResponseValue;
11639         }
11640         // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_obj);
11641         export function LockedNetworkGraph_free(this_obj: number): void {
11642                 if(!isWasmInitialized) {
11643                         throw new Error("initializeWasm() must be awaited first!");
11644                 }
11645                 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_obj);
11646                 // debug statements here
11647         }
11648         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
11649         export function NetGraphMsgHandler_free(this_obj: number): void {
11650                 if(!isWasmInitialized) {
11651                         throw new Error("initializeWasm() must be awaited first!");
11652                 }
11653                 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
11654                 // debug statements here
11655         }
11656         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
11657         export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
11658                 if(!isWasmInitialized) {
11659                         throw new Error("initializeWasm() must be awaited first!");
11660                 }
11661                 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
11662                 return nativeResponseValue;
11663         }
11664         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
11665         export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
11666                 if(!isWasmInitialized) {
11667                         throw new Error("initializeWasm() must be awaited first!");
11668                 }
11669                 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
11670                 return nativeResponseValue;
11671         }
11672         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
11673         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
11674                 if(!isWasmInitialized) {
11675                         throw new Error("initializeWasm() must be awaited first!");
11676                 }
11677                 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
11678                 // debug statements here
11679         }
11680         // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11681         export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
11682                 if(!isWasmInitialized) {
11683                         throw new Error("initializeWasm() must be awaited first!");
11684                 }
11685                 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
11686                 return nativeResponseValue;
11687         }
11688         // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
11689         export function LockedNetworkGraph_graph(this_arg: number): number {
11690                 if(!isWasmInitialized) {
11691                         throw new Error("initializeWasm() must be awaited first!");
11692                 }
11693                 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
11694                 return nativeResponseValue;
11695         }
11696         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11697         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
11698                 if(!isWasmInitialized) {
11699                         throw new Error("initializeWasm() must be awaited first!");
11700                 }
11701                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
11702                 return nativeResponseValue;
11703         }
11704         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11705         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
11706                 if(!isWasmInitialized) {
11707                         throw new Error("initializeWasm() must be awaited first!");
11708                 }
11709                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
11710                 return nativeResponseValue;
11711         }
11712         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
11713         export function DirectionalChannelInfo_free(this_obj: number): void {
11714                 if(!isWasmInitialized) {
11715                         throw new Error("initializeWasm() must be awaited first!");
11716                 }
11717                 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
11718                 // debug statements here
11719         }
11720         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11721         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
11722                 if(!isWasmInitialized) {
11723                         throw new Error("initializeWasm() must be awaited first!");
11724                 }
11725                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
11726                 return nativeResponseValue;
11727         }
11728         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
11729         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
11730                 if(!isWasmInitialized) {
11731                         throw new Error("initializeWasm() must be awaited first!");
11732                 }
11733                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
11734                 // debug statements here
11735         }
11736         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11737         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
11738                 if(!isWasmInitialized) {
11739                         throw new Error("initializeWasm() must be awaited first!");
11740                 }
11741                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
11742                 return nativeResponseValue;
11743         }
11744         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
11745         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
11746                 if(!isWasmInitialized) {
11747                         throw new Error("initializeWasm() must be awaited first!");
11748                 }
11749                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
11750                 // debug statements here
11751         }
11752         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11753         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
11754                 if(!isWasmInitialized) {
11755                         throw new Error("initializeWasm() must be awaited first!");
11756                 }
11757                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
11758                 return nativeResponseValue;
11759         }
11760         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
11761         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11762                 if(!isWasmInitialized) {
11763                         throw new Error("initializeWasm() must be awaited first!");
11764                 }
11765                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
11766                 // debug statements here
11767         }
11768         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11769         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
11770                 if(!isWasmInitialized) {
11771                         throw new Error("initializeWasm() must be awaited first!");
11772                 }
11773                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
11774                 return nativeResponseValue;
11775         }
11776         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
11777         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
11778                 if(!isWasmInitialized) {
11779                         throw new Error("initializeWasm() must be awaited first!");
11780                 }
11781                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
11782                 // debug statements here
11783         }
11784         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11785         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
11786                 if(!isWasmInitialized) {
11787                         throw new Error("initializeWasm() must be awaited first!");
11788                 }
11789                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
11790                 return nativeResponseValue;
11791         }
11792         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
11793         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
11794                 if(!isWasmInitialized) {
11795                         throw new Error("initializeWasm() must be awaited first!");
11796                 }
11797                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
11798                 // debug statements here
11799         }
11800         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11801         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
11802                 if(!isWasmInitialized) {
11803                         throw new Error("initializeWasm() must be awaited first!");
11804                 }
11805                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
11806                 return nativeResponseValue;
11807         }
11808         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
11809         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
11810                 if(!isWasmInitialized) {
11811                         throw new Error("initializeWasm() must be awaited first!");
11812                 }
11813                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
11814                 // debug statements here
11815         }
11816         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
11817         export function DirectionalChannelInfo_clone(orig: number): number {
11818                 if(!isWasmInitialized) {
11819                         throw new Error("initializeWasm() must be awaited first!");
11820                 }
11821                 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
11822                 return nativeResponseValue;
11823         }
11824         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
11825         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
11826                 if(!isWasmInitialized) {
11827                         throw new Error("initializeWasm() must be awaited first!");
11828                 }
11829                 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
11830                 return decodeArray(nativeResponseValue);
11831         }
11832         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
11833         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
11834                 if(!isWasmInitialized) {
11835                         throw new Error("initializeWasm() must be awaited first!");
11836                 }
11837                 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
11838                 return nativeResponseValue;
11839         }
11840         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
11841         export function ChannelInfo_free(this_obj: number): void {
11842                 if(!isWasmInitialized) {
11843                         throw new Error("initializeWasm() must be awaited first!");
11844                 }
11845                 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
11846                 // debug statements here
11847         }
11848         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11849         export function ChannelInfo_get_features(this_ptr: number): number {
11850                 if(!isWasmInitialized) {
11851                         throw new Error("initializeWasm() must be awaited first!");
11852                 }
11853                 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
11854                 return nativeResponseValue;
11855         }
11856         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11857         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
11858                 if(!isWasmInitialized) {
11859                         throw new Error("initializeWasm() must be awaited first!");
11860                 }
11861                 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
11862                 // debug statements here
11863         }
11864         // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11865         export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
11866                 if(!isWasmInitialized) {
11867                         throw new Error("initializeWasm() must be awaited first!");
11868                 }
11869                 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
11870                 return decodeArray(nativeResponseValue);
11871         }
11872         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11873         export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
11874                 if(!isWasmInitialized) {
11875                         throw new Error("initializeWasm() must be awaited first!");
11876                 }
11877                 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
11878                 // debug statements here
11879         }
11880         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11881         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
11882                 if(!isWasmInitialized) {
11883                         throw new Error("initializeWasm() must be awaited first!");
11884                 }
11885                 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
11886                 return nativeResponseValue;
11887         }
11888         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
11889         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
11890                 if(!isWasmInitialized) {
11891                         throw new Error("initializeWasm() must be awaited first!");
11892                 }
11893                 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
11894                 // debug statements here
11895         }
11896         // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11897         export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
11898                 if(!isWasmInitialized) {
11899                         throw new Error("initializeWasm() must be awaited first!");
11900                 }
11901                 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
11902                 return decodeArray(nativeResponseValue);
11903         }
11904         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11905         export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
11906                 if(!isWasmInitialized) {
11907                         throw new Error("initializeWasm() must be awaited first!");
11908                 }
11909                 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
11910                 // debug statements here
11911         }
11912         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11913         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
11914                 if(!isWasmInitialized) {
11915                         throw new Error("initializeWasm() must be awaited first!");
11916                 }
11917                 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
11918                 return nativeResponseValue;
11919         }
11920         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
11921         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
11922                 if(!isWasmInitialized) {
11923                         throw new Error("initializeWasm() must be awaited first!");
11924                 }
11925                 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
11926                 // debug statements here
11927         }
11928         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11929         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
11930                 if(!isWasmInitialized) {
11931                         throw new Error("initializeWasm() must be awaited first!");
11932                 }
11933                 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
11934                 return nativeResponseValue;
11935         }
11936         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
11937         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
11938                 if(!isWasmInitialized) {
11939                         throw new Error("initializeWasm() must be awaited first!");
11940                 }
11941                 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
11942                 // debug statements here
11943         }
11944         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
11945         export function ChannelInfo_clone(orig: number): number {
11946                 if(!isWasmInitialized) {
11947                         throw new Error("initializeWasm() must be awaited first!");
11948                 }
11949                 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
11950                 return nativeResponseValue;
11951         }
11952         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
11953         export function ChannelInfo_write(obj: number): Uint8Array {
11954                 if(!isWasmInitialized) {
11955                         throw new Error("initializeWasm() must be awaited first!");
11956                 }
11957                 const nativeResponseValue = wasm.ChannelInfo_write(obj);
11958                 return decodeArray(nativeResponseValue);
11959         }
11960         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
11961         export function ChannelInfo_read(ser: Uint8Array): number {
11962                 if(!isWasmInitialized) {
11963                         throw new Error("initializeWasm() must be awaited first!");
11964                 }
11965                 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
11966                 return nativeResponseValue;
11967         }
11968         // void RoutingFees_free(struct LDKRoutingFees this_obj);
11969         export function RoutingFees_free(this_obj: number): void {
11970                 if(!isWasmInitialized) {
11971                         throw new Error("initializeWasm() must be awaited first!");
11972                 }
11973                 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
11974                 // debug statements here
11975         }
11976         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
11977         export function RoutingFees_get_base_msat(this_ptr: number): number {
11978                 if(!isWasmInitialized) {
11979                         throw new Error("initializeWasm() must be awaited first!");
11980                 }
11981                 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
11982                 return nativeResponseValue;
11983         }
11984         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
11985         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
11986                 if(!isWasmInitialized) {
11987                         throw new Error("initializeWasm() must be awaited first!");
11988                 }
11989                 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
11990                 // debug statements here
11991         }
11992         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
11993         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
11994                 if(!isWasmInitialized) {
11995                         throw new Error("initializeWasm() must be awaited first!");
11996                 }
11997                 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
11998                 return nativeResponseValue;
11999         }
12000         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
12001         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
12002                 if(!isWasmInitialized) {
12003                         throw new Error("initializeWasm() must be awaited first!");
12004                 }
12005                 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
12006                 // debug statements here
12007         }
12008         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
12009         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
12010                 if(!isWasmInitialized) {
12011                         throw new Error("initializeWasm() must be awaited first!");
12012                 }
12013                 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
12014                 return nativeResponseValue;
12015         }
12016         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
12017         export function RoutingFees_clone(orig: number): number {
12018                 if(!isWasmInitialized) {
12019                         throw new Error("initializeWasm() must be awaited first!");
12020                 }
12021                 const nativeResponseValue = wasm.RoutingFees_clone(orig);
12022                 return nativeResponseValue;
12023         }
12024         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
12025         export function RoutingFees_read(ser: Uint8Array): number {
12026                 if(!isWasmInitialized) {
12027                         throw new Error("initializeWasm() must be awaited first!");
12028                 }
12029                 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
12030                 return nativeResponseValue;
12031         }
12032         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
12033         export function RoutingFees_write(obj: number): Uint8Array {
12034                 if(!isWasmInitialized) {
12035                         throw new Error("initializeWasm() must be awaited first!");
12036                 }
12037                 const nativeResponseValue = wasm.RoutingFees_write(obj);
12038                 return decodeArray(nativeResponseValue);
12039         }
12040         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
12041         export function NodeAnnouncementInfo_free(this_obj: number): void {
12042                 if(!isWasmInitialized) {
12043                         throw new Error("initializeWasm() must be awaited first!");
12044                 }
12045                 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
12046                 // debug statements here
12047         }
12048         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12049         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
12050                 if(!isWasmInitialized) {
12051                         throw new Error("initializeWasm() must be awaited first!");
12052                 }
12053                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
12054                 return nativeResponseValue;
12055         }
12056         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
12057         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
12058                 if(!isWasmInitialized) {
12059                         throw new Error("initializeWasm() must be awaited first!");
12060                 }
12061                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
12062                 // debug statements here
12063         }
12064         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12065         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
12066                 if(!isWasmInitialized) {
12067                         throw new Error("initializeWasm() must be awaited first!");
12068                 }
12069                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
12070                 return nativeResponseValue;
12071         }
12072         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
12073         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
12074                 if(!isWasmInitialized) {
12075                         throw new Error("initializeWasm() must be awaited first!");
12076                 }
12077                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
12078                 // debug statements here
12079         }
12080         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
12081         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
12082                 if(!isWasmInitialized) {
12083                         throw new Error("initializeWasm() must be awaited first!");
12084                 }
12085                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
12086                 return decodeArray(nativeResponseValue);
12087         }
12088         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
12089         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
12090                 if(!isWasmInitialized) {
12091                         throw new Error("initializeWasm() must be awaited first!");
12092                 }
12093                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
12094                 // debug statements here
12095         }
12096         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
12097         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
12098                 if(!isWasmInitialized) {
12099                         throw new Error("initializeWasm() must be awaited first!");
12100                 }
12101                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
12102                 return decodeArray(nativeResponseValue);
12103         }
12104         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12105         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
12106                 if(!isWasmInitialized) {
12107                         throw new Error("initializeWasm() must be awaited first!");
12108                 }
12109                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
12110                 // debug statements here
12111         }
12112         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
12113         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
12114                 if(!isWasmInitialized) {
12115                         throw new Error("initializeWasm() must be awaited first!");
12116                 }
12117                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
12118                 // debug statements here
12119         }
12120         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12121         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
12122                 if(!isWasmInitialized) {
12123                         throw new Error("initializeWasm() must be awaited first!");
12124                 }
12125                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
12126                 return nativeResponseValue;
12127         }
12128         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
12129         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
12130                 if(!isWasmInitialized) {
12131                         throw new Error("initializeWasm() must be awaited first!");
12132                 }
12133                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
12134                 // debug statements here
12135         }
12136         // 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);
12137         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 {
12138                 if(!isWasmInitialized) {
12139                         throw new Error("initializeWasm() must be awaited first!");
12140                 }
12141                 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
12142                 return nativeResponseValue;
12143         }
12144         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
12145         export function NodeAnnouncementInfo_clone(orig: number): number {
12146                 if(!isWasmInitialized) {
12147                         throw new Error("initializeWasm() must be awaited first!");
12148                 }
12149                 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
12150                 return nativeResponseValue;
12151         }
12152         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
12153         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
12154                 if(!isWasmInitialized) {
12155                         throw new Error("initializeWasm() must be awaited first!");
12156                 }
12157                 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
12158                 return decodeArray(nativeResponseValue);
12159         }
12160         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
12161         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
12162                 if(!isWasmInitialized) {
12163                         throw new Error("initializeWasm() must be awaited first!");
12164                 }
12165                 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
12166                 return nativeResponseValue;
12167         }
12168         // void NodeInfo_free(struct LDKNodeInfo this_obj);
12169         export function NodeInfo_free(this_obj: number): void {
12170                 if(!isWasmInitialized) {
12171                         throw new Error("initializeWasm() must be awaited first!");
12172                 }
12173                 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
12174                 // debug statements here
12175         }
12176         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12177         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
12178                 if(!isWasmInitialized) {
12179                         throw new Error("initializeWasm() must be awaited first!");
12180                 }
12181                 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
12182                 // debug statements here
12183         }
12184         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12185         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
12186                 if(!isWasmInitialized) {
12187                         throw new Error("initializeWasm() must be awaited first!");
12188                 }
12189                 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
12190                 return nativeResponseValue;
12191         }
12192         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
12193         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
12194                 if(!isWasmInitialized) {
12195                         throw new Error("initializeWasm() must be awaited first!");
12196                 }
12197                 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
12198                 // debug statements here
12199         }
12200         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12201         export function NodeInfo_get_announcement_info(this_ptr: number): number {
12202                 if(!isWasmInitialized) {
12203                         throw new Error("initializeWasm() must be awaited first!");
12204                 }
12205                 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
12206                 return nativeResponseValue;
12207         }
12208         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
12209         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
12210                 if(!isWasmInitialized) {
12211                         throw new Error("initializeWasm() must be awaited first!");
12212                 }
12213                 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
12214                 // debug statements here
12215         }
12216         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
12217         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
12218                 if(!isWasmInitialized) {
12219                         throw new Error("initializeWasm() must be awaited first!");
12220                 }
12221                 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
12222                 return nativeResponseValue;
12223         }
12224         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
12225         export function NodeInfo_clone(orig: number): number {
12226                 if(!isWasmInitialized) {
12227                         throw new Error("initializeWasm() must be awaited first!");
12228                 }
12229                 const nativeResponseValue = wasm.NodeInfo_clone(orig);
12230                 return nativeResponseValue;
12231         }
12232         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
12233         export function NodeInfo_write(obj: number): Uint8Array {
12234                 if(!isWasmInitialized) {
12235                         throw new Error("initializeWasm() must be awaited first!");
12236                 }
12237                 const nativeResponseValue = wasm.NodeInfo_write(obj);
12238                 return decodeArray(nativeResponseValue);
12239         }
12240         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
12241         export function NodeInfo_read(ser: Uint8Array): number {
12242                 if(!isWasmInitialized) {
12243                         throw new Error("initializeWasm() must be awaited first!");
12244                 }
12245                 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
12246                 return nativeResponseValue;
12247         }
12248         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
12249         export function NetworkGraph_write(obj: number): Uint8Array {
12250                 if(!isWasmInitialized) {
12251                         throw new Error("initializeWasm() must be awaited first!");
12252                 }
12253                 const nativeResponseValue = wasm.NetworkGraph_write(obj);
12254                 return decodeArray(nativeResponseValue);
12255         }
12256         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
12257         export function NetworkGraph_read(ser: Uint8Array): number {
12258                 if(!isWasmInitialized) {
12259                         throw new Error("initializeWasm() must be awaited first!");
12260                 }
12261                 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
12262                 return nativeResponseValue;
12263         }
12264         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
12265         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
12266                 if(!isWasmInitialized) {
12267                         throw new Error("initializeWasm() must be awaited first!");
12268                 }
12269                 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
12270                 return nativeResponseValue;
12271         }
12272         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
12273         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
12274                 if(!isWasmInitialized) {
12275                         throw new Error("initializeWasm() must be awaited first!");
12276                 }
12277                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
12278                 return nativeResponseValue;
12279         }
12280         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
12281         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
12282                 if(!isWasmInitialized) {
12283                         throw new Error("initializeWasm() must be awaited first!");
12284                 }
12285                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
12286                 return nativeResponseValue;
12287         }
12288         // 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);
12289         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
12290                 if(!isWasmInitialized) {
12291                         throw new Error("initializeWasm() must be awaited first!");
12292                 }
12293                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
12294                 return nativeResponseValue;
12295         }
12296         // 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);
12297         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
12298                 if(!isWasmInitialized) {
12299                         throw new Error("initializeWasm() must be awaited first!");
12300                 }
12301                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
12302                 return nativeResponseValue;
12303         }
12304         // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
12305         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
12306                 if(!isWasmInitialized) {
12307                         throw new Error("initializeWasm() must be awaited first!");
12308                 }
12309                 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
12310                 // debug statements here
12311         }
12312         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
12313         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
12314                 if(!isWasmInitialized) {
12315                         throw new Error("initializeWasm() must be awaited first!");
12316                 }
12317                 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
12318                 return nativeResponseValue;
12319         }
12320         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
12321         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
12322                 if(!isWasmInitialized) {
12323                         throw new Error("initializeWasm() must be awaited first!");
12324                 }
12325                 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
12326                 return nativeResponseValue;
12327         }
12328
12329         export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
12330             if(isWasmInitialized && !allowDoubleInitialization) {
12331                 return;
12332             }
12333             const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
12334             wasm = wasmInstance.exports;
12335             isWasmInitialized = true;
12336         }
12337