ea1e7fbe14cecee87c5f3e7c5e5fa3f31ae07e25
[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 encodeArray = (inputArray) => {
31         const cArrayPointer = wasm.wasm_malloc((inputArray.length + 1) * 4);
32         const arrayMemoryView = new Uint32Array(memory.buffer, cArrayPointer + 4, inputArray.length);
33         arrayMemoryView.set(inputArray, 1);
34     arrayMemoryView[0] = inputArray.length;
35         return cArrayPointer;
36 }
37
38 const getArrayLength = (arrayPointer) => {
39         const arraySizeViewer = new Uint32Array(
40                 memory.buffer, // value
41                 arrayPointer, // offset
42                 1 // one int
43         );
44         return arraySizeViewer[0];
45 }
46 const decodeUint8Array = (arrayPointer, free = true) => {
47         const arraySize = getArrayLength(arrayPointer);
48         const actualArrayViewer = new Uint8Array(
49                 memory.buffer, // value
50                 arrayPointer + 4, // offset (ignoring length bytes)
51                 arraySize // uint8 count
52         );
53         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
54         // will free the underlying memory when it becomes unreachable instead of copying here.
55         const actualArray = actualArrayViewer.slice(0, arraySize);
56         if (free) {
57                 wasm.free(arrayPointer);
58         }
59         return actualArray;
60 }
61 const decodeUint32Array = (arrayPointer, free = true) => {
62         const arraySize = getArrayLength(arrayPointer);
63         const actualArrayViewer = new Uint32Array(
64                 memory.buffer, // value
65                 arrayPointer + 4, // offset (ignoring length bytes)
66                 arraySize // uint32 count
67         );
68         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
69         // will free the underlying memory when it becomes unreachable instead of copying here.
70         const actualArray = actualArrayViewer.slice(0, arraySize);
71         if (free) {
72                 wasm.free(arrayPointer);
73         }
74         return actualArray;
75 }
76
77 const encodeString = (string) => {
78     // make malloc count divisible by 4
79     const memoryNeed = nextMultipleOfFour(string.length + 1);
80     const stringPointer = wasm.wasm_malloc(memoryNeed);
81     const stringMemoryView = new Uint8Array(
82         memory.buffer, // value
83         stringPointer, // offset
84         string.length + 1 // length
85     );
86     for (let i = 0; i < string.length; i++) {
87         stringMemoryView[i] = string.charCodeAt(i);
88     }
89     stringMemoryView[string.length] = 0;
90     return stringPointer;
91 }
92
93 const decodeString = (stringPointer, free = true) => {
94     const memoryView = new Uint8Array(memory.buffer, stringPointer);
95     let cursor = 0;
96     let result = '';
97
98     while (memoryView[cursor] !== 0) {
99         result += String.fromCharCode(memoryView[cursor]);
100         cursor++;
101     }
102
103     if (free) {
104         wasm.wasm_free(stringPointer);
105     }
106
107     return result;
108 };
109
110 export class VecOrSliceDef {
111     public dataptr: number;
112     public datalen: number;
113     public stride: number;
114     public constructor(dataptr: number, datalen: number, stride: number) {
115         this.dataptr = dataptr;
116         this.datalen = datalen;
117         this.stride = stride;
118     }
119 }
120
121 /*
122 TODO: load WASM file
123 static {
124     System.loadLibrary("lightningjni");
125     init(java.lang.Enum.class, VecOrSliceDef.class);
126     init_class_cache();
127 }
128
129 static native void init(java.lang.Class c, java.lang.Class slicedef);
130 static native void init_class_cache();
131
132 public static native boolean deref_bool(long ptr);
133 public static native long deref_long(long ptr);
134 public static native void free_heap_ptr(long ptr);
135 public static native byte[] read_bytes(long ptr, long len);
136 public static native byte[] get_u8_slice_bytes(long slice_ptr);
137 public static native long bytes_to_u8_vec(byte[] bytes);
138 public static native long new_txpointer_copy_data(byte[] txdata);
139 public static native void txpointer_free(long ptr);
140 public static native byte[] txpointer_get_buffer(long ptr);
141 public static native long vec_slice_len(long vec);
142 public static native long new_empty_slice_vec();
143 */
144
145         public static native long LDKCVec_u8Z_new(number[] elems);
146         public static native long LDKC2Tuple_u64u64Z_new(number a, number b);
147         public static native number LDKC2Tuple_u64u64Z_get_a(long ptr);
148         public static native number LDKC2Tuple_u64u64Z_get_b(long ptr);
149         public static class LDKSpendableOutputDescriptor {
150                 private LDKSpendableOutputDescriptor() {}
151                 export class StaticOutput extends LDKSpendableOutputDescriptor {
152                         public number outpoint;
153                         public number output;
154                         StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
155                 }
156                 export class DynamicOutputP2WSH extends LDKSpendableOutputDescriptor {
157                         public number outpoint;
158                         public Uint8Array per_commitment_point;
159                         public number to_self_delay;
160                         public number output;
161                         public number key_derivation_params;
162                         public Uint8Array revocation_pubkey;
163                         DynamicOutputP2WSH(number outpoint, Uint8Array per_commitment_point, number to_self_delay, number output, number key_derivation_params, Uint8Array revocation_pubkey) { this.outpoint = outpoint; this.per_commitment_point = per_commitment_point; this.to_self_delay = to_self_delay; this.output = output; this.key_derivation_params = key_derivation_params; this.revocation_pubkey = revocation_pubkey; }
164                 }
165                 export class StaticOutputCounterpartyPayment extends LDKSpendableOutputDescriptor {
166                         public number outpoint;
167                         public number output;
168                         public number key_derivation_params;
169                         StaticOutputCounterpartyPayment(number outpoint, number output, number key_derivation_params) { this.outpoint = outpoint; this.output = output; this.key_derivation_params = key_derivation_params; }
170                 }
171                 static native void init();
172         }
173         static { LDKSpendableOutputDescriptor.init(); }
174         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
175         public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
176         public static class LDKErrorAction {
177                 private LDKErrorAction() {}
178                 export class DisconnectPeer extends LDKErrorAction {
179                         public number msg;
180                         DisconnectPeer(number msg) { this.msg = msg; }
181                 }
182                 export class IgnoreError extends LDKErrorAction {
183                         IgnoreError() { }
184                 }
185                 export class SendErrorMessage extends LDKErrorAction {
186                         public number msg;
187                         SendErrorMessage(number msg) { this.msg = msg; }
188                 }
189                 static native void init();
190         }
191         static { LDKErrorAction.init(); }
192         public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
193         public static class LDKHTLCFailChannelUpdate {
194                 private LDKHTLCFailChannelUpdate() {}
195                 export class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
196                         public number msg;
197                         ChannelUpdateMessage(number msg) { this.msg = msg; }
198                 }
199                 export class ChannelClosed extends LDKHTLCFailChannelUpdate {
200                         public number short_channel_id;
201                         public boolean is_permanent;
202                         ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
203                 }
204                 export class NodeFailure extends LDKHTLCFailChannelUpdate {
205                         public Uint8Array node_id;
206                         public boolean is_permanent;
207                         NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
208                 }
209                 static native void init();
210         }
211         static { LDKHTLCFailChannelUpdate.init(); }
212         public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
213         public static class LDKMessageSendEvent {
214                 private LDKMessageSendEvent() {}
215                 export class SendAcceptChannel extends LDKMessageSendEvent {
216                         public Uint8Array node_id;
217                         public number msg;
218                         SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
219                 }
220                 export class SendOpenChannel extends LDKMessageSendEvent {
221                         public Uint8Array node_id;
222                         public number msg;
223                         SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
224                 }
225                 export class SendFundingCreated extends LDKMessageSendEvent {
226                         public Uint8Array node_id;
227                         public number msg;
228                         SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
229                 }
230                 export class SendFundingSigned extends LDKMessageSendEvent {
231                         public Uint8Array node_id;
232                         public number msg;
233                         SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
234                 }
235                 export class SendFundingLocked extends LDKMessageSendEvent {
236                         public Uint8Array node_id;
237                         public number msg;
238                         SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
239                 }
240                 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
241                         public Uint8Array node_id;
242                         public number msg;
243                         SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
244                 }
245                 export class UpdateHTLCs extends LDKMessageSendEvent {
246                         public Uint8Array node_id;
247                         public number updates;
248                         UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
249                 }
250                 export class SendRevokeAndACK extends LDKMessageSendEvent {
251                         public Uint8Array node_id;
252                         public number msg;
253                         SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
254                 }
255                 export class SendClosingSigned extends LDKMessageSendEvent {
256                         public Uint8Array node_id;
257                         public number msg;
258                         SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
259                 }
260                 export class SendShutdown extends LDKMessageSendEvent {
261                         public Uint8Array node_id;
262                         public number msg;
263                         SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
264                 }
265                 export class SendChannelReestablish extends LDKMessageSendEvent {
266                         public Uint8Array node_id;
267                         public number msg;
268                         SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
269                 }
270                 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
271                         public number msg;
272                         public number update_msg;
273                         BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
274                 }
275                 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
276                         public number msg;
277                         BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
278                 }
279                 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
280                         public number msg;
281                         BroadcastChannelUpdate(number msg) { this.msg = msg; }
282                 }
283                 export class HandleError extends LDKMessageSendEvent {
284                         public Uint8Array node_id;
285                         public number action;
286                         HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
287                 }
288                 export class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
289                         public number update;
290                         PaymentFailureNetworkUpdate(number update) { this.update = update; }
291                 }
292                 export class SendChannelRangeQuery extends LDKMessageSendEvent {
293                         public Uint8Array node_id;
294                         public number msg;
295                         SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
296                 }
297                 export class SendShortIdsQuery extends LDKMessageSendEvent {
298                         public Uint8Array node_id;
299                         public number msg;
300                         SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
301                 }
302                 static native void init();
303         }
304         static { LDKMessageSendEvent.init(); }
305         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
306         public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
307         public static class LDKEvent {
308                 private LDKEvent() {}
309                 export class FundingGenerationReady extends LDKEvent {
310                         public Uint8Array temporary_channel_id;
311                         public number channel_value_satoshis;
312                         public Uint8Array output_script;
313                         public number user_channel_id;
314                         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; }
315                 }
316                 export class FundingBroadcastSafe extends LDKEvent {
317                         public number funding_txo;
318                         public number user_channel_id;
319                         FundingBroadcastSafe(number funding_txo, number user_channel_id) { this.funding_txo = funding_txo; this.user_channel_id = user_channel_id; }
320                 }
321                 export class PaymentReceived extends LDKEvent {
322                         public Uint8Array payment_hash;
323                         public Uint8Array payment_secret;
324                         public number amt;
325                         PaymentReceived(Uint8Array payment_hash, Uint8Array payment_secret, number amt) { this.payment_hash = payment_hash; this.payment_secret = payment_secret; this.amt = amt; }
326                 }
327                 export class PaymentSent extends LDKEvent {
328                         public Uint8Array payment_preimage;
329                         PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
330                 }
331                 export class PaymentFailed extends LDKEvent {
332                         public Uint8Array payment_hash;
333                         public boolean rejected_by_dest;
334                         PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
335                 }
336                 export class PendingHTLCsForwardable extends LDKEvent {
337                         public number time_forwardable;
338                         PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
339                 }
340                 export class SpendableOutputs extends LDKEvent {
341                         public number[] outputs;
342                         SpendableOutputs(number[] outputs) { this.outputs = outputs; }
343                 }
344                 static native void init();
345         }
346         static { LDKEvent.init(); }
347         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
348         public static native long LDKCVec_EventZ_new(number[] elems);
349         public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
350         public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
351         public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
352         public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
353         public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
354         public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
355         public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
356         public static native long LDKCVec_MonitorEventZ_new(number[] elems);
357         public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
358         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
359         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
360         public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
361         public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
362         public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
363         public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
364         public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
365         public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
366         public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
367         public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
368         public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
369         public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
370         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
371         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
372         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
373         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
374         public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
375         public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
376         public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
377         public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
378         public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
379         public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
380         public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
381         public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
382         public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
383         public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
384         public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
385         public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
386
387
388
389 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
390
391                 export interface LDKChannelKeys {
392                         get_per_commitment_point (idx: number): Uint8Array;
393                         release_commitment_secret (idx: number): Uint8Array;
394                         key_derivation_params (): number;
395                         sign_counterparty_commitment (commitment_tx: number): number;
396                         sign_holder_commitment (commitment_tx: number): number;
397                         sign_holder_commitment_htlc_transactions (commitment_tx: number): number;
398                         sign_justice_transaction (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
399                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
400                         sign_closing_transaction (closing_tx: Uint8Array): number;
401                         sign_channel_announcement (msg: number): number;
402                         ready_channel (channel_parameters: number): void;
403                         write (): Uint8Array;
404                 }
405
406                 export function LDKChannelKeys_new(impl: LDKChannelKeys, pubkeys: number): number {
407             throw new Error('unimplemented'); // TODO: bind to WASM
408         }
409
410 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
411
412
413         // LDKPublicKey ChannelKeys_get_per_commitment_point LDKChannelKeys* this_arg, uint64_t idx
414         export function ChannelKeys_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
415                 if(!isWasmInitialized) {
416                         throw new Error("initializeWasm() must be awaited first!");
417                 }
418                 const nativeResponseValue = wasm.ChannelKeys_get_per_commitment_point(this_arg, idx);
419                 return decodeArray(nativeResponseValue);
420         }
421         // LDKThirtyTwoBytes ChannelKeys_release_commitment_secret LDKChannelKeys* this_arg, uint64_t idx
422         export function ChannelKeys_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
423                 if(!isWasmInitialized) {
424                         throw new Error("initializeWasm() must be awaited first!");
425                 }
426                 const nativeResponseValue = wasm.ChannelKeys_release_commitment_secret(this_arg, idx);
427                 return decodeArray(nativeResponseValue);
428         }
429         // LDKC2Tuple_u64u64Z ChannelKeys_key_derivation_params LDKChannelKeys* this_arg
430         export function ChannelKeys_key_derivation_params(this_arg: number): number {
431                 if(!isWasmInitialized) {
432                         throw new Error("initializeWasm() must be awaited first!");
433                 }
434                 const nativeResponseValue = wasm.ChannelKeys_key_derivation_params(this_arg);
435                 return nativeResponseValue;
436         }
437         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ChannelKeys_sign_counterparty_commitment LDKChannelKeys* this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
438         export function ChannelKeys_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
439                 if(!isWasmInitialized) {
440                         throw new Error("initializeWasm() must be awaited first!");
441                 }
442                 const nativeResponseValue = wasm.ChannelKeys_sign_counterparty_commitment(this_arg, commitment_tx);
443                 return nativeResponseValue;
444         }
445         // LDKCResult_SignatureNoneZ ChannelKeys_sign_holder_commitment LDKChannelKeys* this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
446         export function ChannelKeys_sign_holder_commitment(this_arg: number, commitment_tx: number): number {
447                 if(!isWasmInitialized) {
448                         throw new Error("initializeWasm() must be awaited first!");
449                 }
450                 const nativeResponseValue = wasm.ChannelKeys_sign_holder_commitment(this_arg, commitment_tx);
451                 return nativeResponseValue;
452         }
453         // LDKCResult_CVec_SignatureZNoneZ ChannelKeys_sign_holder_commitment_htlc_transactions LDKChannelKeys* this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
454         export function ChannelKeys_sign_holder_commitment_htlc_transactions(this_arg: number, commitment_tx: number): number {
455                 if(!isWasmInitialized) {
456                         throw new Error("initializeWasm() must be awaited first!");
457                 }
458                 const nativeResponseValue = wasm.ChannelKeys_sign_holder_commitment_htlc_transactions(this_arg, commitment_tx);
459                 return nativeResponseValue;
460         }
461         // LDKCResult_SignatureNoneZ ChannelKeys_sign_justice_transaction LDKChannelKeys* 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
462         export function ChannelKeys_sign_justice_transaction(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
463                 if(!isWasmInitialized) {
464                         throw new Error("initializeWasm() must be awaited first!");
465                 }
466                 const nativeResponseValue = wasm.ChannelKeys_sign_justice_transaction(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
467                 return nativeResponseValue;
468         }
469         // LDKCResult_SignatureNoneZ ChannelKeys_sign_counterparty_htlc_transaction LDKChannelKeys* this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
470         export function ChannelKeys_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
471                 if(!isWasmInitialized) {
472                         throw new Error("initializeWasm() must be awaited first!");
473                 }
474                 const nativeResponseValue = wasm.ChannelKeys_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
475                 return nativeResponseValue;
476         }
477         // LDKCResult_SignatureNoneZ ChannelKeys_sign_closing_transaction LDKChannelKeys* this_arg, struct LDKTransaction closing_tx
478         export function ChannelKeys_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
479                 if(!isWasmInitialized) {
480                         throw new Error("initializeWasm() must be awaited first!");
481                 }
482                 const nativeResponseValue = wasm.ChannelKeys_sign_closing_transaction(this_arg, encodeArray(closing_tx));
483                 return nativeResponseValue;
484         }
485         // LDKCResult_SignatureNoneZ ChannelKeys_sign_channel_announcement LDKChannelKeys* this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
486         export function ChannelKeys_sign_channel_announcement(this_arg: number, msg: number): number {
487                 if(!isWasmInitialized) {
488                         throw new Error("initializeWasm() must be awaited first!");
489                 }
490                 const nativeResponseValue = wasm.ChannelKeys_sign_channel_announcement(this_arg, msg);
491                 return nativeResponseValue;
492         }
493         // void ChannelKeys_ready_channel LDKChannelKeys* this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
494         export function ChannelKeys_ready_channel(this_arg: number, channel_parameters: number): void {
495                 if(!isWasmInitialized) {
496                         throw new Error("initializeWasm() must be awaited first!");
497                 }
498                 const nativeResponseValue = wasm.ChannelKeys_ready_channel(this_arg, channel_parameters);
499                 // debug statements here
500         }
501         // LDKCVec_u8Z ChannelKeys_write LDKChannelKeys* this_arg
502         export function ChannelKeys_write(this_arg: number): Uint8Array {
503                 if(!isWasmInitialized) {
504                         throw new Error("initializeWasm() must be awaited first!");
505                 }
506                 const nativeResponseValue = wasm.ChannelKeys_write(this_arg);
507                 return decodeArray(nativeResponseValue);
508         }
509         // LDKChannelPublicKeys ChannelKeys_get_pubkeys LDKChannelKeys* this_arg
510         export function ChannelKeys_get_pubkeys(this_arg: number): number {
511                 if(!isWasmInitialized) {
512                         throw new Error("initializeWasm() must be awaited first!");
513                 }
514                 const nativeResponseValue = wasm.ChannelKeys_get_pubkeys(this_arg);
515                 return nativeResponseValue;
516         }
517         public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
518         public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
519         public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
520         public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
521         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
522         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
523         public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
524         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
525         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
526         public static native boolean LDKCResult_ChanKeySignerDecodeErrorZ_result_ok(long arg);
527         public static native number LDKCResult_ChanKeySignerDecodeErrorZ_get_ok(long arg);
528         public static native number LDKCResult_ChanKeySignerDecodeErrorZ_get_err(long arg);
529         public static native boolean LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(long arg);
530         public static native number LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(long arg);
531         public static native number LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(long arg);
532         public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
533         public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
534         public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
535         public static class LDKAPIError {
536                 private LDKAPIError() {}
537                 export class APIMisuseError extends LDKAPIError {
538                         public Uint8Array err;
539                         APIMisuseError(Uint8Array err) { this.err = err; }
540                 }
541                 export class FeeRateTooHigh extends LDKAPIError {
542                         public Uint8Array err;
543                         public number feerate;
544                         FeeRateTooHigh(Uint8Array err, number feerate) { this.err = err; this.feerate = feerate; }
545                 }
546                 export class RouteError extends LDKAPIError {
547                         public String err;
548                         RouteError(String err) { this.err = err; }
549                 }
550                 export class ChannelUnavailable extends LDKAPIError {
551                         public Uint8Array err;
552                         ChannelUnavailable(Uint8Array err) { this.err = err; }
553                 }
554                 export class MonitorUpdateFailed extends LDKAPIError {
555                         MonitorUpdateFailed() { }
556                 }
557                 static native void init();
558         }
559         static { LDKAPIError.init(); }
560         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
561         public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
562         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
563         public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
564         public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
565         public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
566         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
567         public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
568         public static class LDKNetAddress {
569                 private LDKNetAddress() {}
570                 export class IPv4 extends LDKNetAddress {
571                         public Uint8Array addr;
572                         public number port;
573                         IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
574                 }
575                 export class IPv6 extends LDKNetAddress {
576                         public Uint8Array addr;
577                         public number port;
578                         IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
579                 }
580                 export class OnionV2 extends LDKNetAddress {
581                         public Uint8Array addr;
582                         public number port;
583                         OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
584                 }
585                 export class OnionV3 extends LDKNetAddress {
586                         public Uint8Array ed25519_pubkey;
587                         public number checksum;
588                         public number version;
589                         public number port;
590                         OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
591                 }
592                 static native void init();
593         }
594         static { LDKNetAddress.init(); }
595         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
596         public static native long LDKCVec_NetAddressZ_new(number[] elems);
597         public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
598
599
600
601 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
602
603                 export interface LDKWatch {
604                         watch_channel (funding_txo: number, monitor: number): number;
605                         update_channel (funding_txo: number, update: number): number;
606                         release_pending_monitor_events (): number[];
607                 }
608
609                 export function LDKWatch_new(impl: LDKWatch): number {
610             throw new Error('unimplemented'); // TODO: bind to WASM
611         }
612
613 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
614
615
616         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch* this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
617         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
618                 if(!isWasmInitialized) {
619                         throw new Error("initializeWasm() must be awaited first!");
620                 }
621                 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
622                 return nativeResponseValue;
623         }
624         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch* this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
625         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
626                 if(!isWasmInitialized) {
627                         throw new Error("initializeWasm() must be awaited first!");
628                 }
629                 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
630                 return nativeResponseValue;
631         }
632         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch* this_arg
633         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
634                 if(!isWasmInitialized) {
635                         throw new Error("initializeWasm() must be awaited first!");
636                 }
637                 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
638                 return nativeResponseValue;
639         }
640
641
642
643 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
644
645                 export interface LDKBroadcasterInterface {
646                         broadcast_transaction (tx: Uint8Array): void;
647                 }
648
649                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
650             throw new Error('unimplemented'); // TODO: bind to WASM
651         }
652
653 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
654
655
656         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface* this_arg, struct LDKTransaction tx
657         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
658                 if(!isWasmInitialized) {
659                         throw new Error("initializeWasm() must be awaited first!");
660                 }
661                 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
662                 // debug statements here
663         }
664
665
666
667 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
668
669                 export interface LDKKeysInterface {
670                         get_node_secret (): Uint8Array;
671                         get_destination_script (): Uint8Array;
672                         get_shutdown_pubkey (): Uint8Array;
673                         get_channel_keys (inbound: boolean, channel_value_satoshis: number): number;
674                         get_secure_random_bytes (): Uint8Array;
675                         read_chan_signer (reader: Uint8Array): number;
676                 }
677
678                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
679             throw new Error('unimplemented'); // TODO: bind to WASM
680         }
681
682 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
683
684
685         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface* this_arg
686         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
687                 if(!isWasmInitialized) {
688                         throw new Error("initializeWasm() must be awaited first!");
689                 }
690                 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
691                 return decodeArray(nativeResponseValue);
692         }
693         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface* this_arg
694         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
695                 if(!isWasmInitialized) {
696                         throw new Error("initializeWasm() must be awaited first!");
697                 }
698                 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
699                 return decodeArray(nativeResponseValue);
700         }
701         // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface* this_arg
702         export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
703                 if(!isWasmInitialized) {
704                         throw new Error("initializeWasm() must be awaited first!");
705                 }
706                 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
707                 return decodeArray(nativeResponseValue);
708         }
709         // LDKChannelKeys KeysInterface_get_channel_keys LDKKeysInterface* this_arg, bool inbound, uint64_t channel_value_satoshis
710         export function KeysInterface_get_channel_keys(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
711                 if(!isWasmInitialized) {
712                         throw new Error("initializeWasm() must be awaited first!");
713                 }
714                 const nativeResponseValue = wasm.KeysInterface_get_channel_keys(this_arg, inbound, channel_value_satoshis);
715                 return nativeResponseValue;
716         }
717         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface* this_arg
718         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
719                 if(!isWasmInitialized) {
720                         throw new Error("initializeWasm() must be awaited first!");
721                 }
722                 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
723                 return decodeArray(nativeResponseValue);
724         }
725         // LDKCResult_ChanKeySignerDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface* this_arg, struct LDKu8slice reader
726         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
727                 if(!isWasmInitialized) {
728                         throw new Error("initializeWasm() must be awaited first!");
729                 }
730                 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
731                 return nativeResponseValue;
732         }
733
734
735
736 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
737
738                 export interface LDKFeeEstimator {
739                         get_est_sat_per_1000_weight (confirmation_target: LDKConfirmationTarget): number;
740                 }
741
742                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
743             throw new Error('unimplemented'); // TODO: bind to WASM
744         }
745
746 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
747
748
749         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator* this_arg, enum LDKConfirmationTarget confirmation_target
750         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: LDKConfirmationTarget): number {
751                 if(!isWasmInitialized) {
752                         throw new Error("initializeWasm() must be awaited first!");
753                 }
754                 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
755                 return nativeResponseValue;
756         }
757
758
759
760 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
761
762                 export interface LDKLogger {
763                         log (record: String): void;
764                 }
765
766                 export function LDKLogger_new(impl: LDKLogger): number {
767             throw new Error('unimplemented'); // TODO: bind to WASM
768         }
769
770 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
771
772
773         public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
774         public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
775         public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
776         public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
777         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
778         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
779         public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
780         public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
781         public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
782         public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
783         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
784         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
785         public static native long LDKCVec_u64Z_new(number[] elems);
786         public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
787         public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
788         public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
789         public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
790         public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
791         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
792         public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
793         public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
794         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
795         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
796         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
797         public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
798         public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
799         public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
800         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
801         public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
802         public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
803         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
804         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
805         public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
806         public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
807         public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
808         public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
809         public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
810         public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
811         public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
812         public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
813         public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
814         public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
815         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
816         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
817         public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
818         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
819         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
820         public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
821         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
822         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
823         public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
824         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
825         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
826         public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
827         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
828         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
829         public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
830         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
831         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
832         public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
833         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
834         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
835         public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
836         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
837         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
838         public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
839         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
840         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
841         public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
842         public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
843         public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
844         public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
845         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
846         public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
847         public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
848         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
849         public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
850         public static native boolean LDKCResult_SecretKeySecpErrorZ_result_ok(long arg);
851         public static native Uint8Array LDKCResult_SecretKeySecpErrorZ_get_ok(long arg);
852         public static native LDKSecp256k1Error LDKCResult_SecretKeySecpErrorZ_get_err(long arg);
853         public static native boolean LDKCResult_PublicKeySecpErrorZ_result_ok(long arg);
854         public static native Uint8Array LDKCResult_PublicKeySecpErrorZ_get_ok(long arg);
855         public static native LDKSecp256k1Error LDKCResult_PublicKeySecpErrorZ_get_err(long arg);
856         public static native boolean LDKCResult_TxCreationKeysSecpErrorZ_result_ok(long arg);
857         public static native number LDKCResult_TxCreationKeysSecpErrorZ_get_ok(long arg);
858         public static native LDKSecp256k1Error LDKCResult_TxCreationKeysSecpErrorZ_get_err(long arg);
859         public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
860         public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
861         public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
862         public static native long LDKCVec_RouteHopZ_new(number[] elems);
863         public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
864         public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
865         public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
866         public static native long LDKCVec_RouteHintZ_new(number[] elems);
867         public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
868         public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
869         public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
870         public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
871         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
872         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
873         public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
874         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
875         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
876         public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
877         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
878         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
879         public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
880         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
881         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
882
883
884
885 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
886
887                 export interface LDKMessageSendEventsProvider {
888                         get_and_clear_pending_msg_events (): number[];
889                 }
890
891                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
892             throw new Error('unimplemented'); // TODO: bind to WASM
893         }
894
895 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
896
897
898         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider* this_arg
899         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
900                 if(!isWasmInitialized) {
901                         throw new Error("initializeWasm() must be awaited first!");
902                 }
903                 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
904                 return nativeResponseValue;
905         }
906
907
908
909 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
910
911                 export interface LDKEventsProvider {
912                         get_and_clear_pending_events (): number[];
913                 }
914
915                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
916             throw new Error('unimplemented'); // TODO: bind to WASM
917         }
918
919 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
920
921
922         // LDKCVec_EventZ EventsProvider_get_and_clear_pending_events LDKEventsProvider* this_arg
923         export function EventsProvider_get_and_clear_pending_events(this_arg: number): number[] {
924                 if(!isWasmInitialized) {
925                         throw new Error("initializeWasm() must be awaited first!");
926                 }
927                 const nativeResponseValue = wasm.EventsProvider_get_and_clear_pending_events(this_arg);
928                 return nativeResponseValue;
929         }
930
931
932
933 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
934
935                 export interface LDKAccess {
936                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
937                 }
938
939                 export function LDKAccess_new(impl: LDKAccess): number {
940             throw new Error('unimplemented'); // TODO: bind to WASM
941         }
942
943 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
944
945
946         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess* this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
947         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
948                 if(!isWasmInitialized) {
949                         throw new Error("initializeWasm() must be awaited first!");
950                 }
951                 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
952                 return nativeResponseValue;
953         }
954
955
956
957 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
958
959                 export interface LDKFilter {
960                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
961                         register_output (outpoint: number, script_pubkey: Uint8Array): void;
962                 }
963
964                 export function LDKFilter_new(impl: LDKFilter): number {
965             throw new Error('unimplemented'); // TODO: bind to WASM
966         }
967
968 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
969
970
971         // void Filter_register_tx LDKFilter* this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
972         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
973                 if(!isWasmInitialized) {
974                         throw new Error("initializeWasm() must be awaited first!");
975                 }
976                 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
977                 // debug statements here
978         }
979         // void Filter_register_output LDKFilter* this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey
980         export function Filter_register_output(this_arg: number, outpoint: number, script_pubkey: Uint8Array): void {
981                 if(!isWasmInitialized) {
982                         throw new Error("initializeWasm() must be awaited first!");
983                 }
984                 const nativeResponseValue = wasm.Filter_register_output(this_arg, outpoint, encodeArray(script_pubkey));
985                 // debug statements here
986         }
987
988
989
990 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
991
992                 export interface LDKPersist {
993                         persist_new_channel (id: number, data: number): number;
994                         update_persisted_channel (id: number, update: number, data: number): number;
995                 }
996
997                 export function LDKPersist_new(impl: LDKPersist): number {
998             throw new Error('unimplemented'); // TODO: bind to WASM
999         }
1000
1001 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1002
1003
1004         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist* this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1005         export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1006                 if(!isWasmInitialized) {
1007                         throw new Error("initializeWasm() must be awaited first!");
1008                 }
1009                 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1010                 return nativeResponseValue;
1011         }
1012         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist* this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
1013         export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1014                 if(!isWasmInitialized) {
1015                         throw new Error("initializeWasm() must be awaited first!");
1016                 }
1017                 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1018                 return nativeResponseValue;
1019         }
1020
1021
1022
1023 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1024
1025                 export interface LDKChannelMessageHandler {
1026                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1027                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1028                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1029                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1030                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1031                         handle_shutdown (their_node_id: Uint8Array, msg: number): void;
1032                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1033                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1034                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1035                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1036                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1037                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1038                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1039                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1040                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1041                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1042                         peer_connected (their_node_id: Uint8Array, msg: number): void;
1043                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1044                         handle_error (their_node_id: Uint8Array, msg: number): void;
1045                 }
1046
1047                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1048             throw new Error('unimplemented'); // TODO: bind to WASM
1049         }
1050
1051 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1052
1053
1054         // void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg
1055         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1056                 if(!isWasmInitialized) {
1057                         throw new Error("initializeWasm() must be awaited first!");
1058                 }
1059                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1060                 // debug statements here
1061         }
1062         // void ChannelMessageHandler_handle_accept_channel LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg
1063         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1064                 if(!isWasmInitialized) {
1065                         throw new Error("initializeWasm() must be awaited first!");
1066                 }
1067                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1068                 // debug statements here
1069         }
1070         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1071         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1072                 if(!isWasmInitialized) {
1073                         throw new Error("initializeWasm() must be awaited first!");
1074                 }
1075                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1076                 // debug statements here
1077         }
1078         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1079         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1080                 if(!isWasmInitialized) {
1081                         throw new Error("initializeWasm() must be awaited first!");
1082                 }
1083                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1084                 // debug statements here
1085         }
1086         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1087         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1088                 if(!isWasmInitialized) {
1089                         throw new Error("initializeWasm() must be awaited first!");
1090                 }
1091                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1092                 // debug statements here
1093         }
1094         // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKShutdown *NONNULL_PTR msg
1095         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1096                 if(!isWasmInitialized) {
1097                         throw new Error("initializeWasm() must be awaited first!");
1098                 }
1099                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), msg);
1100                 // debug statements here
1101         }
1102         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1103         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1104                 if(!isWasmInitialized) {
1105                         throw new Error("initializeWasm() must be awaited first!");
1106                 }
1107                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1108                 // debug statements here
1109         }
1110         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1111         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1112                 if(!isWasmInitialized) {
1113                         throw new Error("initializeWasm() must be awaited first!");
1114                 }
1115                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1116                 // debug statements here
1117         }
1118         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1119         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1120                 if(!isWasmInitialized) {
1121                         throw new Error("initializeWasm() must be awaited first!");
1122                 }
1123                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1124                 // debug statements here
1125         }
1126         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1127         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1128                 if(!isWasmInitialized) {
1129                         throw new Error("initializeWasm() must be awaited first!");
1130                 }
1131                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1132                 // debug statements here
1133         }
1134         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1135         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1136                 if(!isWasmInitialized) {
1137                         throw new Error("initializeWasm() must be awaited first!");
1138                 }
1139                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1140                 // debug statements here
1141         }
1142         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1143         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1144                 if(!isWasmInitialized) {
1145                         throw new Error("initializeWasm() must be awaited first!");
1146                 }
1147                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1148                 // debug statements here
1149         }
1150         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1151         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1152                 if(!isWasmInitialized) {
1153                         throw new Error("initializeWasm() must be awaited first!");
1154                 }
1155                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1156                 // debug statements here
1157         }
1158         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1159         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1160                 if(!isWasmInitialized) {
1161                         throw new Error("initializeWasm() must be awaited first!");
1162                 }
1163                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1164                 // debug statements here
1165         }
1166         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1167         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1168                 if(!isWasmInitialized) {
1169                         throw new Error("initializeWasm() must be awaited first!");
1170                 }
1171                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1172                 // debug statements here
1173         }
1174         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1175         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1176                 if(!isWasmInitialized) {
1177                         throw new Error("initializeWasm() must be awaited first!");
1178                 }
1179                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1180                 // debug statements here
1181         }
1182         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1183         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1184                 if(!isWasmInitialized) {
1185                         throw new Error("initializeWasm() must be awaited first!");
1186                 }
1187                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1188                 // debug statements here
1189         }
1190         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1191         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1192                 if(!isWasmInitialized) {
1193                         throw new Error("initializeWasm() must be awaited first!");
1194                 }
1195                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1196                 // debug statements here
1197         }
1198         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1199         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1200                 if(!isWasmInitialized) {
1201                         throw new Error("initializeWasm() must be awaited first!");
1202                 }
1203                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1204                 // debug statements here
1205         }
1206
1207
1208
1209 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1210
1211                 export interface LDKRoutingMessageHandler {
1212                         handle_node_announcement (msg: number): number;
1213                         handle_channel_announcement (msg: number): number;
1214                         handle_channel_update (msg: number): number;
1215                         handle_htlc_fail_channel_update (update: number): void;
1216                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1217                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1218                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
1219                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1220                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1221                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1222                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1223                 }
1224
1225                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1226             throw new Error('unimplemented'); // TODO: bind to WASM
1227         }
1228
1229 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1230
1231
1232         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler* this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1233         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1234                 if(!isWasmInitialized) {
1235                         throw new Error("initializeWasm() must be awaited first!");
1236                 }
1237                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1238                 return nativeResponseValue;
1239         }
1240         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler* this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1241         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1242                 if(!isWasmInitialized) {
1243                         throw new Error("initializeWasm() must be awaited first!");
1244                 }
1245                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1246                 return nativeResponseValue;
1247         }
1248         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler* this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1249         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1250                 if(!isWasmInitialized) {
1251                         throw new Error("initializeWasm() must be awaited first!");
1252                 }
1253                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1254                 return nativeResponseValue;
1255         }
1256         // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler* this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1257         export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1258                 if(!isWasmInitialized) {
1259                         throw new Error("initializeWasm() must be awaited first!");
1260                 }
1261                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1262                 // debug statements here
1263         }
1264         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler* this_arg, uint64_t starting_point, uint8_t batch_amount
1265         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1266                 if(!isWasmInitialized) {
1267                         throw new Error("initializeWasm() must be awaited first!");
1268                 }
1269                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1270                 return nativeResponseValue;
1271         }
1272         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler* this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1273         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1274                 if(!isWasmInitialized) {
1275                         throw new Error("initializeWasm() must be awaited first!");
1276                 }
1277                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1278                 return nativeResponseValue;
1279         }
1280         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1281         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1282                 if(!isWasmInitialized) {
1283                         throw new Error("initializeWasm() must be awaited first!");
1284                 }
1285                 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1286                 // debug statements here
1287         }
1288         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1289         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1290                 if(!isWasmInitialized) {
1291                         throw new Error("initializeWasm() must be awaited first!");
1292                 }
1293                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1294                 return nativeResponseValue;
1295         }
1296         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1297         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1298                 if(!isWasmInitialized) {
1299                         throw new Error("initializeWasm() must be awaited first!");
1300                 }
1301                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1302                 return nativeResponseValue;
1303         }
1304         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1305         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1306                 if(!isWasmInitialized) {
1307                         throw new Error("initializeWasm() must be awaited first!");
1308                 }
1309                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1310                 return nativeResponseValue;
1311         }
1312         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1313         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1314                 if(!isWasmInitialized) {
1315                         throw new Error("initializeWasm() must be awaited first!");
1316                 }
1317                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1318                 return nativeResponseValue;
1319         }
1320
1321
1322
1323 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1324
1325                 export interface LDKSocketDescriptor {
1326                         send_data (data: Uint8Array, resume_read: boolean): number;
1327                         disconnect_socket (): void;
1328                         eq (other_arg: number): boolean;
1329                         hash (): number;
1330                 }
1331
1332                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1333             throw new Error('unimplemented'); // TODO: bind to WASM
1334         }
1335
1336 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1337
1338
1339         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor* this_arg, struct LDKu8slice data, bool resume_read
1340         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1341                 if(!isWasmInitialized) {
1342                         throw new Error("initializeWasm() must be awaited first!");
1343                 }
1344                 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1345                 return nativeResponseValue;
1346         }
1347         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor* this_arg
1348         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1349                 if(!isWasmInitialized) {
1350                         throw new Error("initializeWasm() must be awaited first!");
1351                 }
1352                 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1353                 // debug statements here
1354         }
1355         // uint64_t SocketDescriptor_hash LDKSocketDescriptor* this_arg
1356         export function SocketDescriptor_hash(this_arg: number): number {
1357                 if(!isWasmInitialized) {
1358                         throw new Error("initializeWasm() must be awaited first!");
1359                 }
1360                 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1361                 return nativeResponseValue;
1362         }
1363         // void Transaction_free(struct LDKTransaction _res);
1364         export function Transaction_free(_res: Uint8Array): void {
1365                 if(!isWasmInitialized) {
1366                         throw new Error("initializeWasm() must be awaited first!");
1367                 }
1368                 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1369                 // debug statements here
1370         }
1371         // void TxOut_free(struct LDKTxOut _res);
1372         export function TxOut_free(_res: number): void {
1373                 if(!isWasmInitialized) {
1374                         throw new Error("initializeWasm() must be awaited first!");
1375                 }
1376                 const nativeResponseValue = wasm.TxOut_free(_res);
1377                 // debug statements here
1378         }
1379         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
1380         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
1381                 if(!isWasmInitialized) {
1382                         throw new Error("initializeWasm() must be awaited first!");
1383                 }
1384                 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
1385                 // debug statements here
1386         }
1387         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
1388         export function CVec_MessageSendEventZ_free(_res: number[]): void {
1389                 if(!isWasmInitialized) {
1390                         throw new Error("initializeWasm() must be awaited first!");
1391                 }
1392                 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
1393                 // debug statements here
1394         }
1395         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
1396         export function CVec_EventZ_free(_res: number[]): void {
1397                 if(!isWasmInitialized) {
1398                         throw new Error("initializeWasm() must be awaited first!");
1399                 }
1400                 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
1401                 // debug statements here
1402         }
1403         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
1404         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
1405                 if(!isWasmInitialized) {
1406                         throw new Error("initializeWasm() must be awaited first!");
1407                 }
1408                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
1409                 // debug statements here
1410         }
1411         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
1412         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
1413                 if(!isWasmInitialized) {
1414                         throw new Error("initializeWasm() must be awaited first!");
1415                 }
1416                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
1417                 return nativeResponseValue;
1418         }
1419         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
1420         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
1421                 if(!isWasmInitialized) {
1422                         throw new Error("initializeWasm() must be awaited first!");
1423                 }
1424                 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
1425                 // debug statements here
1426         }
1427         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
1428         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
1429                 if(!isWasmInitialized) {
1430                         throw new Error("initializeWasm() must be awaited first!");
1431                 }
1432                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
1433                 return nativeResponseValue;
1434         }
1435         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
1436         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
1437                 if(!isWasmInitialized) {
1438                         throw new Error("initializeWasm() must be awaited first!");
1439                 }
1440                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
1441                 return nativeResponseValue;
1442         }
1443         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
1444         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
1445                 if(!isWasmInitialized) {
1446                         throw new Error("initializeWasm() must be awaited first!");
1447                 }
1448                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
1449                 // debug statements here
1450         }
1451         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
1452         export function CVec_MonitorEventZ_free(_res: number[]): void {
1453                 if(!isWasmInitialized) {
1454                         throw new Error("initializeWasm() must be awaited first!");
1455                 }
1456                 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
1457                 // debug statements here
1458         }
1459         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
1460         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
1461                 if(!isWasmInitialized) {
1462                         throw new Error("initializeWasm() must be awaited first!");
1463                 }
1464                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
1465                 return nativeResponseValue;
1466         }
1467         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
1468         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
1469                 if(!isWasmInitialized) {
1470                         throw new Error("initializeWasm() must be awaited first!");
1471                 }
1472                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
1473                 return nativeResponseValue;
1474         }
1475         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
1476         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
1477                 if(!isWasmInitialized) {
1478                         throw new Error("initializeWasm() must be awaited first!");
1479                 }
1480                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
1481                 // debug statements here
1482         }
1483         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
1484         export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
1485                 if(!isWasmInitialized) {
1486                         throw new Error("initializeWasm() must be awaited first!");
1487                 }
1488                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
1489                 return nativeResponseValue;
1490         }
1491         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
1492         export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
1493                 if(!isWasmInitialized) {
1494                         throw new Error("initializeWasm() must be awaited first!");
1495                 }
1496                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
1497                 return nativeResponseValue;
1498         }
1499         // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
1500         export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
1501                 if(!isWasmInitialized) {
1502                         throw new Error("initializeWasm() must be awaited first!");
1503                 }
1504                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
1505                 // debug statements here
1506         }
1507         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
1508         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
1509                 if(!isWasmInitialized) {
1510                         throw new Error("initializeWasm() must be awaited first!");
1511                 }
1512                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
1513                 // debug statements here
1514         }
1515         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
1516         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
1517                 if(!isWasmInitialized) {
1518                         throw new Error("initializeWasm() must be awaited first!");
1519                 }
1520                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
1521                 return nativeResponseValue;
1522         }
1523         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
1524         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
1525                 if(!isWasmInitialized) {
1526                         throw new Error("initializeWasm() must be awaited first!");
1527                 }
1528                 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
1529                 // debug statements here
1530         }
1531         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
1532         export function C2Tuple_u32TxOutZ_free(_res: number): void {
1533                 if(!isWasmInitialized) {
1534                         throw new Error("initializeWasm() must be awaited first!");
1535                 }
1536                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
1537                 // debug statements here
1538         }
1539         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
1540         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
1541                 if(!isWasmInitialized) {
1542                         throw new Error("initializeWasm() must be awaited first!");
1543                 }
1544                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
1545                 return nativeResponseValue;
1546         }
1547         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
1548         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
1549                 if(!isWasmInitialized) {
1550                         throw new Error("initializeWasm() must be awaited first!");
1551                 }
1552                 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
1553                 // debug statements here
1554         }
1555         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
1556         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
1557                 if(!isWasmInitialized) {
1558                         throw new Error("initializeWasm() must be awaited first!");
1559                 }
1560                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
1561                 // debug statements here
1562         }
1563         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
1564         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
1565                 if(!isWasmInitialized) {
1566                         throw new Error("initializeWasm() must be awaited first!");
1567                 }
1568                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
1569                 return nativeResponseValue;
1570         }
1571         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
1572         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
1573                 if(!isWasmInitialized) {
1574                         throw new Error("initializeWasm() must be awaited first!");
1575                 }
1576                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
1577                 // debug statements here
1578         }
1579         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
1580         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
1581                 if(!isWasmInitialized) {
1582                         throw new Error("initializeWasm() must be awaited first!");
1583                 }
1584                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
1585                 // debug statements here
1586         }
1587         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
1588         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
1589                 if(!isWasmInitialized) {
1590                         throw new Error("initializeWasm() must be awaited first!");
1591                 }
1592                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
1593                 return nativeResponseValue;
1594         }
1595         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
1596         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
1597                 if(!isWasmInitialized) {
1598                         throw new Error("initializeWasm() must be awaited first!");
1599                 }
1600                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
1601                 return nativeResponseValue;
1602         }
1603         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
1604         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
1605                 if(!isWasmInitialized) {
1606                         throw new Error("initializeWasm() must be awaited first!");
1607                 }
1608                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
1609                 return nativeResponseValue;
1610         }
1611         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
1612         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
1613                 if(!isWasmInitialized) {
1614                         throw new Error("initializeWasm() must be awaited first!");
1615                 }
1616                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
1617                 // debug statements here
1618         }
1619         // void C2Tuple_u64u64Z_free(struct LDKC2Tuple_u64u64Z _res);
1620         export function C2Tuple_u64u64Z_free(_res: number): void {
1621                 if(!isWasmInitialized) {
1622                         throw new Error("initializeWasm() must be awaited first!");
1623                 }
1624                 const nativeResponseValue = wasm.C2Tuple_u64u64Z_free(_res);
1625                 // debug statements here
1626         }
1627         // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
1628         export function C2Tuple_u64u64Z_new(a: number, b: number): number {
1629                 if(!isWasmInitialized) {
1630                         throw new Error("initializeWasm() must be awaited first!");
1631                 }
1632                 const nativeResponseValue = wasm.C2Tuple_u64u64Z_new(a, b);
1633                 return nativeResponseValue;
1634         }
1635         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
1636         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
1637                 if(!isWasmInitialized) {
1638                         throw new Error("initializeWasm() must be awaited first!");
1639                 }
1640                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
1641                 return nativeResponseValue;
1642         }
1643         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
1644         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
1645                 if(!isWasmInitialized) {
1646                         throw new Error("initializeWasm() must be awaited first!");
1647                 }
1648                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
1649                 return nativeResponseValue;
1650         }
1651         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
1652         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
1653                 if(!isWasmInitialized) {
1654                         throw new Error("initializeWasm() must be awaited first!");
1655                 }
1656                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
1657                 // debug statements here
1658         }
1659         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
1660         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
1661                 if(!isWasmInitialized) {
1662                         throw new Error("initializeWasm() must be awaited first!");
1663                 }
1664                 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
1665                 // debug statements here
1666         }
1667         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
1668         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
1669                 if(!isWasmInitialized) {
1670                         throw new Error("initializeWasm() must be awaited first!");
1671                 }
1672                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
1673                 // debug statements here
1674         }
1675         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
1676         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
1677                 if(!isWasmInitialized) {
1678                         throw new Error("initializeWasm() must be awaited first!");
1679                 }
1680                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
1681                 return nativeResponseValue;
1682         }
1683         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
1684         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
1685                 if(!isWasmInitialized) {
1686                         throw new Error("initializeWasm() must be awaited first!");
1687                 }
1688                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
1689                 return nativeResponseValue;
1690         }
1691         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
1692         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
1693                 if(!isWasmInitialized) {
1694                         throw new Error("initializeWasm() must be awaited first!");
1695                 }
1696                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
1697                 return nativeResponseValue;
1698         }
1699         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
1700         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
1701                 if(!isWasmInitialized) {
1702                         throw new Error("initializeWasm() must be awaited first!");
1703                 }
1704                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
1705                 // debug statements here
1706         }
1707         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
1708         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
1709                 if(!isWasmInitialized) {
1710                         throw new Error("initializeWasm() must be awaited first!");
1711                 }
1712                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
1713                 return nativeResponseValue;
1714         }
1715         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
1716         export function CResult_SignatureNoneZ_err(): number {
1717                 if(!isWasmInitialized) {
1718                         throw new Error("initializeWasm() must be awaited first!");
1719                 }
1720                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
1721                 return nativeResponseValue;
1722         }
1723         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
1724         export function CResult_SignatureNoneZ_free(_res: number): void {
1725                 if(!isWasmInitialized) {
1726                         throw new Error("initializeWasm() must be awaited first!");
1727                 }
1728                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
1729                 // debug statements here
1730         }
1731         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
1732         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
1733                 if(!isWasmInitialized) {
1734                         throw new Error("initializeWasm() must be awaited first!");
1735                 }
1736                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
1737                 return nativeResponseValue;
1738         }
1739         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
1740         export function CResult_CVec_SignatureZNoneZ_err(): number {
1741                 if(!isWasmInitialized) {
1742                         throw new Error("initializeWasm() must be awaited first!");
1743                 }
1744                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
1745                 return nativeResponseValue;
1746         }
1747         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
1748         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
1749                 if(!isWasmInitialized) {
1750                         throw new Error("initializeWasm() must be awaited first!");
1751                 }
1752                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
1753                 // debug statements here
1754         }
1755         // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_ok(struct LDKChannelKeys o);
1756         export function CResult_ChanKeySignerDecodeErrorZ_ok(o: number): number {
1757                 if(!isWasmInitialized) {
1758                         throw new Error("initializeWasm() must be awaited first!");
1759                 }
1760                 const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_ok(o);
1761                 return nativeResponseValue;
1762         }
1763         // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_err(struct LDKDecodeError e);
1764         export function CResult_ChanKeySignerDecodeErrorZ_err(e: number): number {
1765                 if(!isWasmInitialized) {
1766                         throw new Error("initializeWasm() must be awaited first!");
1767                 }
1768                 const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_err(e);
1769                 return nativeResponseValue;
1770         }
1771         // void CResult_ChanKeySignerDecodeErrorZ_free(struct LDKCResult_ChanKeySignerDecodeErrorZ _res);
1772         export function CResult_ChanKeySignerDecodeErrorZ_free(_res: number): void {
1773                 if(!isWasmInitialized) {
1774                         throw new Error("initializeWasm() must be awaited first!");
1775                 }
1776                 const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_free(_res);
1777                 // debug statements here
1778         }
1779         // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_ok(struct LDKInMemoryChannelKeys o);
1780         export function CResult_InMemoryChannelKeysDecodeErrorZ_ok(o: number): number {
1781                 if(!isWasmInitialized) {
1782                         throw new Error("initializeWasm() must be awaited first!");
1783                 }
1784                 const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_ok(o);
1785                 return nativeResponseValue;
1786         }
1787         // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_err(struct LDKDecodeError e);
1788         export function CResult_InMemoryChannelKeysDecodeErrorZ_err(e: number): number {
1789                 if(!isWasmInitialized) {
1790                         throw new Error("initializeWasm() must be awaited first!");
1791                 }
1792                 const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_err(e);
1793                 return nativeResponseValue;
1794         }
1795         // void CResult_InMemoryChannelKeysDecodeErrorZ_free(struct LDKCResult_InMemoryChannelKeysDecodeErrorZ _res);
1796         export function CResult_InMemoryChannelKeysDecodeErrorZ_free(_res: number): void {
1797                 if(!isWasmInitialized) {
1798                         throw new Error("initializeWasm() must be awaited first!");
1799                 }
1800                 const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_free(_res);
1801                 // debug statements here
1802         }
1803         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
1804         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
1805                 if(!isWasmInitialized) {
1806                         throw new Error("initializeWasm() must be awaited first!");
1807                 }
1808                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
1809                 return nativeResponseValue;
1810         }
1811         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
1812         export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
1813                 if(!isWasmInitialized) {
1814                         throw new Error("initializeWasm() must be awaited first!");
1815                 }
1816                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
1817                 return nativeResponseValue;
1818         }
1819         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
1820         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
1821                 if(!isWasmInitialized) {
1822                         throw new Error("initializeWasm() must be awaited first!");
1823                 }
1824                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
1825                 // debug statements here
1826         }
1827         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
1828         export function CResult_NoneAPIErrorZ_ok(): number {
1829                 if(!isWasmInitialized) {
1830                         throw new Error("initializeWasm() must be awaited first!");
1831                 }
1832                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
1833                 return nativeResponseValue;
1834         }
1835         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
1836         export function CResult_NoneAPIErrorZ_err(e: number): number {
1837                 if(!isWasmInitialized) {
1838                         throw new Error("initializeWasm() must be awaited first!");
1839                 }
1840                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
1841                 return nativeResponseValue;
1842         }
1843         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
1844         export function CResult_NoneAPIErrorZ_free(_res: number): void {
1845                 if(!isWasmInitialized) {
1846                         throw new Error("initializeWasm() must be awaited first!");
1847                 }
1848                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
1849                 // debug statements here
1850         }
1851         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
1852         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
1853                 if(!isWasmInitialized) {
1854                         throw new Error("initializeWasm() must be awaited first!");
1855                 }
1856                 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
1857                 // debug statements here
1858         }
1859         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
1860         export function CResult_NonePaymentSendFailureZ_ok(): number {
1861                 if(!isWasmInitialized) {
1862                         throw new Error("initializeWasm() must be awaited first!");
1863                 }
1864                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
1865                 return nativeResponseValue;
1866         }
1867         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
1868         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
1869                 if(!isWasmInitialized) {
1870                         throw new Error("initializeWasm() must be awaited first!");
1871                 }
1872                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
1873                 return nativeResponseValue;
1874         }
1875         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
1876         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
1877                 if(!isWasmInitialized) {
1878                         throw new Error("initializeWasm() must be awaited first!");
1879                 }
1880                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
1881                 // debug statements here
1882         }
1883         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
1884         export function CVec_NetAddressZ_free(_res: number[]): void {
1885                 if(!isWasmInitialized) {
1886                         throw new Error("initializeWasm() must be awaited first!");
1887                 }
1888                 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
1889                 // debug statements here
1890         }
1891         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
1892         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
1893                 if(!isWasmInitialized) {
1894                         throw new Error("initializeWasm() must be awaited first!");
1895                 }
1896                 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
1897                 // debug statements here
1898         }
1899         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
1900         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
1901                 if(!isWasmInitialized) {
1902                         throw new Error("initializeWasm() must be awaited first!");
1903                 }
1904                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
1905                 // debug statements here
1906         }
1907         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
1908         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
1909                 if(!isWasmInitialized) {
1910                         throw new Error("initializeWasm() must be awaited first!");
1911                 }
1912                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
1913                 return nativeResponseValue;
1914         }
1915         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
1916         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
1917                 if(!isWasmInitialized) {
1918                         throw new Error("initializeWasm() must be awaited first!");
1919                 }
1920                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
1921                 return nativeResponseValue;
1922         }
1923         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
1924         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
1925                 if(!isWasmInitialized) {
1926                         throw new Error("initializeWasm() must be awaited first!");
1927                 }
1928                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
1929                 return nativeResponseValue;
1930         }
1931         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
1932         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
1933                 if(!isWasmInitialized) {
1934                         throw new Error("initializeWasm() must be awaited first!");
1935                 }
1936                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
1937                 // debug statements here
1938         }
1939         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
1940         export function CResult_NetAddressu8Z_ok(o: number): number {
1941                 if(!isWasmInitialized) {
1942                         throw new Error("initializeWasm() must be awaited first!");
1943                 }
1944                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
1945                 return nativeResponseValue;
1946         }
1947         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
1948         export function CResult_NetAddressu8Z_err(e: number): number {
1949                 if(!isWasmInitialized) {
1950                         throw new Error("initializeWasm() must be awaited first!");
1951                 }
1952                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
1953                 return nativeResponseValue;
1954         }
1955         // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
1956         export function CResult_NetAddressu8Z_free(_res: number): void {
1957                 if(!isWasmInitialized) {
1958                         throw new Error("initializeWasm() must be awaited first!");
1959                 }
1960                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
1961                 // debug statements here
1962         }
1963         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
1964         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
1965                 if(!isWasmInitialized) {
1966                         throw new Error("initializeWasm() must be awaited first!");
1967                 }
1968                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
1969                 return nativeResponseValue;
1970         }
1971         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
1972         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
1973                 if(!isWasmInitialized) {
1974                         throw new Error("initializeWasm() must be awaited first!");
1975                 }
1976                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
1977                 return nativeResponseValue;
1978         }
1979         // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
1980         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
1981                 if(!isWasmInitialized) {
1982                         throw new Error("initializeWasm() must be awaited first!");
1983                 }
1984                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
1985                 // debug statements here
1986         }
1987         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
1988         export function CVec_u64Z_free(_res: number[]): void {
1989                 if(!isWasmInitialized) {
1990                         throw new Error("initializeWasm() must be awaited first!");
1991                 }
1992                 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
1993                 // debug statements here
1994         }
1995         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
1996         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
1997                 if(!isWasmInitialized) {
1998                         throw new Error("initializeWasm() must be awaited first!");
1999                 }
2000                 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
2001                 // debug statements here
2002         }
2003         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
2004         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
2005                 if(!isWasmInitialized) {
2006                         throw new Error("initializeWasm() must be awaited first!");
2007                 }
2008                 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
2009                 // debug statements here
2010         }
2011         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
2012         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
2013                 if(!isWasmInitialized) {
2014                         throw new Error("initializeWasm() must be awaited first!");
2015                 }
2016                 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
2017                 // debug statements here
2018         }
2019         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
2020         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
2021                 if(!isWasmInitialized) {
2022                         throw new Error("initializeWasm() must be awaited first!");
2023                 }
2024                 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
2025                 // debug statements here
2026         }
2027         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
2028         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
2029                 if(!isWasmInitialized) {
2030                         throw new Error("initializeWasm() must be awaited first!");
2031                 }
2032                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
2033                 return nativeResponseValue;
2034         }
2035         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
2036         export function CResult_boolLightningErrorZ_err(e: number): number {
2037                 if(!isWasmInitialized) {
2038                         throw new Error("initializeWasm() must be awaited first!");
2039                 }
2040                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
2041                 return nativeResponseValue;
2042         }
2043         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
2044         export function CResult_boolLightningErrorZ_free(_res: number): void {
2045                 if(!isWasmInitialized) {
2046                         throw new Error("initializeWasm() must be awaited first!");
2047                 }
2048                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
2049                 // debug statements here
2050         }
2051         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
2052         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
2053                 if(!isWasmInitialized) {
2054                         throw new Error("initializeWasm() must be awaited first!");
2055                 }
2056                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
2057                 // debug statements here
2058         }
2059         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
2060         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
2061                 if(!isWasmInitialized) {
2062                         throw new Error("initializeWasm() must be awaited first!");
2063                 }
2064                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
2065                 return nativeResponseValue;
2066         }
2067         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
2068         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
2069                 if(!isWasmInitialized) {
2070                         throw new Error("initializeWasm() must be awaited first!");
2071                 }
2072                 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
2073                 // debug statements here
2074         }
2075         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
2076         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
2077                 if(!isWasmInitialized) {
2078                         throw new Error("initializeWasm() must be awaited first!");
2079                 }
2080                 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
2081                 // debug statements here
2082         }
2083         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
2084         export function CResult_NoneLightningErrorZ_ok(): number {
2085                 if(!isWasmInitialized) {
2086                         throw new Error("initializeWasm() must be awaited first!");
2087                 }
2088                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
2089                 return nativeResponseValue;
2090         }
2091         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
2092         export function CResult_NoneLightningErrorZ_err(e: number): number {
2093                 if(!isWasmInitialized) {
2094                         throw new Error("initializeWasm() must be awaited first!");
2095                 }
2096                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
2097                 return nativeResponseValue;
2098         }
2099         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
2100         export function CResult_NoneLightningErrorZ_free(_res: number): void {
2101                 if(!isWasmInitialized) {
2102                         throw new Error("initializeWasm() must be awaited first!");
2103                 }
2104                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
2105                 // debug statements here
2106         }
2107         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
2108         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
2109                 if(!isWasmInitialized) {
2110                         throw new Error("initializeWasm() must be awaited first!");
2111                 }
2112                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
2113                 return nativeResponseValue;
2114         }
2115         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
2116         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
2117                 if(!isWasmInitialized) {
2118                         throw new Error("initializeWasm() must be awaited first!");
2119                 }
2120                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
2121                 return nativeResponseValue;
2122         }
2123         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
2124         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
2125                 if(!isWasmInitialized) {
2126                         throw new Error("initializeWasm() must be awaited first!");
2127                 }
2128                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
2129                 // debug statements here
2130         }
2131         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
2132         export function CResult_InitDecodeErrorZ_ok(o: number): number {
2133                 if(!isWasmInitialized) {
2134                         throw new Error("initializeWasm() must be awaited first!");
2135                 }
2136                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
2137                 return nativeResponseValue;
2138         }
2139         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
2140         export function CResult_InitDecodeErrorZ_err(e: number): number {
2141                 if(!isWasmInitialized) {
2142                         throw new Error("initializeWasm() must be awaited first!");
2143                 }
2144                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
2145                 return nativeResponseValue;
2146         }
2147         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
2148         export function CResult_InitDecodeErrorZ_free(_res: number): void {
2149                 if(!isWasmInitialized) {
2150                         throw new Error("initializeWasm() must be awaited first!");
2151                 }
2152                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
2153                 // debug statements here
2154         }
2155         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
2156         export function CResult_PingDecodeErrorZ_ok(o: number): number {
2157                 if(!isWasmInitialized) {
2158                         throw new Error("initializeWasm() must be awaited first!");
2159                 }
2160                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
2161                 return nativeResponseValue;
2162         }
2163         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
2164         export function CResult_PingDecodeErrorZ_err(e: number): number {
2165                 if(!isWasmInitialized) {
2166                         throw new Error("initializeWasm() must be awaited first!");
2167                 }
2168                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
2169                 return nativeResponseValue;
2170         }
2171         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
2172         export function CResult_PingDecodeErrorZ_free(_res: number): void {
2173                 if(!isWasmInitialized) {
2174                         throw new Error("initializeWasm() must be awaited first!");
2175                 }
2176                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
2177                 // debug statements here
2178         }
2179         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
2180         export function CResult_PongDecodeErrorZ_ok(o: number): number {
2181                 if(!isWasmInitialized) {
2182                         throw new Error("initializeWasm() must be awaited first!");
2183                 }
2184                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
2185                 return nativeResponseValue;
2186         }
2187         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
2188         export function CResult_PongDecodeErrorZ_err(e: number): number {
2189                 if(!isWasmInitialized) {
2190                         throw new Error("initializeWasm() must be awaited first!");
2191                 }
2192                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
2193                 return nativeResponseValue;
2194         }
2195         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
2196         export function CResult_PongDecodeErrorZ_free(_res: number): void {
2197                 if(!isWasmInitialized) {
2198                         throw new Error("initializeWasm() must be awaited first!");
2199                 }
2200                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
2201                 // debug statements here
2202         }
2203         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
2204         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
2205                 if(!isWasmInitialized) {
2206                         throw new Error("initializeWasm() must be awaited first!");
2207                 }
2208                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
2209                 return nativeResponseValue;
2210         }
2211         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
2212         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
2213                 if(!isWasmInitialized) {
2214                         throw new Error("initializeWasm() must be awaited first!");
2215                 }
2216                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
2217                 return nativeResponseValue;
2218         }
2219         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
2220         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
2221                 if(!isWasmInitialized) {
2222                         throw new Error("initializeWasm() must be awaited first!");
2223                 }
2224                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
2225                 // debug statements here
2226         }
2227         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
2228         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
2229                 if(!isWasmInitialized) {
2230                         throw new Error("initializeWasm() must be awaited first!");
2231                 }
2232                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
2233                 return nativeResponseValue;
2234         }
2235         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2236         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
2237                 if(!isWasmInitialized) {
2238                         throw new Error("initializeWasm() must be awaited first!");
2239                 }
2240                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
2241                 return nativeResponseValue;
2242         }
2243         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
2244         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
2245                 if(!isWasmInitialized) {
2246                         throw new Error("initializeWasm() must be awaited first!");
2247                 }
2248                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
2249                 // debug statements here
2250         }
2251         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
2252         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
2253                 if(!isWasmInitialized) {
2254                         throw new Error("initializeWasm() must be awaited first!");
2255                 }
2256                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
2257                 return nativeResponseValue;
2258         }
2259         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
2260         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
2261                 if(!isWasmInitialized) {
2262                         throw new Error("initializeWasm() must be awaited first!");
2263                 }
2264                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
2265                 return nativeResponseValue;
2266         }
2267         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
2268         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
2269                 if(!isWasmInitialized) {
2270                         throw new Error("initializeWasm() must be awaited first!");
2271                 }
2272                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
2273                 // debug statements here
2274         }
2275         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
2276         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
2277                 if(!isWasmInitialized) {
2278                         throw new Error("initializeWasm() must be awaited first!");
2279                 }
2280                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
2281                 return nativeResponseValue;
2282         }
2283         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
2284         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
2285                 if(!isWasmInitialized) {
2286                         throw new Error("initializeWasm() must be awaited first!");
2287                 }
2288                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
2289                 return nativeResponseValue;
2290         }
2291         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
2292         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
2293                 if(!isWasmInitialized) {
2294                         throw new Error("initializeWasm() must be awaited first!");
2295                 }
2296                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
2297                 // debug statements here
2298         }
2299         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
2300         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
2301                 if(!isWasmInitialized) {
2302                         throw new Error("initializeWasm() must be awaited first!");
2303                 }
2304                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
2305                 return nativeResponseValue;
2306         }
2307         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
2308         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
2309                 if(!isWasmInitialized) {
2310                         throw new Error("initializeWasm() must be awaited first!");
2311                 }
2312                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
2313                 return nativeResponseValue;
2314         }
2315         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
2316         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
2317                 if(!isWasmInitialized) {
2318                         throw new Error("initializeWasm() must be awaited first!");
2319                 }
2320                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
2321                 // debug statements here
2322         }
2323         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
2324         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
2325                 if(!isWasmInitialized) {
2326                         throw new Error("initializeWasm() must be awaited first!");
2327                 }
2328                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
2329                 return nativeResponseValue;
2330         }
2331         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
2332         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
2333                 if(!isWasmInitialized) {
2334                         throw new Error("initializeWasm() must be awaited first!");
2335                 }
2336                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
2337                 return nativeResponseValue;
2338         }
2339         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
2340         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
2341                 if(!isWasmInitialized) {
2342                         throw new Error("initializeWasm() must be awaited first!");
2343                 }
2344                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
2345                 // debug statements here
2346         }
2347         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
2348         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
2349                 if(!isWasmInitialized) {
2350                         throw new Error("initializeWasm() must be awaited first!");
2351                 }
2352                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
2353                 return nativeResponseValue;
2354         }
2355         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
2356         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
2357                 if(!isWasmInitialized) {
2358                         throw new Error("initializeWasm() must be awaited first!");
2359                 }
2360                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
2361                 return nativeResponseValue;
2362         }
2363         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
2364         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
2365                 if(!isWasmInitialized) {
2366                         throw new Error("initializeWasm() must be awaited first!");
2367                 }
2368                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
2369                 // debug statements here
2370         }
2371         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
2372         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
2373                 if(!isWasmInitialized) {
2374                         throw new Error("initializeWasm() must be awaited first!");
2375                 }
2376                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
2377                 return nativeResponseValue;
2378         }
2379         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
2380         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
2381                 if(!isWasmInitialized) {
2382                         throw new Error("initializeWasm() must be awaited first!");
2383                 }
2384                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
2385                 return nativeResponseValue;
2386         }
2387         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
2388         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
2389                 if(!isWasmInitialized) {
2390                         throw new Error("initializeWasm() must be awaited first!");
2391                 }
2392                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
2393                 // debug statements here
2394         }
2395         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
2396         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
2397                 if(!isWasmInitialized) {
2398                         throw new Error("initializeWasm() must be awaited first!");
2399                 }
2400                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
2401                 return nativeResponseValue;
2402         }
2403         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
2404         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
2405                 if(!isWasmInitialized) {
2406                         throw new Error("initializeWasm() must be awaited first!");
2407                 }
2408                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
2409                 return nativeResponseValue;
2410         }
2411         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
2412         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
2413                 if(!isWasmInitialized) {
2414                         throw new Error("initializeWasm() must be awaited first!");
2415                 }
2416                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
2417                 // debug statements here
2418         }
2419         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
2420         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
2421                 if(!isWasmInitialized) {
2422                         throw new Error("initializeWasm() must be awaited first!");
2423                 }
2424                 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
2425                 // debug statements here
2426         }
2427         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
2428         export function CVec_u8Z_free(_res: Uint8Array): void {
2429                 if(!isWasmInitialized) {
2430                         throw new Error("initializeWasm() must be awaited first!");
2431                 }
2432                 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
2433                 // debug statements here
2434         }
2435         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
2436         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
2437                 if(!isWasmInitialized) {
2438                         throw new Error("initializeWasm() must be awaited first!");
2439                 }
2440                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
2441                 return nativeResponseValue;
2442         }
2443         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2444         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
2445                 if(!isWasmInitialized) {
2446                         throw new Error("initializeWasm() must be awaited first!");
2447                 }
2448                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
2449                 return nativeResponseValue;
2450         }
2451         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
2452         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
2453                 if(!isWasmInitialized) {
2454                         throw new Error("initializeWasm() must be awaited first!");
2455                 }
2456                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
2457                 // debug statements here
2458         }
2459         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
2460         export function CResult_NonePeerHandleErrorZ_ok(): number {
2461                 if(!isWasmInitialized) {
2462                         throw new Error("initializeWasm() must be awaited first!");
2463                 }
2464                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
2465                 return nativeResponseValue;
2466         }
2467         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
2468         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
2469                 if(!isWasmInitialized) {
2470                         throw new Error("initializeWasm() must be awaited first!");
2471                 }
2472                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
2473                 return nativeResponseValue;
2474         }
2475         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
2476         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
2477                 if(!isWasmInitialized) {
2478                         throw new Error("initializeWasm() must be awaited first!");
2479                 }
2480                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
2481                 // debug statements here
2482         }
2483         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
2484         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
2485                 if(!isWasmInitialized) {
2486                         throw new Error("initializeWasm() must be awaited first!");
2487                 }
2488                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
2489                 return nativeResponseValue;
2490         }
2491         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2492         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
2493                 if(!isWasmInitialized) {
2494                         throw new Error("initializeWasm() must be awaited first!");
2495                 }
2496                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
2497                 return nativeResponseValue;
2498         }
2499         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
2500         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
2501                 if(!isWasmInitialized) {
2502                         throw new Error("initializeWasm() must be awaited first!");
2503                 }
2504                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
2505                 // debug statements here
2506         }
2507         // struct LDKCResult_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_ok(struct LDKSecretKey o);
2508         export function CResult_SecretKeySecpErrorZ_ok(o: Uint8Array): number {
2509                 if(!isWasmInitialized) {
2510                         throw new Error("initializeWasm() must be awaited first!");
2511                 }
2512                 const nativeResponseValue = wasm.CResult_SecretKeySecpErrorZ_ok(encodeArray(o));
2513                 return nativeResponseValue;
2514         }
2515         // struct LDKCResult_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_err(enum LDKSecp256k1Error e);
2516         export function CResult_SecretKeySecpErrorZ_err(e: LDKSecp256k1Error): number {
2517                 if(!isWasmInitialized) {
2518                         throw new Error("initializeWasm() must be awaited first!");
2519                 }
2520                 const nativeResponseValue = wasm.CResult_SecretKeySecpErrorZ_err(e);
2521                 return nativeResponseValue;
2522         }
2523         // void CResult_SecretKeySecpErrorZ_free(struct LDKCResult_SecretKeySecpErrorZ _res);
2524         export function CResult_SecretKeySecpErrorZ_free(_res: number): void {
2525                 if(!isWasmInitialized) {
2526                         throw new Error("initializeWasm() must be awaited first!");
2527                 }
2528                 const nativeResponseValue = wasm.CResult_SecretKeySecpErrorZ_free(_res);
2529                 // debug statements here
2530         }
2531         // struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_ok(struct LDKPublicKey o);
2532         export function CResult_PublicKeySecpErrorZ_ok(o: Uint8Array): number {
2533                 if(!isWasmInitialized) {
2534                         throw new Error("initializeWasm() must be awaited first!");
2535                 }
2536                 const nativeResponseValue = wasm.CResult_PublicKeySecpErrorZ_ok(encodeArray(o));
2537                 return nativeResponseValue;
2538         }
2539         // struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_err(enum LDKSecp256k1Error e);
2540         export function CResult_PublicKeySecpErrorZ_err(e: LDKSecp256k1Error): number {
2541                 if(!isWasmInitialized) {
2542                         throw new Error("initializeWasm() must be awaited first!");
2543                 }
2544                 const nativeResponseValue = wasm.CResult_PublicKeySecpErrorZ_err(e);
2545                 return nativeResponseValue;
2546         }
2547         // void CResult_PublicKeySecpErrorZ_free(struct LDKCResult_PublicKeySecpErrorZ _res);
2548         export function CResult_PublicKeySecpErrorZ_free(_res: number): void {
2549                 if(!isWasmInitialized) {
2550                         throw new Error("initializeWasm() must be awaited first!");
2551                 }
2552                 const nativeResponseValue = wasm.CResult_PublicKeySecpErrorZ_free(_res);
2553                 // debug statements here
2554         }
2555         // struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_ok(struct LDKTxCreationKeys o);
2556         export function CResult_TxCreationKeysSecpErrorZ_ok(o: number): number {
2557                 if(!isWasmInitialized) {
2558                         throw new Error("initializeWasm() must be awaited first!");
2559                 }
2560                 const nativeResponseValue = wasm.CResult_TxCreationKeysSecpErrorZ_ok(o);
2561                 return nativeResponseValue;
2562         }
2563         // struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_err(enum LDKSecp256k1Error e);
2564         export function CResult_TxCreationKeysSecpErrorZ_err(e: LDKSecp256k1Error): number {
2565                 if(!isWasmInitialized) {
2566                         throw new Error("initializeWasm() must be awaited first!");
2567                 }
2568                 const nativeResponseValue = wasm.CResult_TxCreationKeysSecpErrorZ_err(e);
2569                 return nativeResponseValue;
2570         }
2571         // void CResult_TxCreationKeysSecpErrorZ_free(struct LDKCResult_TxCreationKeysSecpErrorZ _res);
2572         export function CResult_TxCreationKeysSecpErrorZ_free(_res: number): void {
2573                 if(!isWasmInitialized) {
2574                         throw new Error("initializeWasm() must be awaited first!");
2575                 }
2576                 const nativeResponseValue = wasm.CResult_TxCreationKeysSecpErrorZ_free(_res);
2577                 // debug statements here
2578         }
2579         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2580         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2581                 if(!isWasmInitialized) {
2582                         throw new Error("initializeWasm() must be awaited first!");
2583                 }
2584                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
2585                 return nativeResponseValue;
2586         }
2587         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
2588         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
2589                 if(!isWasmInitialized) {
2590                         throw new Error("initializeWasm() must be awaited first!");
2591                 }
2592                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2593                 return nativeResponseValue;
2594         }
2595         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2596         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2597                 if(!isWasmInitialized) {
2598                         throw new Error("initializeWasm() must be awaited first!");
2599                 }
2600                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2601                 // debug statements here
2602         }
2603         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
2604         export function CVec_RouteHopZ_free(_res: number[]): void {
2605                 if(!isWasmInitialized) {
2606                         throw new Error("initializeWasm() must be awaited first!");
2607                 }
2608                 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
2609                 // debug statements here
2610         }
2611         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
2612         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
2613                 if(!isWasmInitialized) {
2614                         throw new Error("initializeWasm() must be awaited first!");
2615                 }
2616                 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
2617                 // debug statements here
2618         }
2619         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
2620         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
2621                 if(!isWasmInitialized) {
2622                         throw new Error("initializeWasm() must be awaited first!");
2623                 }
2624                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
2625                 return nativeResponseValue;
2626         }
2627         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
2628         export function CResult_RouteDecodeErrorZ_err(e: number): number {
2629                 if(!isWasmInitialized) {
2630                         throw new Error("initializeWasm() must be awaited first!");
2631                 }
2632                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
2633                 return nativeResponseValue;
2634         }
2635         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
2636         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
2637                 if(!isWasmInitialized) {
2638                         throw new Error("initializeWasm() must be awaited first!");
2639                 }
2640                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
2641                 // debug statements here
2642         }
2643         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
2644         export function CVec_RouteHintZ_free(_res: number[]): void {
2645                 if(!isWasmInitialized) {
2646                         throw new Error("initializeWasm() must be awaited first!");
2647                 }
2648                 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
2649                 // debug statements here
2650         }
2651         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
2652         export function CResult_RouteLightningErrorZ_ok(o: number): number {
2653                 if(!isWasmInitialized) {
2654                         throw new Error("initializeWasm() must be awaited first!");
2655                 }
2656                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
2657                 return nativeResponseValue;
2658         }
2659         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
2660         export function CResult_RouteLightningErrorZ_err(e: number): number {
2661                 if(!isWasmInitialized) {
2662                         throw new Error("initializeWasm() must be awaited first!");
2663                 }
2664                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
2665                 return nativeResponseValue;
2666         }
2667         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
2668         export function CResult_RouteLightningErrorZ_free(_res: number): void {
2669                 if(!isWasmInitialized) {
2670                         throw new Error("initializeWasm() must be awaited first!");
2671                 }
2672                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
2673                 // debug statements here
2674         }
2675         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
2676         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
2677                 if(!isWasmInitialized) {
2678                         throw new Error("initializeWasm() must be awaited first!");
2679                 }
2680                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
2681                 return nativeResponseValue;
2682         }
2683         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
2684         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
2685                 if(!isWasmInitialized) {
2686                         throw new Error("initializeWasm() must be awaited first!");
2687                 }
2688                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
2689                 return nativeResponseValue;
2690         }
2691         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
2692         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
2693                 if(!isWasmInitialized) {
2694                         throw new Error("initializeWasm() must be awaited first!");
2695                 }
2696                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
2697                 // debug statements here
2698         }
2699         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
2700         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
2701                 if(!isWasmInitialized) {
2702                         throw new Error("initializeWasm() must be awaited first!");
2703                 }
2704                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
2705                 return nativeResponseValue;
2706         }
2707         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
2708         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
2709                 if(!isWasmInitialized) {
2710                         throw new Error("initializeWasm() must be awaited first!");
2711                 }
2712                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
2713                 return nativeResponseValue;
2714         }
2715         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
2716         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
2717                 if(!isWasmInitialized) {
2718                         throw new Error("initializeWasm() must be awaited first!");
2719                 }
2720                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
2721                 // debug statements here
2722         }
2723         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
2724         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
2725                 if(!isWasmInitialized) {
2726                         throw new Error("initializeWasm() must be awaited first!");
2727                 }
2728                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
2729                 return nativeResponseValue;
2730         }
2731         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
2732         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
2733                 if(!isWasmInitialized) {
2734                         throw new Error("initializeWasm() must be awaited first!");
2735                 }
2736                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
2737                 return nativeResponseValue;
2738         }
2739         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
2740         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
2741                 if(!isWasmInitialized) {
2742                         throw new Error("initializeWasm() must be awaited first!");
2743                 }
2744                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
2745                 // debug statements here
2746         }
2747         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
2748         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
2749                 if(!isWasmInitialized) {
2750                         throw new Error("initializeWasm() must be awaited first!");
2751                 }
2752                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
2753                 return nativeResponseValue;
2754         }
2755         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
2756         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
2757                 if(!isWasmInitialized) {
2758                         throw new Error("initializeWasm() must be awaited first!");
2759                 }
2760                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
2761                 return nativeResponseValue;
2762         }
2763         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
2764         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
2765                 if(!isWasmInitialized) {
2766                         throw new Error("initializeWasm() must be awaited first!");
2767                 }
2768                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
2769                 // debug statements here
2770         }
2771         // void Event_free(struct LDKEvent this_ptr);
2772         export function Event_free(this_ptr: number): void {
2773                 if(!isWasmInitialized) {
2774                         throw new Error("initializeWasm() must be awaited first!");
2775                 }
2776                 const nativeResponseValue = wasm.Event_free(this_ptr);
2777                 // debug statements here
2778         }
2779         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
2780         export function Event_clone(orig: number): number {
2781                 if(!isWasmInitialized) {
2782                         throw new Error("initializeWasm() must be awaited first!");
2783                 }
2784                 const nativeResponseValue = wasm.Event_clone(orig);
2785                 return nativeResponseValue;
2786         }
2787         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
2788         export function Event_write(obj: number): Uint8Array {
2789                 if(!isWasmInitialized) {
2790                         throw new Error("initializeWasm() must be awaited first!");
2791                 }
2792                 const nativeResponseValue = wasm.Event_write(obj);
2793                 return decodeArray(nativeResponseValue);
2794         }
2795         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
2796         export function MessageSendEvent_free(this_ptr: number): void {
2797                 if(!isWasmInitialized) {
2798                         throw new Error("initializeWasm() must be awaited first!");
2799                 }
2800                 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
2801                 // debug statements here
2802         }
2803         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
2804         export function MessageSendEvent_clone(orig: number): number {
2805                 if(!isWasmInitialized) {
2806                         throw new Error("initializeWasm() must be awaited first!");
2807                 }
2808                 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
2809                 return nativeResponseValue;
2810         }
2811         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
2812         export function MessageSendEventsProvider_free(this_ptr: number): void {
2813                 if(!isWasmInitialized) {
2814                         throw new Error("initializeWasm() must be awaited first!");
2815                 }
2816                 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
2817                 // debug statements here
2818         }
2819         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
2820         export function EventsProvider_free(this_ptr: number): void {
2821                 if(!isWasmInitialized) {
2822                         throw new Error("initializeWasm() must be awaited first!");
2823                 }
2824                 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
2825                 // debug statements here
2826         }
2827         // void APIError_free(struct LDKAPIError this_ptr);
2828         export function APIError_free(this_ptr: number): void {
2829                 if(!isWasmInitialized) {
2830                         throw new Error("initializeWasm() must be awaited first!");
2831                 }
2832                 const nativeResponseValue = wasm.APIError_free(this_ptr);
2833                 // debug statements here
2834         }
2835         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
2836         export function APIError_clone(orig: number): number {
2837                 if(!isWasmInitialized) {
2838                         throw new Error("initializeWasm() must be awaited first!");
2839                 }
2840                 const nativeResponseValue = wasm.APIError_clone(orig);
2841                 return nativeResponseValue;
2842         }
2843         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
2844         export function Level_clone(orig: number): LDKLevel {
2845                 if(!isWasmInitialized) {
2846                         throw new Error("initializeWasm() must be awaited first!");
2847                 }
2848                 const nativeResponseValue = wasm.Level_clone(orig);
2849                 return nativeResponseValue;
2850         }
2851         // MUST_USE_RES enum LDKLevel Level_max(void);
2852         export function Level_max(): LDKLevel {
2853                 if(!isWasmInitialized) {
2854                         throw new Error("initializeWasm() must be awaited first!");
2855                 }
2856                 const nativeResponseValue = wasm.Level_max();
2857                 return nativeResponseValue;
2858         }
2859         // void Logger_free(struct LDKLogger this_ptr);
2860         export function Logger_free(this_ptr: number): void {
2861                 if(!isWasmInitialized) {
2862                         throw new Error("initializeWasm() must be awaited first!");
2863                 }
2864                 const nativeResponseValue = wasm.Logger_free(this_ptr);
2865                 // debug statements here
2866         }
2867         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_ptr);
2868         export function ChannelHandshakeConfig_free(this_ptr: number): void {
2869                 if(!isWasmInitialized) {
2870                         throw new Error("initializeWasm() must be awaited first!");
2871                 }
2872                 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_ptr);
2873                 // debug statements here
2874         }
2875         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
2876         export function ChannelHandshakeConfig_clone(orig: number): number {
2877                 if(!isWasmInitialized) {
2878                         throw new Error("initializeWasm() must be awaited first!");
2879                 }
2880                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
2881                 return nativeResponseValue;
2882         }
2883         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
2884         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
2885                 if(!isWasmInitialized) {
2886                         throw new Error("initializeWasm() must be awaited first!");
2887                 }
2888                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
2889                 return nativeResponseValue;
2890         }
2891         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
2892         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
2893                 if(!isWasmInitialized) {
2894                         throw new Error("initializeWasm() must be awaited first!");
2895                 }
2896                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
2897                 // debug statements here
2898         }
2899         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
2900         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
2901                 if(!isWasmInitialized) {
2902                         throw new Error("initializeWasm() must be awaited first!");
2903                 }
2904                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
2905                 return nativeResponseValue;
2906         }
2907         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
2908         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
2909                 if(!isWasmInitialized) {
2910                         throw new Error("initializeWasm() must be awaited first!");
2911                 }
2912                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
2913                 // debug statements here
2914         }
2915         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
2916         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
2917                 if(!isWasmInitialized) {
2918                         throw new Error("initializeWasm() must be awaited first!");
2919                 }
2920                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
2921                 return nativeResponseValue;
2922         }
2923         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
2924         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
2925                 if(!isWasmInitialized) {
2926                         throw new Error("initializeWasm() must be awaited first!");
2927                 }
2928                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
2929                 // debug statements here
2930         }
2931         // 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);
2932         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
2933                 if(!isWasmInitialized) {
2934                         throw new Error("initializeWasm() must be awaited first!");
2935                 }
2936                 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
2937                 return nativeResponseValue;
2938         }
2939         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
2940         export function ChannelHandshakeConfig_default(): number {
2941                 if(!isWasmInitialized) {
2942                         throw new Error("initializeWasm() must be awaited first!");
2943                 }
2944                 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
2945                 return nativeResponseValue;
2946         }
2947         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_ptr);
2948         export function ChannelHandshakeLimits_free(this_ptr: number): void {
2949                 if(!isWasmInitialized) {
2950                         throw new Error("initializeWasm() must be awaited first!");
2951                 }
2952                 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_ptr);
2953                 // debug statements here
2954         }
2955         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
2956         export function ChannelHandshakeLimits_clone(orig: number): number {
2957                 if(!isWasmInitialized) {
2958                         throw new Error("initializeWasm() must be awaited first!");
2959                 }
2960                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
2961                 return nativeResponseValue;
2962         }
2963         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
2964         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
2965                 if(!isWasmInitialized) {
2966                         throw new Error("initializeWasm() must be awaited first!");
2967                 }
2968                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
2969                 return nativeResponseValue;
2970         }
2971         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
2972         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
2973                 if(!isWasmInitialized) {
2974                         throw new Error("initializeWasm() must be awaited first!");
2975                 }
2976                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
2977                 // debug statements here
2978         }
2979         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
2980         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
2981                 if(!isWasmInitialized) {
2982                         throw new Error("initializeWasm() must be awaited first!");
2983                 }
2984                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
2985                 return nativeResponseValue;
2986         }
2987         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
2988         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
2989                 if(!isWasmInitialized) {
2990                         throw new Error("initializeWasm() must be awaited first!");
2991                 }
2992                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
2993                 // debug statements here
2994         }
2995         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
2996         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
2997                 if(!isWasmInitialized) {
2998                         throw new Error("initializeWasm() must be awaited first!");
2999                 }
3000                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
3001                 return nativeResponseValue;
3002         }
3003         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3004         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
3005                 if(!isWasmInitialized) {
3006                         throw new Error("initializeWasm() must be awaited first!");
3007                 }
3008                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
3009                 // debug statements here
3010         }
3011         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3012         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
3013                 if(!isWasmInitialized) {
3014                         throw new Error("initializeWasm() must be awaited first!");
3015                 }
3016                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
3017                 return nativeResponseValue;
3018         }
3019         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3020         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
3021                 if(!isWasmInitialized) {
3022                         throw new Error("initializeWasm() must be awaited first!");
3023                 }
3024                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
3025                 // debug statements here
3026         }
3027         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3028         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
3029                 if(!isWasmInitialized) {
3030                         throw new Error("initializeWasm() must be awaited first!");
3031                 }
3032                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
3033                 return nativeResponseValue;
3034         }
3035         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
3036         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
3037                 if(!isWasmInitialized) {
3038                         throw new Error("initializeWasm() must be awaited first!");
3039                 }
3040                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
3041                 // debug statements here
3042         }
3043         // uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3044         export function ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr: number): number {
3045                 if(!isWasmInitialized) {
3046                         throw new Error("initializeWasm() must be awaited first!");
3047                 }
3048                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr);
3049                 return nativeResponseValue;
3050         }
3051         // void ChannelHandshakeLimits_set_min_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3052         export function ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr: number, val: number): void {
3053                 if(!isWasmInitialized) {
3054                         throw new Error("initializeWasm() must be awaited first!");
3055                 }
3056                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr, val);
3057                 // debug statements here
3058         }
3059         // uint64_t ChannelHandshakeLimits_get_max_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3060         export function ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr: number): number {
3061                 if(!isWasmInitialized) {
3062                         throw new Error("initializeWasm() must be awaited first!");
3063                 }
3064                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr);
3065                 return nativeResponseValue;
3066         }
3067         // void ChannelHandshakeLimits_set_max_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3068         export function ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr: number, val: number): void {
3069                 if(!isWasmInitialized) {
3070                         throw new Error("initializeWasm() must be awaited first!");
3071                 }
3072                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr, val);
3073                 // debug statements here
3074         }
3075         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3076         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
3077                 if(!isWasmInitialized) {
3078                         throw new Error("initializeWasm() must be awaited first!");
3079                 }
3080                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
3081                 return nativeResponseValue;
3082         }
3083         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
3084         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
3085                 if(!isWasmInitialized) {
3086                         throw new Error("initializeWasm() must be awaited first!");
3087                 }
3088                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
3089                 // debug statements here
3090         }
3091         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3092         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
3093                 if(!isWasmInitialized) {
3094                         throw new Error("initializeWasm() must be awaited first!");
3095                 }
3096                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
3097                 return nativeResponseValue;
3098         }
3099         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
3100         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
3101                 if(!isWasmInitialized) {
3102                         throw new Error("initializeWasm() must be awaited first!");
3103                 }
3104                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
3105                 // debug statements here
3106         }
3107         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3108         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
3109                 if(!isWasmInitialized) {
3110                         throw new Error("initializeWasm() must be awaited first!");
3111                 }
3112                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
3113                 return nativeResponseValue;
3114         }
3115         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
3116         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
3117                 if(!isWasmInitialized) {
3118                         throw new Error("initializeWasm() must be awaited first!");
3119                 }
3120                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
3121                 // debug statements here
3122         }
3123         // 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);
3124         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 {
3125                 if(!isWasmInitialized) {
3126                         throw new Error("initializeWasm() must be awaited first!");
3127                 }
3128                 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);
3129                 return nativeResponseValue;
3130         }
3131         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
3132         export function ChannelHandshakeLimits_default(): number {
3133                 if(!isWasmInitialized) {
3134                         throw new Error("initializeWasm() must be awaited first!");
3135                 }
3136                 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
3137                 return nativeResponseValue;
3138         }
3139         // void ChannelConfig_free(struct LDKChannelConfig this_ptr);
3140         export function ChannelConfig_free(this_ptr: number): void {
3141                 if(!isWasmInitialized) {
3142                         throw new Error("initializeWasm() must be awaited first!");
3143                 }
3144                 const nativeResponseValue = wasm.ChannelConfig_free(this_ptr);
3145                 // debug statements here
3146         }
3147         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
3148         export function ChannelConfig_clone(orig: number): number {
3149                 if(!isWasmInitialized) {
3150                         throw new Error("initializeWasm() must be awaited first!");
3151                 }
3152                 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
3153                 return nativeResponseValue;
3154         }
3155         // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
3156         export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
3157                 if(!isWasmInitialized) {
3158                         throw new Error("initializeWasm() must be awaited first!");
3159                 }
3160                 const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
3161                 return nativeResponseValue;
3162         }
3163         // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
3164         export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
3165                 if(!isWasmInitialized) {
3166                         throw new Error("initializeWasm() must be awaited first!");
3167                 }
3168                 const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
3169                 // debug statements here
3170         }
3171         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
3172         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
3173                 if(!isWasmInitialized) {
3174                         throw new Error("initializeWasm() must be awaited first!");
3175                 }
3176                 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
3177                 return nativeResponseValue;
3178         }
3179         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
3180         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
3181                 if(!isWasmInitialized) {
3182                         throw new Error("initializeWasm() must be awaited first!");
3183                 }
3184                 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
3185                 // debug statements here
3186         }
3187         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
3188         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
3189                 if(!isWasmInitialized) {
3190                         throw new Error("initializeWasm() must be awaited first!");
3191                 }
3192                 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
3193                 return nativeResponseValue;
3194         }
3195         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
3196         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
3197                 if(!isWasmInitialized) {
3198                         throw new Error("initializeWasm() must be awaited first!");
3199                 }
3200                 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
3201                 // debug statements here
3202         }
3203         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
3204         export function ChannelConfig_new(fee_proportional_millionths_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
3205                 if(!isWasmInitialized) {
3206                         throw new Error("initializeWasm() must be awaited first!");
3207                 }
3208                 const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
3209                 return nativeResponseValue;
3210         }
3211         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
3212         export function ChannelConfig_default(): number {
3213                 if(!isWasmInitialized) {
3214                         throw new Error("initializeWasm() must be awaited first!");
3215                 }
3216                 const nativeResponseValue = wasm.ChannelConfig_default();
3217                 return nativeResponseValue;
3218         }
3219         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
3220         export function ChannelConfig_write(obj: number): Uint8Array {
3221                 if(!isWasmInitialized) {
3222                         throw new Error("initializeWasm() must be awaited first!");
3223                 }
3224                 const nativeResponseValue = wasm.ChannelConfig_write(obj);
3225                 return decodeArray(nativeResponseValue);
3226         }
3227         // struct LDKChannelConfig ChannelConfig_read(struct LDKu8slice ser);
3228         export function ChannelConfig_read(ser: Uint8Array): number {
3229                 if(!isWasmInitialized) {
3230                         throw new Error("initializeWasm() must be awaited first!");
3231                 }
3232                 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
3233                 return nativeResponseValue;
3234         }
3235         // void UserConfig_free(struct LDKUserConfig this_ptr);
3236         export function UserConfig_free(this_ptr: number): void {
3237                 if(!isWasmInitialized) {
3238                         throw new Error("initializeWasm() must be awaited first!");
3239                 }
3240                 const nativeResponseValue = wasm.UserConfig_free(this_ptr);
3241                 // debug statements here
3242         }
3243         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
3244         export function UserConfig_clone(orig: number): number {
3245                 if(!isWasmInitialized) {
3246                         throw new Error("initializeWasm() must be awaited first!");
3247                 }
3248                 const nativeResponseValue = wasm.UserConfig_clone(orig);
3249                 return nativeResponseValue;
3250         }
3251         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
3252         export function UserConfig_get_own_channel_config(this_ptr: number): number {
3253                 if(!isWasmInitialized) {
3254                         throw new Error("initializeWasm() must be awaited first!");
3255                 }
3256                 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
3257                 return nativeResponseValue;
3258         }
3259         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
3260         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
3261                 if(!isWasmInitialized) {
3262                         throw new Error("initializeWasm() must be awaited first!");
3263                 }
3264                 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
3265                 // debug statements here
3266         }
3267         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
3268         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
3269                 if(!isWasmInitialized) {
3270                         throw new Error("initializeWasm() must be awaited first!");
3271                 }
3272                 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
3273                 return nativeResponseValue;
3274         }
3275         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
3276         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
3277                 if(!isWasmInitialized) {
3278                         throw new Error("initializeWasm() must be awaited first!");
3279                 }
3280                 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
3281                 // debug statements here
3282         }
3283         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
3284         export function UserConfig_get_channel_options(this_ptr: number): number {
3285                 if(!isWasmInitialized) {
3286                         throw new Error("initializeWasm() must be awaited first!");
3287                 }
3288                 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
3289                 return nativeResponseValue;
3290         }
3291         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
3292         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
3293                 if(!isWasmInitialized) {
3294                         throw new Error("initializeWasm() must be awaited first!");
3295                 }
3296                 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
3297                 // debug statements here
3298         }
3299         // 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);
3300         export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
3301                 if(!isWasmInitialized) {
3302                         throw new Error("initializeWasm() must be awaited first!");
3303                 }
3304                 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
3305                 return nativeResponseValue;
3306         }
3307         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
3308         export function UserConfig_default(): number {
3309                 if(!isWasmInitialized) {
3310                         throw new Error("initializeWasm() must be awaited first!");
3311                 }
3312                 const nativeResponseValue = wasm.UserConfig_default();
3313                 return nativeResponseValue;
3314         }
3315         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
3316         export function AccessError_clone(orig: number): LDKAccessError {
3317                 if(!isWasmInitialized) {
3318                         throw new Error("initializeWasm() must be awaited first!");
3319                 }
3320                 const nativeResponseValue = wasm.AccessError_clone(orig);
3321                 return nativeResponseValue;
3322         }
3323         // void Access_free(struct LDKAccess this_ptr);
3324         export function Access_free(this_ptr: number): void {
3325                 if(!isWasmInitialized) {
3326                         throw new Error("initializeWasm() must be awaited first!");
3327                 }
3328                 const nativeResponseValue = wasm.Access_free(this_ptr);
3329                 // debug statements here
3330         }
3331         // void Watch_free(struct LDKWatch this_ptr);
3332         export function Watch_free(this_ptr: number): void {
3333                 if(!isWasmInitialized) {
3334                         throw new Error("initializeWasm() must be awaited first!");
3335                 }
3336                 const nativeResponseValue = wasm.Watch_free(this_ptr);
3337                 // debug statements here
3338         }
3339         // void Filter_free(struct LDKFilter this_ptr);
3340         export function Filter_free(this_ptr: number): void {
3341                 if(!isWasmInitialized) {
3342                         throw new Error("initializeWasm() must be awaited first!");
3343                 }
3344                 const nativeResponseValue = wasm.Filter_free(this_ptr);
3345                 // debug statements here
3346         }
3347         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
3348         export function BroadcasterInterface_free(this_ptr: number): void {
3349                 if(!isWasmInitialized) {
3350                         throw new Error("initializeWasm() must be awaited first!");
3351                 }
3352                 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
3353                 // debug statements here
3354         }
3355         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
3356         export function ConfirmationTarget_clone(orig: number): LDKConfirmationTarget {
3357                 if(!isWasmInitialized) {
3358                         throw new Error("initializeWasm() must be awaited first!");
3359                 }
3360                 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
3361                 return nativeResponseValue;
3362         }
3363         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
3364         export function FeeEstimator_free(this_ptr: number): void {
3365                 if(!isWasmInitialized) {
3366                         throw new Error("initializeWasm() must be awaited first!");
3367                 }
3368                 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
3369                 // debug statements here
3370         }
3371         // void ChainMonitor_free(struct LDKChainMonitor this_ptr);
3372         export function ChainMonitor_free(this_ptr: number): void {
3373                 if(!isWasmInitialized) {
3374                         throw new Error("initializeWasm() must be awaited first!");
3375                 }
3376                 const nativeResponseValue = wasm.ChainMonitor_free(this_ptr);
3377                 // debug statements here
3378         }
3379         // void ChainMonitor_block_connected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
3380         export function ChainMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
3381                 if(!isWasmInitialized) {
3382                         throw new Error("initializeWasm() must be awaited first!");
3383                 }
3384                 const nativeResponseValue = wasm.ChainMonitor_block_connected(this_arg, encodeArray(header), txdata, height);
3385                 // debug statements here
3386         }
3387         // void ChainMonitor_block_disconnected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t disconnected_height);
3388         export function ChainMonitor_block_disconnected(this_arg: number, header: Uint8Array, disconnected_height: number): void {
3389                 if(!isWasmInitialized) {
3390                         throw new Error("initializeWasm() must be awaited first!");
3391                 }
3392                 const nativeResponseValue = wasm.ChainMonitor_block_disconnected(this_arg, encodeArray(header), disconnected_height);
3393                 // debug statements here
3394         }
3395         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
3396         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
3397                 if(!isWasmInitialized) {
3398                         throw new Error("initializeWasm() must be awaited first!");
3399                 }
3400                 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
3401                 return nativeResponseValue;
3402         }
3403         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
3404         export function ChainMonitor_as_Watch(this_arg: number): number {
3405                 if(!isWasmInitialized) {
3406                         throw new Error("initializeWasm() must be awaited first!");
3407                 }
3408                 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
3409                 return nativeResponseValue;
3410         }
3411         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
3412         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
3413                 if(!isWasmInitialized) {
3414                         throw new Error("initializeWasm() must be awaited first!");
3415                 }
3416                 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
3417                 return nativeResponseValue;
3418         }
3419         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_ptr);
3420         export function ChannelMonitorUpdate_free(this_ptr: number): void {
3421                 if(!isWasmInitialized) {
3422                         throw new Error("initializeWasm() must be awaited first!");
3423                 }
3424                 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_ptr);
3425                 // debug statements here
3426         }
3427         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
3428         export function ChannelMonitorUpdate_clone(orig: number): number {
3429                 if(!isWasmInitialized) {
3430                         throw new Error("initializeWasm() must be awaited first!");
3431                 }
3432                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
3433                 return nativeResponseValue;
3434         }
3435         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
3436         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
3437                 if(!isWasmInitialized) {
3438                         throw new Error("initializeWasm() must be awaited first!");
3439                 }
3440                 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
3441                 return nativeResponseValue;
3442         }
3443         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
3444         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
3445                 if(!isWasmInitialized) {
3446                         throw new Error("initializeWasm() must be awaited first!");
3447                 }
3448                 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
3449                 // debug statements here
3450         }
3451         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
3452         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
3453                 if(!isWasmInitialized) {
3454                         throw new Error("initializeWasm() must be awaited first!");
3455                 }
3456                 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
3457                 return decodeArray(nativeResponseValue);
3458         }
3459         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
3460         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
3461                 if(!isWasmInitialized) {
3462                         throw new Error("initializeWasm() must be awaited first!");
3463                 }
3464                 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
3465                 return nativeResponseValue;
3466         }
3467         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
3468         export function ChannelMonitorUpdateErr_clone(orig: number): LDKChannelMonitorUpdateErr {
3469                 if(!isWasmInitialized) {
3470                         throw new Error("initializeWasm() must be awaited first!");
3471                 }
3472                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
3473                 return nativeResponseValue;
3474         }
3475         // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_ptr);
3476         export function MonitorUpdateError_free(this_ptr: number): void {
3477                 if(!isWasmInitialized) {
3478                         throw new Error("initializeWasm() must be awaited first!");
3479                 }
3480                 const nativeResponseValue = wasm.MonitorUpdateError_free(this_ptr);
3481                 // debug statements here
3482         }
3483         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
3484         export function MonitorEvent_free(this_ptr: number): void {
3485                 if(!isWasmInitialized) {
3486                         throw new Error("initializeWasm() must be awaited first!");
3487                 }
3488                 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
3489                 // debug statements here
3490         }
3491         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
3492         export function MonitorEvent_clone(orig: number): number {
3493                 if(!isWasmInitialized) {
3494                         throw new Error("initializeWasm() must be awaited first!");
3495                 }
3496                 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
3497                 return nativeResponseValue;
3498         }
3499         // void HTLCUpdate_free(struct LDKHTLCUpdate this_ptr);
3500         export function HTLCUpdate_free(this_ptr: number): void {
3501                 if(!isWasmInitialized) {
3502                         throw new Error("initializeWasm() must be awaited first!");
3503                 }
3504                 const nativeResponseValue = wasm.HTLCUpdate_free(this_ptr);
3505                 // debug statements here
3506         }
3507         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
3508         export function HTLCUpdate_clone(orig: number): number {
3509                 if(!isWasmInitialized) {
3510                         throw new Error("initializeWasm() must be awaited first!");
3511                 }
3512                 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
3513                 return nativeResponseValue;
3514         }
3515         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
3516         export function HTLCUpdate_write(obj: number): Uint8Array {
3517                 if(!isWasmInitialized) {
3518                         throw new Error("initializeWasm() must be awaited first!");
3519                 }
3520                 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
3521                 return decodeArray(nativeResponseValue);
3522         }
3523         // struct LDKHTLCUpdate HTLCUpdate_read(struct LDKu8slice ser);
3524         export function HTLCUpdate_read(ser: Uint8Array): number {
3525                 if(!isWasmInitialized) {
3526                         throw new Error("initializeWasm() must be awaited first!");
3527                 }
3528                 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
3529                 return nativeResponseValue;
3530         }
3531         // void ChannelMonitor_free(struct LDKChannelMonitor this_ptr);
3532         export function ChannelMonitor_free(this_ptr: number): void {
3533                 if(!isWasmInitialized) {
3534                         throw new Error("initializeWasm() must be awaited first!");
3535                 }
3536                 const nativeResponseValue = wasm.ChannelMonitor_free(this_ptr);
3537                 // debug statements here
3538         }
3539         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
3540         export function ChannelMonitor_write(obj: number): Uint8Array {
3541                 if(!isWasmInitialized) {
3542                         throw new Error("initializeWasm() must be awaited first!");
3543                 }
3544                 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
3545                 return decodeArray(nativeResponseValue);
3546         }
3547         // MUST_USE_RES struct LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(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);
3548         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
3549                 if(!isWasmInitialized) {
3550                         throw new Error("initializeWasm() must be awaited first!");
3551                 }
3552                 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
3553                 return nativeResponseValue;
3554         }
3555         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
3556         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
3557                 if(!isWasmInitialized) {
3558                         throw new Error("initializeWasm() must be awaited first!");
3559                 }
3560                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
3561                 return nativeResponseValue;
3562         }
3563         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
3564         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
3565                 if(!isWasmInitialized) {
3566                         throw new Error("initializeWasm() must be awaited first!");
3567                 }
3568                 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
3569                 return nativeResponseValue;
3570         }
3571         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(struct LDKChannelMonitor *NONNULL_PTR this_arg);
3572         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
3573                 if(!isWasmInitialized) {
3574                         throw new Error("initializeWasm() must be awaited first!");
3575                 }
3576                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
3577                 return nativeResponseValue;
3578         }
3579         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(struct LDKChannelMonitor *NONNULL_PTR this_arg);
3580         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
3581                 if(!isWasmInitialized) {
3582                         throw new Error("initializeWasm() must be awaited first!");
3583                 }
3584                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
3585                 return nativeResponseValue;
3586         }
3587         // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
3588         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
3589                 if(!isWasmInitialized) {
3590                         throw new Error("initializeWasm() must be awaited first!");
3591                 }
3592                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
3593                 return nativeResponseValue;
3594         }
3595         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(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);
3596         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
3597                 if(!isWasmInitialized) {
3598                         throw new Error("initializeWasm() must be awaited first!");
3599                 }
3600                 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
3601                 return nativeResponseValue;
3602         }
3603         // void ChannelMonitor_block_disconnected(struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
3604         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
3605                 if(!isWasmInitialized) {
3606                         throw new Error("initializeWasm() must be awaited first!");
3607                 }
3608                 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
3609                 // debug statements here
3610         }
3611         // void Persist_free(struct LDKPersist this_ptr);
3612         export function Persist_free(this_ptr: number): void {
3613                 if(!isWasmInitialized) {
3614                         throw new Error("initializeWasm() must be awaited first!");
3615                 }
3616                 const nativeResponseValue = wasm.Persist_free(this_ptr);
3617                 // debug statements here
3618         }
3619         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
3620         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
3621                 if(!isWasmInitialized) {
3622                         throw new Error("initializeWasm() must be awaited first!");
3623                 }
3624                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
3625                 return nativeResponseValue;
3626         }
3627         // void OutPoint_free(struct LDKOutPoint this_ptr);
3628         export function OutPoint_free(this_ptr: number): void {
3629                 if(!isWasmInitialized) {
3630                         throw new Error("initializeWasm() must be awaited first!");
3631                 }
3632                 const nativeResponseValue = wasm.OutPoint_free(this_ptr);
3633                 // debug statements here
3634         }
3635         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
3636         export function OutPoint_clone(orig: number): number {
3637                 if(!isWasmInitialized) {
3638                         throw new Error("initializeWasm() must be awaited first!");
3639                 }
3640                 const nativeResponseValue = wasm.OutPoint_clone(orig);
3641                 return nativeResponseValue;
3642         }
3643         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
3644         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
3645                 if(!isWasmInitialized) {
3646                         throw new Error("initializeWasm() must be awaited first!");
3647                 }
3648                 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
3649                 return decodeArray(nativeResponseValue);
3650         }
3651         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3652         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
3653                 if(!isWasmInitialized) {
3654                         throw new Error("initializeWasm() must be awaited first!");
3655                 }
3656                 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
3657                 // debug statements here
3658         }
3659         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
3660         export function OutPoint_get_index(this_ptr: number): number {
3661                 if(!isWasmInitialized) {
3662                         throw new Error("initializeWasm() must be awaited first!");
3663                 }
3664                 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
3665                 return nativeResponseValue;
3666         }
3667         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
3668         export function OutPoint_set_index(this_ptr: number, val: number): void {
3669                 if(!isWasmInitialized) {
3670                         throw new Error("initializeWasm() must be awaited first!");
3671                 }
3672                 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
3673                 // debug statements here
3674         }
3675         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
3676         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
3677                 if(!isWasmInitialized) {
3678                         throw new Error("initializeWasm() must be awaited first!");
3679                 }
3680                 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
3681                 return nativeResponseValue;
3682         }
3683         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
3684         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
3685                 if(!isWasmInitialized) {
3686                         throw new Error("initializeWasm() must be awaited first!");
3687                 }
3688                 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
3689                 return decodeArray(nativeResponseValue);
3690         }
3691         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
3692         export function OutPoint_write(obj: number): Uint8Array {
3693                 if(!isWasmInitialized) {
3694                         throw new Error("initializeWasm() must be awaited first!");
3695                 }
3696                 const nativeResponseValue = wasm.OutPoint_write(obj);
3697                 return decodeArray(nativeResponseValue);
3698         }
3699         // struct LDKOutPoint OutPoint_read(struct LDKu8slice ser);
3700         export function OutPoint_read(ser: Uint8Array): number {
3701                 if(!isWasmInitialized) {
3702                         throw new Error("initializeWasm() must be awaited first!");
3703                 }
3704                 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
3705                 return nativeResponseValue;
3706         }
3707         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
3708         export function SpendableOutputDescriptor_free(this_ptr: number): void {
3709                 if(!isWasmInitialized) {
3710                         throw new Error("initializeWasm() must be awaited first!");
3711                 }
3712                 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
3713                 // debug statements here
3714         }
3715         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
3716         export function SpendableOutputDescriptor_clone(orig: number): number {
3717                 if(!isWasmInitialized) {
3718                         throw new Error("initializeWasm() must be awaited first!");
3719                 }
3720                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
3721                 return nativeResponseValue;
3722         }
3723         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
3724         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
3725                 if(!isWasmInitialized) {
3726                         throw new Error("initializeWasm() must be awaited first!");
3727                 }
3728                 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
3729                 return decodeArray(nativeResponseValue);
3730         }
3731         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
3732         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
3733                 if(!isWasmInitialized) {
3734                         throw new Error("initializeWasm() must be awaited first!");
3735                 }
3736                 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
3737                 return nativeResponseValue;
3738         }
3739         // struct LDKChannelKeys ChannelKeys_clone(const struct LDKChannelKeys *NONNULL_PTR orig);
3740         export function ChannelKeys_clone(orig: number): number {
3741                 if(!isWasmInitialized) {
3742                         throw new Error("initializeWasm() must be awaited first!");
3743                 }
3744                 const nativeResponseValue = wasm.ChannelKeys_clone(orig);
3745                 return nativeResponseValue;
3746         }
3747         // void ChannelKeys_free(struct LDKChannelKeys this_ptr);
3748         export function ChannelKeys_free(this_ptr: number): void {
3749                 if(!isWasmInitialized) {
3750                         throw new Error("initializeWasm() must be awaited first!");
3751                 }
3752                 const nativeResponseValue = wasm.ChannelKeys_free(this_ptr);
3753                 // debug statements here
3754         }
3755         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
3756         export function KeysInterface_free(this_ptr: number): void {
3757                 if(!isWasmInitialized) {
3758                         throw new Error("initializeWasm() must be awaited first!");
3759                 }
3760                 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
3761                 // debug statements here
3762         }
3763         // void InMemoryChannelKeys_free(struct LDKInMemoryChannelKeys this_ptr);
3764         export function InMemoryChannelKeys_free(this_ptr: number): void {
3765                 if(!isWasmInitialized) {
3766                         throw new Error("initializeWasm() must be awaited first!");
3767                 }
3768                 const nativeResponseValue = wasm.InMemoryChannelKeys_free(this_ptr);
3769                 // debug statements here
3770         }
3771         // struct LDKInMemoryChannelKeys InMemoryChannelKeys_clone(const struct LDKInMemoryChannelKeys *NONNULL_PTR orig);
3772         export function InMemoryChannelKeys_clone(orig: number): number {
3773                 if(!isWasmInitialized) {
3774                         throw new Error("initializeWasm() must be awaited first!");
3775                 }
3776                 const nativeResponseValue = wasm.InMemoryChannelKeys_clone(orig);
3777                 return nativeResponseValue;
3778         }
3779         // const uint8_t (*InMemoryChannelKeys_get_funding_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
3780         export function InMemoryChannelKeys_get_funding_key(this_ptr: number): Uint8Array {
3781                 if(!isWasmInitialized) {
3782                         throw new Error("initializeWasm() must be awaited first!");
3783                 }
3784                 const nativeResponseValue = wasm.InMemoryChannelKeys_get_funding_key(this_ptr);
3785                 return decodeArray(nativeResponseValue);
3786         }
3787         // void InMemoryChannelKeys_set_funding_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3788         export function InMemoryChannelKeys_set_funding_key(this_ptr: number, val: Uint8Array): void {
3789                 if(!isWasmInitialized) {
3790                         throw new Error("initializeWasm() must be awaited first!");
3791                 }
3792                 const nativeResponseValue = wasm.InMemoryChannelKeys_set_funding_key(this_ptr, encodeArray(val));
3793                 // debug statements here
3794         }
3795         // const uint8_t (*InMemoryChannelKeys_get_revocation_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
3796         export function InMemoryChannelKeys_get_revocation_base_key(this_ptr: number): Uint8Array {
3797                 if(!isWasmInitialized) {
3798                         throw new Error("initializeWasm() must be awaited first!");
3799                 }
3800                 const nativeResponseValue = wasm.InMemoryChannelKeys_get_revocation_base_key(this_ptr);
3801                 return decodeArray(nativeResponseValue);
3802         }
3803         // void InMemoryChannelKeys_set_revocation_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3804         export function InMemoryChannelKeys_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
3805                 if(!isWasmInitialized) {
3806                         throw new Error("initializeWasm() must be awaited first!");
3807                 }
3808                 const nativeResponseValue = wasm.InMemoryChannelKeys_set_revocation_base_key(this_ptr, encodeArray(val));
3809                 // debug statements here
3810         }
3811         // const uint8_t (*InMemoryChannelKeys_get_payment_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
3812         export function InMemoryChannelKeys_get_payment_key(this_ptr: number): Uint8Array {
3813                 if(!isWasmInitialized) {
3814                         throw new Error("initializeWasm() must be awaited first!");
3815                 }
3816                 const nativeResponseValue = wasm.InMemoryChannelKeys_get_payment_key(this_ptr);
3817                 return decodeArray(nativeResponseValue);
3818         }
3819         // void InMemoryChannelKeys_set_payment_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3820         export function InMemoryChannelKeys_set_payment_key(this_ptr: number, val: Uint8Array): void {
3821                 if(!isWasmInitialized) {
3822                         throw new Error("initializeWasm() must be awaited first!");
3823                 }
3824                 const nativeResponseValue = wasm.InMemoryChannelKeys_set_payment_key(this_ptr, encodeArray(val));
3825                 // debug statements here
3826         }
3827         // const uint8_t (*InMemoryChannelKeys_get_delayed_payment_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
3828         export function InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
3829                 if(!isWasmInitialized) {
3830                         throw new Error("initializeWasm() must be awaited first!");
3831                 }
3832                 const nativeResponseValue = wasm.InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr);
3833                 return decodeArray(nativeResponseValue);
3834         }
3835         // void InMemoryChannelKeys_set_delayed_payment_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3836         export function InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
3837                 if(!isWasmInitialized) {
3838                         throw new Error("initializeWasm() must be awaited first!");
3839                 }
3840                 const nativeResponseValue = wasm.InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr, encodeArray(val));
3841                 // debug statements here
3842         }
3843         // const uint8_t (*InMemoryChannelKeys_get_htlc_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
3844         export function InMemoryChannelKeys_get_htlc_base_key(this_ptr: number): Uint8Array {
3845                 if(!isWasmInitialized) {
3846                         throw new Error("initializeWasm() must be awaited first!");
3847                 }
3848                 const nativeResponseValue = wasm.InMemoryChannelKeys_get_htlc_base_key(this_ptr);
3849                 return decodeArray(nativeResponseValue);
3850         }
3851         // void InMemoryChannelKeys_set_htlc_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3852         export function InMemoryChannelKeys_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
3853                 if(!isWasmInitialized) {
3854                         throw new Error("initializeWasm() must be awaited first!");
3855                 }
3856                 const nativeResponseValue = wasm.InMemoryChannelKeys_set_htlc_base_key(this_ptr, encodeArray(val));
3857                 // debug statements here
3858         }
3859         // const uint8_t (*InMemoryChannelKeys_get_commitment_seed(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
3860         export function InMemoryChannelKeys_get_commitment_seed(this_ptr: number): Uint8Array {
3861                 if(!isWasmInitialized) {
3862                         throw new Error("initializeWasm() must be awaited first!");
3863                 }
3864                 const nativeResponseValue = wasm.InMemoryChannelKeys_get_commitment_seed(this_ptr);
3865                 return decodeArray(nativeResponseValue);
3866         }
3867         // void InMemoryChannelKeys_set_commitment_seed(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3868         export function InMemoryChannelKeys_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
3869                 if(!isWasmInitialized) {
3870                         throw new Error("initializeWasm() must be awaited first!");
3871                 }
3872                 const nativeResponseValue = wasm.InMemoryChannelKeys_set_commitment_seed(this_ptr, encodeArray(val));
3873                 // debug statements here
3874         }
3875         // MUST_USE_RES struct LDKInMemoryChannelKeys InMemoryChannelKeys_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 LDKC2Tuple_u64u64Z key_derivation_params);
3876         export function InMemoryChannelKeys_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, key_derivation_params: number): number {
3877                 if(!isWasmInitialized) {
3878                         throw new Error("initializeWasm() must be awaited first!");
3879                 }
3880                 const nativeResponseValue = wasm.InMemoryChannelKeys_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, key_derivation_params);
3881                 return nativeResponseValue;
3882         }
3883         // MUST_USE_RES struct LDKChannelPublicKeys InMemoryChannelKeys_counterparty_pubkeys(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3884         export function InMemoryChannelKeys_counterparty_pubkeys(this_arg: number): number {
3885                 if(!isWasmInitialized) {
3886                         throw new Error("initializeWasm() must be awaited first!");
3887                 }
3888                 const nativeResponseValue = wasm.InMemoryChannelKeys_counterparty_pubkeys(this_arg);
3889                 return nativeResponseValue;
3890         }
3891         // MUST_USE_RES uint16_t InMemoryChannelKeys_counterparty_selected_contest_delay(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3892         export function InMemoryChannelKeys_counterparty_selected_contest_delay(this_arg: number): number {
3893                 if(!isWasmInitialized) {
3894                         throw new Error("initializeWasm() must be awaited first!");
3895                 }
3896                 const nativeResponseValue = wasm.InMemoryChannelKeys_counterparty_selected_contest_delay(this_arg);
3897                 return nativeResponseValue;
3898         }
3899         // MUST_USE_RES uint16_t InMemoryChannelKeys_holder_selected_contest_delay(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3900         export function InMemoryChannelKeys_holder_selected_contest_delay(this_arg: number): number {
3901                 if(!isWasmInitialized) {
3902                         throw new Error("initializeWasm() must be awaited first!");
3903                 }
3904                 const nativeResponseValue = wasm.InMemoryChannelKeys_holder_selected_contest_delay(this_arg);
3905                 return nativeResponseValue;
3906         }
3907         // MUST_USE_RES bool InMemoryChannelKeys_is_outbound(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3908         export function InMemoryChannelKeys_is_outbound(this_arg: number): boolean {
3909                 if(!isWasmInitialized) {
3910                         throw new Error("initializeWasm() must be awaited first!");
3911                 }
3912                 const nativeResponseValue = wasm.InMemoryChannelKeys_is_outbound(this_arg);
3913                 return nativeResponseValue;
3914         }
3915         // MUST_USE_RES struct LDKOutPoint InMemoryChannelKeys_funding_outpoint(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3916         export function InMemoryChannelKeys_funding_outpoint(this_arg: number): number {
3917                 if(!isWasmInitialized) {
3918                         throw new Error("initializeWasm() must be awaited first!");
3919                 }
3920                 const nativeResponseValue = wasm.InMemoryChannelKeys_funding_outpoint(this_arg);
3921                 return nativeResponseValue;
3922         }
3923         // MUST_USE_RES struct LDKChannelTransactionParameters InMemoryChannelKeys_get_channel_parameters(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3924         export function InMemoryChannelKeys_get_channel_parameters(this_arg: number): number {
3925                 if(!isWasmInitialized) {
3926                         throw new Error("initializeWasm() must be awaited first!");
3927                 }
3928                 const nativeResponseValue = wasm.InMemoryChannelKeys_get_channel_parameters(this_arg);
3929                 return nativeResponseValue;
3930         }
3931         // struct LDKChannelKeys InMemoryChannelKeys_as_ChannelKeys(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3932         export function InMemoryChannelKeys_as_ChannelKeys(this_arg: number): number {
3933                 if(!isWasmInitialized) {
3934                         throw new Error("initializeWasm() must be awaited first!");
3935                 }
3936                 const nativeResponseValue = wasm.InMemoryChannelKeys_as_ChannelKeys(this_arg);
3937                 return nativeResponseValue;
3938         }
3939         // struct LDKCVec_u8Z InMemoryChannelKeys_write(const struct LDKInMemoryChannelKeys *NONNULL_PTR obj);
3940         export function InMemoryChannelKeys_write(obj: number): Uint8Array {
3941                 if(!isWasmInitialized) {
3942                         throw new Error("initializeWasm() must be awaited first!");
3943                 }
3944                 const nativeResponseValue = wasm.InMemoryChannelKeys_write(obj);
3945                 return decodeArray(nativeResponseValue);
3946         }
3947         // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ InMemoryChannelKeys_read(struct LDKu8slice ser);
3948         export function InMemoryChannelKeys_read(ser: Uint8Array): number {
3949                 if(!isWasmInitialized) {
3950                         throw new Error("initializeWasm() must be awaited first!");
3951                 }
3952                 const nativeResponseValue = wasm.InMemoryChannelKeys_read(encodeArray(ser));
3953                 return nativeResponseValue;
3954         }
3955         // void KeysManager_free(struct LDKKeysManager this_ptr);
3956         export function KeysManager_free(this_ptr: number): void {
3957                 if(!isWasmInitialized) {
3958                         throw new Error("initializeWasm() must be awaited first!");
3959                 }
3960                 const nativeResponseValue = wasm.KeysManager_free(this_ptr);
3961                 // debug statements here
3962         }
3963         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], enum LDKNetwork network, uint64_t starting_time_secs, uint32_t starting_time_nanos);
3964         export function KeysManager_new(seed: Uint8Array, network: LDKNetwork, starting_time_secs: number, starting_time_nanos: number): number {
3965                 if(!isWasmInitialized) {
3966                         throw new Error("initializeWasm() must be awaited first!");
3967                 }
3968                 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), network, starting_time_secs, starting_time_nanos);
3969                 return nativeResponseValue;
3970         }
3971         // MUST_USE_RES struct LDKInMemoryChannelKeys KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, uint64_t params_1, uint64_t params_2);
3972         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params_1: number, params_2: number): number {
3973                 if(!isWasmInitialized) {
3974                         throw new Error("initializeWasm() must be awaited first!");
3975                 }
3976                 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, params_1, params_2);
3977                 return nativeResponseValue;
3978         }
3979         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
3980         export function KeysManager_as_KeysInterface(this_arg: number): number {
3981                 if(!isWasmInitialized) {
3982                         throw new Error("initializeWasm() must be awaited first!");
3983                 }
3984                 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
3985                 return nativeResponseValue;
3986         }
3987         // void ChannelManager_free(struct LDKChannelManager this_ptr);
3988         export function ChannelManager_free(this_ptr: number): void {
3989                 if(!isWasmInitialized) {
3990                         throw new Error("initializeWasm() must be awaited first!");
3991                 }
3992                 const nativeResponseValue = wasm.ChannelManager_free(this_ptr);
3993                 // debug statements here
3994         }
3995         // void ChannelDetails_free(struct LDKChannelDetails this_ptr);
3996         export function ChannelDetails_free(this_ptr: number): void {
3997                 if(!isWasmInitialized) {
3998                         throw new Error("initializeWasm() must be awaited first!");
3999                 }
4000                 const nativeResponseValue = wasm.ChannelDetails_free(this_ptr);
4001                 // debug statements here
4002         }
4003         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
4004         export function ChannelDetails_clone(orig: number): number {
4005                 if(!isWasmInitialized) {
4006                         throw new Error("initializeWasm() must be awaited first!");
4007                 }
4008                 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
4009                 return nativeResponseValue;
4010         }
4011         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
4012         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
4013                 if(!isWasmInitialized) {
4014                         throw new Error("initializeWasm() must be awaited first!");
4015                 }
4016                 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
4017                 return decodeArray(nativeResponseValue);
4018         }
4019         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4020         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
4021                 if(!isWasmInitialized) {
4022                         throw new Error("initializeWasm() must be awaited first!");
4023                 }
4024                 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
4025                 // debug statements here
4026         }
4027         // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4028         export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
4029                 if(!isWasmInitialized) {
4030                         throw new Error("initializeWasm() must be awaited first!");
4031                 }
4032                 const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
4033                 return decodeArray(nativeResponseValue);
4034         }
4035         // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4036         export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
4037                 if(!isWasmInitialized) {
4038                         throw new Error("initializeWasm() must be awaited first!");
4039                 }
4040                 const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
4041                 // debug statements here
4042         }
4043         // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4044         export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
4045                 if(!isWasmInitialized) {
4046                         throw new Error("initializeWasm() must be awaited first!");
4047                 }
4048                 const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
4049                 return nativeResponseValue;
4050         }
4051         // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
4052         export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
4053                 if(!isWasmInitialized) {
4054                         throw new Error("initializeWasm() must be awaited first!");
4055                 }
4056                 const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
4057                 // debug statements here
4058         }
4059         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4060         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
4061                 if(!isWasmInitialized) {
4062                         throw new Error("initializeWasm() must be awaited first!");
4063                 }
4064                 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
4065                 return nativeResponseValue;
4066         }
4067         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
4068         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
4069                 if(!isWasmInitialized) {
4070                         throw new Error("initializeWasm() must be awaited first!");
4071                 }
4072                 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
4073                 // debug statements here
4074         }
4075         // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4076         export function ChannelDetails_get_user_id(this_ptr: number): number {
4077                 if(!isWasmInitialized) {
4078                         throw new Error("initializeWasm() must be awaited first!");
4079                 }
4080                 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
4081                 return nativeResponseValue;
4082         }
4083         // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
4084         export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
4085                 if(!isWasmInitialized) {
4086                         throw new Error("initializeWasm() must be awaited first!");
4087                 }
4088                 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
4089                 // debug statements here
4090         }
4091         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4092         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
4093                 if(!isWasmInitialized) {
4094                         throw new Error("initializeWasm() must be awaited first!");
4095                 }
4096                 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
4097                 return nativeResponseValue;
4098         }
4099         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
4100         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
4101                 if(!isWasmInitialized) {
4102                         throw new Error("initializeWasm() must be awaited first!");
4103                 }
4104                 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
4105                 // debug statements here
4106         }
4107         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4108         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
4109                 if(!isWasmInitialized) {
4110                         throw new Error("initializeWasm() must be awaited first!");
4111                 }
4112                 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
4113                 return nativeResponseValue;
4114         }
4115         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
4116         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
4117                 if(!isWasmInitialized) {
4118                         throw new Error("initializeWasm() must be awaited first!");
4119                 }
4120                 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
4121                 // debug statements here
4122         }
4123         // bool ChannelDetails_get_is_live(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4124         export function ChannelDetails_get_is_live(this_ptr: number): boolean {
4125                 if(!isWasmInitialized) {
4126                         throw new Error("initializeWasm() must be awaited first!");
4127                 }
4128                 const nativeResponseValue = wasm.ChannelDetails_get_is_live(this_ptr);
4129                 return nativeResponseValue;
4130         }
4131         // void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
4132         export function ChannelDetails_set_is_live(this_ptr: number, val: boolean): void {
4133                 if(!isWasmInitialized) {
4134                         throw new Error("initializeWasm() must be awaited first!");
4135                 }
4136                 const nativeResponseValue = wasm.ChannelDetails_set_is_live(this_ptr, val);
4137                 // debug statements here
4138         }
4139         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
4140         export function PaymentSendFailure_free(this_ptr: number): void {
4141                 if(!isWasmInitialized) {
4142                         throw new Error("initializeWasm() must be awaited first!");
4143                 }
4144                 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
4145                 // debug statements here
4146         }
4147         // MUST_USE_RES struct LDKChannelManager ChannelManager_new(enum LDKNetwork network, struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, uintptr_t current_blockchain_height);
4148         export function ChannelManager_new(network: LDKNetwork, fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, current_blockchain_height: number): number {
4149                 if(!isWasmInitialized) {
4150                         throw new Error("initializeWasm() must be awaited first!");
4151                 }
4152                 const nativeResponseValue = wasm.ChannelManager_new(network, fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, current_blockchain_height);
4153                 return nativeResponseValue;
4154         }
4155         // 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);
4156         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 {
4157                 if(!isWasmInitialized) {
4158                         throw new Error("initializeWasm() must be awaited first!");
4159                 }
4160                 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
4161                 return nativeResponseValue;
4162         }
4163         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
4164         export function ChannelManager_list_channels(this_arg: number): number[] {
4165                 if(!isWasmInitialized) {
4166                         throw new Error("initializeWasm() must be awaited first!");
4167                 }
4168                 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
4169                 return nativeResponseValue;
4170         }
4171         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
4172         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
4173                 if(!isWasmInitialized) {
4174                         throw new Error("initializeWasm() must be awaited first!");
4175                 }
4176                 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
4177                 return nativeResponseValue;
4178         }
4179         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
4180         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
4181                 if(!isWasmInitialized) {
4182                         throw new Error("initializeWasm() must be awaited first!");
4183                 }
4184                 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
4185                 return nativeResponseValue;
4186         }
4187         // void ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
4188         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): void {
4189                 if(!isWasmInitialized) {
4190                         throw new Error("initializeWasm() must be awaited first!");
4191                 }
4192                 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
4193                 // debug statements here
4194         }
4195         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
4196         export function ChannelManager_force_close_all_channels(this_arg: number): void {
4197                 if(!isWasmInitialized) {
4198                         throw new Error("initializeWasm() must be awaited first!");
4199                 }
4200                 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
4201                 // debug statements here
4202         }
4203         // 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);
4204         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
4205                 if(!isWasmInitialized) {
4206                         throw new Error("initializeWasm() must be awaited first!");
4207                 }
4208                 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
4209                 return nativeResponseValue;
4210         }
4211         // void ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKOutPoint funding_txo);
4212         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_txo: number): void {
4213                 if(!isWasmInitialized) {
4214                         throw new Error("initializeWasm() must be awaited first!");
4215                 }
4216                 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), funding_txo);
4217                 // debug statements here
4218         }
4219         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
4220         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
4221                 if(!isWasmInitialized) {
4222                         throw new Error("initializeWasm() must be awaited first!");
4223                 }
4224                 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
4225                 // debug statements here
4226         }
4227         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
4228         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
4229                 if(!isWasmInitialized) {
4230                         throw new Error("initializeWasm() must be awaited first!");
4231                 }
4232                 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
4233                 // debug statements here
4234         }
4235         // void ChannelManager_timer_chan_freshness_every_min(const struct LDKChannelManager *NONNULL_PTR this_arg);
4236         export function ChannelManager_timer_chan_freshness_every_min(this_arg: number): void {
4237                 if(!isWasmInitialized) {
4238                         throw new Error("initializeWasm() must be awaited first!");
4239                 }
4240                 const nativeResponseValue = wasm.ChannelManager_timer_chan_freshness_every_min(this_arg);
4241                 // debug statements here
4242         }
4243         // 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);
4244         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): boolean {
4245                 if(!isWasmInitialized) {
4246                         throw new Error("initializeWasm() must be awaited first!");
4247                 }
4248                 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash), encodeArray(payment_secret));
4249                 return nativeResponseValue;
4250         }
4251         // 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);
4252         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array, payment_secret: Uint8Array, expected_amount: number): boolean {
4253                 if(!isWasmInitialized) {
4254                         throw new Error("initializeWasm() must be awaited first!");
4255                 }
4256                 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage), encodeArray(payment_secret), expected_amount);
4257                 return nativeResponseValue;
4258         }
4259         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
4260         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
4261                 if(!isWasmInitialized) {
4262                         throw new Error("initializeWasm() must be awaited first!");
4263                 }
4264                 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
4265                 return decodeArray(nativeResponseValue);
4266         }
4267         // 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);
4268         export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
4269                 if(!isWasmInitialized) {
4270                         throw new Error("initializeWasm() must be awaited first!");
4271                 }
4272                 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
4273                 // debug statements here
4274         }
4275         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
4276         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
4277                 if(!isWasmInitialized) {
4278                         throw new Error("initializeWasm() must be awaited first!");
4279                 }
4280                 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
4281                 return nativeResponseValue;
4282         }
4283         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
4284         export function ChannelManager_as_EventsProvider(this_arg: number): number {
4285                 if(!isWasmInitialized) {
4286                         throw new Error("initializeWasm() must be awaited first!");
4287                 }
4288                 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
4289                 return nativeResponseValue;
4290         }
4291         // void ChannelManager_block_connected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
4292         export function ChannelManager_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
4293                 if(!isWasmInitialized) {
4294                         throw new Error("initializeWasm() must be awaited first!");
4295                 }
4296                 const nativeResponseValue = wasm.ChannelManager_block_connected(this_arg, encodeArray(header), txdata, height);
4297                 // debug statements here
4298         }
4299         // void ChannelManager_block_disconnected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80]);
4300         export function ChannelManager_block_disconnected(this_arg: number, header: Uint8Array): void {
4301                 if(!isWasmInitialized) {
4302                         throw new Error("initializeWasm() must be awaited first!");
4303                 }
4304                 const nativeResponseValue = wasm.ChannelManager_block_disconnected(this_arg, encodeArray(header));
4305                 // debug statements here
4306         }
4307         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
4308         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
4309                 if(!isWasmInitialized) {
4310                         throw new Error("initializeWasm() must be awaited first!");
4311                 }
4312                 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
4313                 return nativeResponseValue;
4314         }
4315         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
4316         export function ChannelManager_write(obj: number): Uint8Array {
4317                 if(!isWasmInitialized) {
4318                         throw new Error("initializeWasm() must be awaited first!");
4319                 }
4320                 const nativeResponseValue = wasm.ChannelManager_write(obj);
4321                 return decodeArray(nativeResponseValue);
4322         }
4323         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_ptr);
4324         export function ChannelManagerReadArgs_free(this_ptr: number): void {
4325                 if(!isWasmInitialized) {
4326                         throw new Error("initializeWasm() must be awaited first!");
4327                 }
4328                 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_ptr);
4329                 // debug statements here
4330         }
4331         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4332         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
4333                 if(!isWasmInitialized) {
4334                         throw new Error("initializeWasm() must be awaited first!");
4335                 }
4336                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
4337                 return nativeResponseValue;
4338         }
4339         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
4340         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
4341                 if(!isWasmInitialized) {
4342                         throw new Error("initializeWasm() must be awaited first!");
4343                 }
4344                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
4345                 // debug statements here
4346         }
4347         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4348         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
4349                 if(!isWasmInitialized) {
4350                         throw new Error("initializeWasm() must be awaited first!");
4351                 }
4352                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
4353                 return nativeResponseValue;
4354         }
4355         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
4356         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
4357                 if(!isWasmInitialized) {
4358                         throw new Error("initializeWasm() must be awaited first!");
4359                 }
4360                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
4361                 // debug statements here
4362         }
4363         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4364         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
4365                 if(!isWasmInitialized) {
4366                         throw new Error("initializeWasm() must be awaited first!");
4367                 }
4368                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
4369                 return nativeResponseValue;
4370         }
4371         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
4372         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
4373                 if(!isWasmInitialized) {
4374                         throw new Error("initializeWasm() must be awaited first!");
4375                 }
4376                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
4377                 // debug statements here
4378         }
4379         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4380         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
4381                 if(!isWasmInitialized) {
4382                         throw new Error("initializeWasm() must be awaited first!");
4383                 }
4384                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
4385                 return nativeResponseValue;
4386         }
4387         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
4388         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
4389                 if(!isWasmInitialized) {
4390                         throw new Error("initializeWasm() must be awaited first!");
4391                 }
4392                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
4393                 // debug statements here
4394         }
4395         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4396         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
4397                 if(!isWasmInitialized) {
4398                         throw new Error("initializeWasm() must be awaited first!");
4399                 }
4400                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
4401                 return nativeResponseValue;
4402         }
4403         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
4404         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
4405                 if(!isWasmInitialized) {
4406                         throw new Error("initializeWasm() must be awaited first!");
4407                 }
4408                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
4409                 // debug statements here
4410         }
4411         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4412         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
4413                 if(!isWasmInitialized) {
4414                         throw new Error("initializeWasm() must be awaited first!");
4415                 }
4416                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
4417                 return nativeResponseValue;
4418         }
4419         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
4420         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
4421                 if(!isWasmInitialized) {
4422                         throw new Error("initializeWasm() must be awaited first!");
4423                 }
4424                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
4425                 // debug statements here
4426         }
4427         // 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);
4428         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 {
4429                 if(!isWasmInitialized) {
4430                         throw new Error("initializeWasm() must be awaited first!");
4431                 }
4432                 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
4433                 return nativeResponseValue;
4434         }
4435         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
4436         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
4437                 if(!isWasmInitialized) {
4438                         throw new Error("initializeWasm() must be awaited first!");
4439                 }
4440                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
4441                 return nativeResponseValue;
4442         }
4443         // void DecodeError_free(struct LDKDecodeError this_ptr);
4444         export function DecodeError_free(this_ptr: number): void {
4445                 if(!isWasmInitialized) {
4446                         throw new Error("initializeWasm() must be awaited first!");
4447                 }
4448                 const nativeResponseValue = wasm.DecodeError_free(this_ptr);
4449                 // debug statements here
4450         }
4451         // void Init_free(struct LDKInit this_ptr);
4452         export function Init_free(this_ptr: number): void {
4453                 if(!isWasmInitialized) {
4454                         throw new Error("initializeWasm() must be awaited first!");
4455                 }
4456                 const nativeResponseValue = wasm.Init_free(this_ptr);
4457                 // debug statements here
4458         }
4459         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
4460         export function Init_clone(orig: number): number {
4461                 if(!isWasmInitialized) {
4462                         throw new Error("initializeWasm() must be awaited first!");
4463                 }
4464                 const nativeResponseValue = wasm.Init_clone(orig);
4465                 return nativeResponseValue;
4466         }
4467         // void ErrorMessage_free(struct LDKErrorMessage this_ptr);
4468         export function ErrorMessage_free(this_ptr: number): void {
4469                 if(!isWasmInitialized) {
4470                         throw new Error("initializeWasm() must be awaited first!");
4471                 }
4472                 const nativeResponseValue = wasm.ErrorMessage_free(this_ptr);
4473                 // debug statements here
4474         }
4475         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
4476         export function ErrorMessage_clone(orig: number): number {
4477                 if(!isWasmInitialized) {
4478                         throw new Error("initializeWasm() must be awaited first!");
4479                 }
4480                 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
4481                 return nativeResponseValue;
4482         }
4483         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
4484         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
4485                 if(!isWasmInitialized) {
4486                         throw new Error("initializeWasm() must be awaited first!");
4487                 }
4488                 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
4489                 return decodeArray(nativeResponseValue);
4490         }
4491         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4492         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
4493                 if(!isWasmInitialized) {
4494                         throw new Error("initializeWasm() must be awaited first!");
4495                 }
4496                 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
4497                 // debug statements here
4498         }
4499         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
4500         export function ErrorMessage_get_data(this_ptr: number): String {
4501                 if(!isWasmInitialized) {
4502                         throw new Error("initializeWasm() must be awaited first!");
4503                 }
4504                 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
4505                 return nativeResponseValue;
4506         }
4507         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
4508         export function ErrorMessage_set_data(this_ptr: number, val: Uint8Array): void {
4509                 if(!isWasmInitialized) {
4510                         throw new Error("initializeWasm() must be awaited first!");
4511                 }
4512                 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, encodeArray(val));
4513                 // debug statements here
4514         }
4515         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
4516         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: Uint8Array): number {
4517                 if(!isWasmInitialized) {
4518                         throw new Error("initializeWasm() must be awaited first!");
4519                 }
4520                 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), encodeArray(data_arg));
4521                 return nativeResponseValue;
4522         }
4523         // void Ping_free(struct LDKPing this_ptr);
4524         export function Ping_free(this_ptr: number): void {
4525                 if(!isWasmInitialized) {
4526                         throw new Error("initializeWasm() must be awaited first!");
4527                 }
4528                 const nativeResponseValue = wasm.Ping_free(this_ptr);
4529                 // debug statements here
4530         }
4531         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
4532         export function Ping_clone(orig: number): number {
4533                 if(!isWasmInitialized) {
4534                         throw new Error("initializeWasm() must be awaited first!");
4535                 }
4536                 const nativeResponseValue = wasm.Ping_clone(orig);
4537                 return nativeResponseValue;
4538         }
4539         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
4540         export function Ping_get_ponglen(this_ptr: number): number {
4541                 if(!isWasmInitialized) {
4542                         throw new Error("initializeWasm() must be awaited first!");
4543                 }
4544                 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
4545                 return nativeResponseValue;
4546         }
4547         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
4548         export function Ping_set_ponglen(this_ptr: number, val: number): void {
4549                 if(!isWasmInitialized) {
4550                         throw new Error("initializeWasm() must be awaited first!");
4551                 }
4552                 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
4553                 // debug statements here
4554         }
4555         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
4556         export function Ping_get_byteslen(this_ptr: number): number {
4557                 if(!isWasmInitialized) {
4558                         throw new Error("initializeWasm() must be awaited first!");
4559                 }
4560                 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
4561                 return nativeResponseValue;
4562         }
4563         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
4564         export function Ping_set_byteslen(this_ptr: number, val: number): void {
4565                 if(!isWasmInitialized) {
4566                         throw new Error("initializeWasm() must be awaited first!");
4567                 }
4568                 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
4569                 // debug statements here
4570         }
4571         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
4572         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
4573                 if(!isWasmInitialized) {
4574                         throw new Error("initializeWasm() must be awaited first!");
4575                 }
4576                 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
4577                 return nativeResponseValue;
4578         }
4579         // void Pong_free(struct LDKPong this_ptr);
4580         export function Pong_free(this_ptr: number): void {
4581                 if(!isWasmInitialized) {
4582                         throw new Error("initializeWasm() must be awaited first!");
4583                 }
4584                 const nativeResponseValue = wasm.Pong_free(this_ptr);
4585                 // debug statements here
4586         }
4587         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
4588         export function Pong_clone(orig: number): number {
4589                 if(!isWasmInitialized) {
4590                         throw new Error("initializeWasm() must be awaited first!");
4591                 }
4592                 const nativeResponseValue = wasm.Pong_clone(orig);
4593                 return nativeResponseValue;
4594         }
4595         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
4596         export function Pong_get_byteslen(this_ptr: number): number {
4597                 if(!isWasmInitialized) {
4598                         throw new Error("initializeWasm() must be awaited first!");
4599                 }
4600                 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
4601                 return nativeResponseValue;
4602         }
4603         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
4604         export function Pong_set_byteslen(this_ptr: number, val: number): void {
4605                 if(!isWasmInitialized) {
4606                         throw new Error("initializeWasm() must be awaited first!");
4607                 }
4608                 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
4609                 // debug statements here
4610         }
4611         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
4612         export function Pong_new(byteslen_arg: number): number {
4613                 if(!isWasmInitialized) {
4614                         throw new Error("initializeWasm() must be awaited first!");
4615                 }
4616                 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
4617                 return nativeResponseValue;
4618         }
4619         // void OpenChannel_free(struct LDKOpenChannel this_ptr);
4620         export function OpenChannel_free(this_ptr: number): void {
4621                 if(!isWasmInitialized) {
4622                         throw new Error("initializeWasm() must be awaited first!");
4623                 }
4624                 const nativeResponseValue = wasm.OpenChannel_free(this_ptr);
4625                 // debug statements here
4626         }
4627         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
4628         export function OpenChannel_clone(orig: number): number {
4629                 if(!isWasmInitialized) {
4630                         throw new Error("initializeWasm() must be awaited first!");
4631                 }
4632                 const nativeResponseValue = wasm.OpenChannel_clone(orig);
4633                 return nativeResponseValue;
4634         }
4635         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
4636         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
4637                 if(!isWasmInitialized) {
4638                         throw new Error("initializeWasm() must be awaited first!");
4639                 }
4640                 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
4641                 return decodeArray(nativeResponseValue);
4642         }
4643         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4644         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
4645                 if(!isWasmInitialized) {
4646                         throw new Error("initializeWasm() must be awaited first!");
4647                 }
4648                 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
4649                 // debug statements here
4650         }
4651         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
4652         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
4653                 if(!isWasmInitialized) {
4654                         throw new Error("initializeWasm() must be awaited first!");
4655                 }
4656                 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
4657                 return decodeArray(nativeResponseValue);
4658         }
4659         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4660         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
4661                 if(!isWasmInitialized) {
4662                         throw new Error("initializeWasm() must be awaited first!");
4663                 }
4664                 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
4665                 // debug statements here
4666         }
4667         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4668         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
4669                 if(!isWasmInitialized) {
4670                         throw new Error("initializeWasm() must be awaited first!");
4671                 }
4672                 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
4673                 return nativeResponseValue;
4674         }
4675         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4676         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
4677                 if(!isWasmInitialized) {
4678                         throw new Error("initializeWasm() must be awaited first!");
4679                 }
4680                 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
4681                 // debug statements here
4682         }
4683         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4684         export function OpenChannel_get_push_msat(this_ptr: number): number {
4685                 if(!isWasmInitialized) {
4686                         throw new Error("initializeWasm() must be awaited first!");
4687                 }
4688                 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
4689                 return nativeResponseValue;
4690         }
4691         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4692         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
4693                 if(!isWasmInitialized) {
4694                         throw new Error("initializeWasm() must be awaited first!");
4695                 }
4696                 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
4697                 // debug statements here
4698         }
4699         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4700         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
4701                 if(!isWasmInitialized) {
4702                         throw new Error("initializeWasm() must be awaited first!");
4703                 }
4704                 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
4705                 return nativeResponseValue;
4706         }
4707         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4708         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
4709                 if(!isWasmInitialized) {
4710                         throw new Error("initializeWasm() must be awaited first!");
4711                 }
4712                 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
4713                 // debug statements here
4714         }
4715         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4716         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
4717                 if(!isWasmInitialized) {
4718                         throw new Error("initializeWasm() must be awaited first!");
4719                 }
4720                 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
4721                 return nativeResponseValue;
4722         }
4723         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4724         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
4725                 if(!isWasmInitialized) {
4726                         throw new Error("initializeWasm() must be awaited first!");
4727                 }
4728                 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
4729                 // debug statements here
4730         }
4731         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4732         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
4733                 if(!isWasmInitialized) {
4734                         throw new Error("initializeWasm() must be awaited first!");
4735                 }
4736                 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
4737                 return nativeResponseValue;
4738         }
4739         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4740         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
4741                 if(!isWasmInitialized) {
4742                         throw new Error("initializeWasm() must be awaited first!");
4743                 }
4744                 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
4745                 // debug statements here
4746         }
4747         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4748         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
4749                 if(!isWasmInitialized) {
4750                         throw new Error("initializeWasm() must be awaited first!");
4751                 }
4752                 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
4753                 return nativeResponseValue;
4754         }
4755         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4756         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
4757                 if(!isWasmInitialized) {
4758                         throw new Error("initializeWasm() must be awaited first!");
4759                 }
4760                 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
4761                 // debug statements here
4762         }
4763         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4764         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
4765                 if(!isWasmInitialized) {
4766                         throw new Error("initializeWasm() must be awaited first!");
4767                 }
4768                 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
4769                 return nativeResponseValue;
4770         }
4771         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
4772         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
4773                 if(!isWasmInitialized) {
4774                         throw new Error("initializeWasm() must be awaited first!");
4775                 }
4776                 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
4777                 // debug statements here
4778         }
4779         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4780         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
4781                 if(!isWasmInitialized) {
4782                         throw new Error("initializeWasm() must be awaited first!");
4783                 }
4784                 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
4785                 return nativeResponseValue;
4786         }
4787         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
4788         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
4789                 if(!isWasmInitialized) {
4790                         throw new Error("initializeWasm() must be awaited first!");
4791                 }
4792                 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
4793                 // debug statements here
4794         }
4795         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4796         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
4797                 if(!isWasmInitialized) {
4798                         throw new Error("initializeWasm() must be awaited first!");
4799                 }
4800                 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
4801                 return nativeResponseValue;
4802         }
4803         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
4804         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
4805                 if(!isWasmInitialized) {
4806                         throw new Error("initializeWasm() must be awaited first!");
4807                 }
4808                 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
4809                 // debug statements here
4810         }
4811         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4812         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
4813                 if(!isWasmInitialized) {
4814                         throw new Error("initializeWasm() must be awaited first!");
4815                 }
4816                 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
4817                 return decodeArray(nativeResponseValue);
4818         }
4819         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4820         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
4821                 if(!isWasmInitialized) {
4822                         throw new Error("initializeWasm() must be awaited first!");
4823                 }
4824                 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
4825                 // debug statements here
4826         }
4827         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4828         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
4829                 if(!isWasmInitialized) {
4830                         throw new Error("initializeWasm() must be awaited first!");
4831                 }
4832                 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
4833                 return decodeArray(nativeResponseValue);
4834         }
4835         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4836         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
4837                 if(!isWasmInitialized) {
4838                         throw new Error("initializeWasm() must be awaited first!");
4839                 }
4840                 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
4841                 // debug statements here
4842         }
4843         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4844         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
4845                 if(!isWasmInitialized) {
4846                         throw new Error("initializeWasm() must be awaited first!");
4847                 }
4848                 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
4849                 return decodeArray(nativeResponseValue);
4850         }
4851         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4852         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
4853                 if(!isWasmInitialized) {
4854                         throw new Error("initializeWasm() must be awaited first!");
4855                 }
4856                 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
4857                 // debug statements here
4858         }
4859         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4860         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
4861                 if(!isWasmInitialized) {
4862                         throw new Error("initializeWasm() must be awaited first!");
4863                 }
4864                 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
4865                 return decodeArray(nativeResponseValue);
4866         }
4867         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4868         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
4869                 if(!isWasmInitialized) {
4870                         throw new Error("initializeWasm() must be awaited first!");
4871                 }
4872                 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
4873                 // debug statements here
4874         }
4875         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4876         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
4877                 if(!isWasmInitialized) {
4878                         throw new Error("initializeWasm() must be awaited first!");
4879                 }
4880                 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
4881                 return decodeArray(nativeResponseValue);
4882         }
4883         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4884         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
4885                 if(!isWasmInitialized) {
4886                         throw new Error("initializeWasm() must be awaited first!");
4887                 }
4888                 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
4889                 // debug statements here
4890         }
4891         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4892         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
4893                 if(!isWasmInitialized) {
4894                         throw new Error("initializeWasm() must be awaited first!");
4895                 }
4896                 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
4897                 return decodeArray(nativeResponseValue);
4898         }
4899         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4900         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
4901                 if(!isWasmInitialized) {
4902                         throw new Error("initializeWasm() must be awaited first!");
4903                 }
4904                 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
4905                 // debug statements here
4906         }
4907         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4908         export function OpenChannel_get_channel_flags(this_ptr: number): number {
4909                 if(!isWasmInitialized) {
4910                         throw new Error("initializeWasm() must be awaited first!");
4911                 }
4912                 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
4913                 return nativeResponseValue;
4914         }
4915         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
4916         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
4917                 if(!isWasmInitialized) {
4918                         throw new Error("initializeWasm() must be awaited first!");
4919                 }
4920                 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
4921                 // debug statements here
4922         }
4923         // void AcceptChannel_free(struct LDKAcceptChannel this_ptr);
4924         export function AcceptChannel_free(this_ptr: number): void {
4925                 if(!isWasmInitialized) {
4926                         throw new Error("initializeWasm() must be awaited first!");
4927                 }
4928                 const nativeResponseValue = wasm.AcceptChannel_free(this_ptr);
4929                 // debug statements here
4930         }
4931         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
4932         export function AcceptChannel_clone(orig: number): number {
4933                 if(!isWasmInitialized) {
4934                         throw new Error("initializeWasm() must be awaited first!");
4935                 }
4936                 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
4937                 return nativeResponseValue;
4938         }
4939         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
4940         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
4941                 if(!isWasmInitialized) {
4942                         throw new Error("initializeWasm() must be awaited first!");
4943                 }
4944                 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
4945                 return decodeArray(nativeResponseValue);
4946         }
4947         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4948         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
4949                 if(!isWasmInitialized) {
4950                         throw new Error("initializeWasm() must be awaited first!");
4951                 }
4952                 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
4953                 // debug statements here
4954         }
4955         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4956         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
4957                 if(!isWasmInitialized) {
4958                         throw new Error("initializeWasm() must be awaited first!");
4959                 }
4960                 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
4961                 return nativeResponseValue;
4962         }
4963         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
4964         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
4965                 if(!isWasmInitialized) {
4966                         throw new Error("initializeWasm() must be awaited first!");
4967                 }
4968                 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
4969                 // debug statements here
4970         }
4971         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4972         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
4973                 if(!isWasmInitialized) {
4974                         throw new Error("initializeWasm() must be awaited first!");
4975                 }
4976                 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
4977                 return nativeResponseValue;
4978         }
4979         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
4980         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
4981                 if(!isWasmInitialized) {
4982                         throw new Error("initializeWasm() must be awaited first!");
4983                 }
4984                 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
4985                 // debug statements here
4986         }
4987         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4988         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
4989                 if(!isWasmInitialized) {
4990                         throw new Error("initializeWasm() must be awaited first!");
4991                 }
4992                 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
4993                 return nativeResponseValue;
4994         }
4995         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
4996         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
4997                 if(!isWasmInitialized) {
4998                         throw new Error("initializeWasm() must be awaited first!");
4999                 }
5000                 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
5001                 // debug statements here
5002         }
5003         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5004         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
5005                 if(!isWasmInitialized) {
5006                         throw new Error("initializeWasm() must be awaited first!");
5007                 }
5008                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
5009                 return nativeResponseValue;
5010         }
5011         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
5012         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
5013                 if(!isWasmInitialized) {
5014                         throw new Error("initializeWasm() must be awaited first!");
5015                 }
5016                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
5017                 // debug statements here
5018         }
5019         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5020         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
5021                 if(!isWasmInitialized) {
5022                         throw new Error("initializeWasm() must be awaited first!");
5023                 }
5024                 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
5025                 return nativeResponseValue;
5026         }
5027         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
5028         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
5029                 if(!isWasmInitialized) {
5030                         throw new Error("initializeWasm() must be awaited first!");
5031                 }
5032                 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
5033                 // debug statements here
5034         }
5035         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5036         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
5037                 if(!isWasmInitialized) {
5038                         throw new Error("initializeWasm() must be awaited first!");
5039                 }
5040                 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
5041                 return nativeResponseValue;
5042         }
5043         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
5044         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
5045                 if(!isWasmInitialized) {
5046                         throw new Error("initializeWasm() must be awaited first!");
5047                 }
5048                 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
5049                 // debug statements here
5050         }
5051         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5052         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
5053                 if(!isWasmInitialized) {
5054                         throw new Error("initializeWasm() must be awaited first!");
5055                 }
5056                 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
5057                 return nativeResponseValue;
5058         }
5059         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
5060         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
5061                 if(!isWasmInitialized) {
5062                         throw new Error("initializeWasm() must be awaited first!");
5063                 }
5064                 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
5065                 // debug statements here
5066         }
5067         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5068         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
5069                 if(!isWasmInitialized) {
5070                         throw new Error("initializeWasm() must be awaited first!");
5071                 }
5072                 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
5073                 return decodeArray(nativeResponseValue);
5074         }
5075         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5076         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
5077                 if(!isWasmInitialized) {
5078                         throw new Error("initializeWasm() must be awaited first!");
5079                 }
5080                 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
5081                 // debug statements here
5082         }
5083         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5084         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
5085                 if(!isWasmInitialized) {
5086                         throw new Error("initializeWasm() must be awaited first!");
5087                 }
5088                 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
5089                 return decodeArray(nativeResponseValue);
5090         }
5091         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5092         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
5093                 if(!isWasmInitialized) {
5094                         throw new Error("initializeWasm() must be awaited first!");
5095                 }
5096                 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
5097                 // debug statements here
5098         }
5099         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5100         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
5101                 if(!isWasmInitialized) {
5102                         throw new Error("initializeWasm() must be awaited first!");
5103                 }
5104                 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
5105                 return decodeArray(nativeResponseValue);
5106         }
5107         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5108         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
5109                 if(!isWasmInitialized) {
5110                         throw new Error("initializeWasm() must be awaited first!");
5111                 }
5112                 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
5113                 // debug statements here
5114         }
5115         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5116         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
5117                 if(!isWasmInitialized) {
5118                         throw new Error("initializeWasm() must be awaited first!");
5119                 }
5120                 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
5121                 return decodeArray(nativeResponseValue);
5122         }
5123         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5124         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
5125                 if(!isWasmInitialized) {
5126                         throw new Error("initializeWasm() must be awaited first!");
5127                 }
5128                 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
5129                 // debug statements here
5130         }
5131         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5132         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
5133                 if(!isWasmInitialized) {
5134                         throw new Error("initializeWasm() must be awaited first!");
5135                 }
5136                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
5137                 return decodeArray(nativeResponseValue);
5138         }
5139         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5140         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
5141                 if(!isWasmInitialized) {
5142                         throw new Error("initializeWasm() must be awaited first!");
5143                 }
5144                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
5145                 // debug statements here
5146         }
5147         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5148         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
5149                 if(!isWasmInitialized) {
5150                         throw new Error("initializeWasm() must be awaited first!");
5151                 }
5152                 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
5153                 return decodeArray(nativeResponseValue);
5154         }
5155         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5156         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5157                 if(!isWasmInitialized) {
5158                         throw new Error("initializeWasm() must be awaited first!");
5159                 }
5160                 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
5161                 // debug statements here
5162         }
5163         // void FundingCreated_free(struct LDKFundingCreated this_ptr);
5164         export function FundingCreated_free(this_ptr: number): void {
5165                 if(!isWasmInitialized) {
5166                         throw new Error("initializeWasm() must be awaited first!");
5167                 }
5168                 const nativeResponseValue = wasm.FundingCreated_free(this_ptr);
5169                 // debug statements here
5170         }
5171         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
5172         export function FundingCreated_clone(orig: number): number {
5173                 if(!isWasmInitialized) {
5174                         throw new Error("initializeWasm() must be awaited first!");
5175                 }
5176                 const nativeResponseValue = wasm.FundingCreated_clone(orig);
5177                 return nativeResponseValue;
5178         }
5179         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
5180         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
5181                 if(!isWasmInitialized) {
5182                         throw new Error("initializeWasm() must be awaited first!");
5183                 }
5184                 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
5185                 return decodeArray(nativeResponseValue);
5186         }
5187         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5188         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
5189                 if(!isWasmInitialized) {
5190                         throw new Error("initializeWasm() must be awaited first!");
5191                 }
5192                 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
5193                 // debug statements here
5194         }
5195         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
5196         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
5197                 if(!isWasmInitialized) {
5198                         throw new Error("initializeWasm() must be awaited first!");
5199                 }
5200                 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
5201                 return decodeArray(nativeResponseValue);
5202         }
5203         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5204         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
5205                 if(!isWasmInitialized) {
5206                         throw new Error("initializeWasm() must be awaited first!");
5207                 }
5208                 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
5209                 // debug statements here
5210         }
5211         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
5212         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
5213                 if(!isWasmInitialized) {
5214                         throw new Error("initializeWasm() must be awaited first!");
5215                 }
5216                 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
5217                 return nativeResponseValue;
5218         }
5219         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
5220         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
5221                 if(!isWasmInitialized) {
5222                         throw new Error("initializeWasm() must be awaited first!");
5223                 }
5224                 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
5225                 // debug statements here
5226         }
5227         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
5228         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
5229                 if(!isWasmInitialized) {
5230                         throw new Error("initializeWasm() must be awaited first!");
5231                 }
5232                 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
5233                 return decodeArray(nativeResponseValue);
5234         }
5235         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
5236         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
5237                 if(!isWasmInitialized) {
5238                         throw new Error("initializeWasm() must be awaited first!");
5239                 }
5240                 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
5241                 // debug statements here
5242         }
5243         // 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);
5244         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
5245                 if(!isWasmInitialized) {
5246                         throw new Error("initializeWasm() must be awaited first!");
5247                 }
5248                 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
5249                 return nativeResponseValue;
5250         }
5251         // void FundingSigned_free(struct LDKFundingSigned this_ptr);
5252         export function FundingSigned_free(this_ptr: number): void {
5253                 if(!isWasmInitialized) {
5254                         throw new Error("initializeWasm() must be awaited first!");
5255                 }
5256                 const nativeResponseValue = wasm.FundingSigned_free(this_ptr);
5257                 // debug statements here
5258         }
5259         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
5260         export function FundingSigned_clone(orig: number): number {
5261                 if(!isWasmInitialized) {
5262                         throw new Error("initializeWasm() must be awaited first!");
5263                 }
5264                 const nativeResponseValue = wasm.FundingSigned_clone(orig);
5265                 return nativeResponseValue;
5266         }
5267         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
5268         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
5269                 if(!isWasmInitialized) {
5270                         throw new Error("initializeWasm() must be awaited first!");
5271                 }
5272                 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
5273                 return decodeArray(nativeResponseValue);
5274         }
5275         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5276         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
5277                 if(!isWasmInitialized) {
5278                         throw new Error("initializeWasm() must be awaited first!");
5279                 }
5280                 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
5281                 // debug statements here
5282         }
5283         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
5284         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
5285                 if(!isWasmInitialized) {
5286                         throw new Error("initializeWasm() must be awaited first!");
5287                 }
5288                 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
5289                 return decodeArray(nativeResponseValue);
5290         }
5291         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
5292         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
5293                 if(!isWasmInitialized) {
5294                         throw new Error("initializeWasm() must be awaited first!");
5295                 }
5296                 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
5297                 // debug statements here
5298         }
5299         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
5300         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
5301                 if(!isWasmInitialized) {
5302                         throw new Error("initializeWasm() must be awaited first!");
5303                 }
5304                 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
5305                 return nativeResponseValue;
5306         }
5307         // void FundingLocked_free(struct LDKFundingLocked this_ptr);
5308         export function FundingLocked_free(this_ptr: number): void {
5309                 if(!isWasmInitialized) {
5310                         throw new Error("initializeWasm() must be awaited first!");
5311                 }
5312                 const nativeResponseValue = wasm.FundingLocked_free(this_ptr);
5313                 // debug statements here
5314         }
5315         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
5316         export function FundingLocked_clone(orig: number): number {
5317                 if(!isWasmInitialized) {
5318                         throw new Error("initializeWasm() must be awaited first!");
5319                 }
5320                 const nativeResponseValue = wasm.FundingLocked_clone(orig);
5321                 return nativeResponseValue;
5322         }
5323         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
5324         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
5325                 if(!isWasmInitialized) {
5326                         throw new Error("initializeWasm() must be awaited first!");
5327                 }
5328                 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
5329                 return decodeArray(nativeResponseValue);
5330         }
5331         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5332         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
5333                 if(!isWasmInitialized) {
5334                         throw new Error("initializeWasm() must be awaited first!");
5335                 }
5336                 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
5337                 // debug statements here
5338         }
5339         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
5340         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
5341                 if(!isWasmInitialized) {
5342                         throw new Error("initializeWasm() must be awaited first!");
5343                 }
5344                 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
5345                 return decodeArray(nativeResponseValue);
5346         }
5347         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5348         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5349                 if(!isWasmInitialized) {
5350                         throw new Error("initializeWasm() must be awaited first!");
5351                 }
5352                 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
5353                 // debug statements here
5354         }
5355         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
5356         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
5357                 if(!isWasmInitialized) {
5358                         throw new Error("initializeWasm() must be awaited first!");
5359                 }
5360                 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
5361                 return nativeResponseValue;
5362         }
5363         // void Shutdown_free(struct LDKShutdown this_ptr);
5364         export function Shutdown_free(this_ptr: number): void {
5365                 if(!isWasmInitialized) {
5366                         throw new Error("initializeWasm() must be awaited first!");
5367                 }
5368                 const nativeResponseValue = wasm.Shutdown_free(this_ptr);
5369                 // debug statements here
5370         }
5371         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
5372         export function Shutdown_clone(orig: number): number {
5373                 if(!isWasmInitialized) {
5374                         throw new Error("initializeWasm() must be awaited first!");
5375                 }
5376                 const nativeResponseValue = wasm.Shutdown_clone(orig);
5377                 return nativeResponseValue;
5378         }
5379         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
5380         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
5381                 if(!isWasmInitialized) {
5382                         throw new Error("initializeWasm() must be awaited first!");
5383                 }
5384                 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
5385                 return decodeArray(nativeResponseValue);
5386         }
5387         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5388         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
5389                 if(!isWasmInitialized) {
5390                         throw new Error("initializeWasm() must be awaited first!");
5391                 }
5392                 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
5393                 // debug statements here
5394         }
5395         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
5396         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
5397                 if(!isWasmInitialized) {
5398                         throw new Error("initializeWasm() must be awaited first!");
5399                 }
5400                 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
5401                 return decodeArray(nativeResponseValue);
5402         }
5403         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
5404         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
5405                 if(!isWasmInitialized) {
5406                         throw new Error("initializeWasm() must be awaited first!");
5407                 }
5408                 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
5409                 // debug statements here
5410         }
5411         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
5412         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
5413                 if(!isWasmInitialized) {
5414                         throw new Error("initializeWasm() must be awaited first!");
5415                 }
5416                 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
5417                 return nativeResponseValue;
5418         }
5419         // void ClosingSigned_free(struct LDKClosingSigned this_ptr);
5420         export function ClosingSigned_free(this_ptr: number): void {
5421                 if(!isWasmInitialized) {
5422                         throw new Error("initializeWasm() must be awaited first!");
5423                 }
5424                 const nativeResponseValue = wasm.ClosingSigned_free(this_ptr);
5425                 // debug statements here
5426         }
5427         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
5428         export function ClosingSigned_clone(orig: number): number {
5429                 if(!isWasmInitialized) {
5430                         throw new Error("initializeWasm() must be awaited first!");
5431                 }
5432                 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
5433                 return nativeResponseValue;
5434         }
5435         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
5436         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
5437                 if(!isWasmInitialized) {
5438                         throw new Error("initializeWasm() must be awaited first!");
5439                 }
5440                 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
5441                 return decodeArray(nativeResponseValue);
5442         }
5443         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5444         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
5445                 if(!isWasmInitialized) {
5446                         throw new Error("initializeWasm() must be awaited first!");
5447                 }
5448                 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
5449                 // debug statements here
5450         }
5451         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
5452         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
5453                 if(!isWasmInitialized) {
5454                         throw new Error("initializeWasm() must be awaited first!");
5455                 }
5456                 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
5457                 return nativeResponseValue;
5458         }
5459         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
5460         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
5461                 if(!isWasmInitialized) {
5462                         throw new Error("initializeWasm() must be awaited first!");
5463                 }
5464                 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
5465                 // debug statements here
5466         }
5467         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
5468         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
5469                 if(!isWasmInitialized) {
5470                         throw new Error("initializeWasm() must be awaited first!");
5471                 }
5472                 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
5473                 return decodeArray(nativeResponseValue);
5474         }
5475         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
5476         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
5477                 if(!isWasmInitialized) {
5478                         throw new Error("initializeWasm() must be awaited first!");
5479                 }
5480                 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
5481                 // debug statements here
5482         }
5483         // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
5484         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
5485                 if(!isWasmInitialized) {
5486                         throw new Error("initializeWasm() must be awaited first!");
5487                 }
5488                 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
5489                 return nativeResponseValue;
5490         }
5491         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_ptr);
5492         export function UpdateAddHTLC_free(this_ptr: number): void {
5493                 if(!isWasmInitialized) {
5494                         throw new Error("initializeWasm() must be awaited first!");
5495                 }
5496                 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_ptr);
5497                 // debug statements here
5498         }
5499         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
5500         export function UpdateAddHTLC_clone(orig: number): number {
5501                 if(!isWasmInitialized) {
5502                         throw new Error("initializeWasm() must be awaited first!");
5503                 }
5504                 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
5505                 return nativeResponseValue;
5506         }
5507         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
5508         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
5509                 if(!isWasmInitialized) {
5510                         throw new Error("initializeWasm() must be awaited first!");
5511                 }
5512                 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
5513                 return decodeArray(nativeResponseValue);
5514         }
5515         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5516         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
5517                 if(!isWasmInitialized) {
5518                         throw new Error("initializeWasm() must be awaited first!");
5519                 }
5520                 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
5521                 // debug statements here
5522         }
5523         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
5524         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
5525                 if(!isWasmInitialized) {
5526                         throw new Error("initializeWasm() must be awaited first!");
5527                 }
5528                 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
5529                 return nativeResponseValue;
5530         }
5531         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
5532         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
5533                 if(!isWasmInitialized) {
5534                         throw new Error("initializeWasm() must be awaited first!");
5535                 }
5536                 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
5537                 // debug statements here
5538         }
5539         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
5540         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
5541                 if(!isWasmInitialized) {
5542                         throw new Error("initializeWasm() must be awaited first!");
5543                 }
5544                 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
5545                 return nativeResponseValue;
5546         }
5547         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
5548         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
5549                 if(!isWasmInitialized) {
5550                         throw new Error("initializeWasm() must be awaited first!");
5551                 }
5552                 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
5553                 // debug statements here
5554         }
5555         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
5556         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
5557                 if(!isWasmInitialized) {
5558                         throw new Error("initializeWasm() must be awaited first!");
5559                 }
5560                 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
5561                 return decodeArray(nativeResponseValue);
5562         }
5563         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5564         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
5565                 if(!isWasmInitialized) {
5566                         throw new Error("initializeWasm() must be awaited first!");
5567                 }
5568                 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
5569                 // debug statements here
5570         }
5571         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
5572         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
5573                 if(!isWasmInitialized) {
5574                         throw new Error("initializeWasm() must be awaited first!");
5575                 }
5576                 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
5577                 return nativeResponseValue;
5578         }
5579         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
5580         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
5581                 if(!isWasmInitialized) {
5582                         throw new Error("initializeWasm() must be awaited first!");
5583                 }
5584                 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
5585                 // debug statements here
5586         }
5587         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_ptr);
5588         export function UpdateFulfillHTLC_free(this_ptr: number): void {
5589                 if(!isWasmInitialized) {
5590                         throw new Error("initializeWasm() must be awaited first!");
5591                 }
5592                 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_ptr);
5593                 // debug statements here
5594         }
5595         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
5596         export function UpdateFulfillHTLC_clone(orig: number): number {
5597                 if(!isWasmInitialized) {
5598                         throw new Error("initializeWasm() must be awaited first!");
5599                 }
5600                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
5601                 return nativeResponseValue;
5602         }
5603         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
5604         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
5605                 if(!isWasmInitialized) {
5606                         throw new Error("initializeWasm() must be awaited first!");
5607                 }
5608                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
5609                 return decodeArray(nativeResponseValue);
5610         }
5611         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5612         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
5613                 if(!isWasmInitialized) {
5614                         throw new Error("initializeWasm() must be awaited first!");
5615                 }
5616                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
5617                 // debug statements here
5618         }
5619         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
5620         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
5621                 if(!isWasmInitialized) {
5622                         throw new Error("initializeWasm() must be awaited first!");
5623                 }
5624                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
5625                 return nativeResponseValue;
5626         }
5627         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
5628         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
5629                 if(!isWasmInitialized) {
5630                         throw new Error("initializeWasm() must be awaited first!");
5631                 }
5632                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
5633                 // debug statements here
5634         }
5635         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
5636         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
5637                 if(!isWasmInitialized) {
5638                         throw new Error("initializeWasm() must be awaited first!");
5639                 }
5640                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
5641                 return decodeArray(nativeResponseValue);
5642         }
5643         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5644         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
5645                 if(!isWasmInitialized) {
5646                         throw new Error("initializeWasm() must be awaited first!");
5647                 }
5648                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
5649                 // debug statements here
5650         }
5651         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
5652         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
5653                 if(!isWasmInitialized) {
5654                         throw new Error("initializeWasm() must be awaited first!");
5655                 }
5656                 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
5657                 return nativeResponseValue;
5658         }
5659         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_ptr);
5660         export function UpdateFailHTLC_free(this_ptr: number): void {
5661                 if(!isWasmInitialized) {
5662                         throw new Error("initializeWasm() must be awaited first!");
5663                 }
5664                 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_ptr);
5665                 // debug statements here
5666         }
5667         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
5668         export function UpdateFailHTLC_clone(orig: number): number {
5669                 if(!isWasmInitialized) {
5670                         throw new Error("initializeWasm() must be awaited first!");
5671                 }
5672                 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
5673                 return nativeResponseValue;
5674         }
5675         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
5676         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
5677                 if(!isWasmInitialized) {
5678                         throw new Error("initializeWasm() must be awaited first!");
5679                 }
5680                 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
5681                 return decodeArray(nativeResponseValue);
5682         }
5683         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5684         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
5685                 if(!isWasmInitialized) {
5686                         throw new Error("initializeWasm() must be awaited first!");
5687                 }
5688                 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
5689                 // debug statements here
5690         }
5691         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
5692         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
5693                 if(!isWasmInitialized) {
5694                         throw new Error("initializeWasm() must be awaited first!");
5695                 }
5696                 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
5697                 return nativeResponseValue;
5698         }
5699         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
5700         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
5701                 if(!isWasmInitialized) {
5702                         throw new Error("initializeWasm() must be awaited first!");
5703                 }
5704                 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
5705                 // debug statements here
5706         }
5707         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_ptr);
5708         export function UpdateFailMalformedHTLC_free(this_ptr: number): void {
5709                 if(!isWasmInitialized) {
5710                         throw new Error("initializeWasm() must be awaited first!");
5711                 }
5712                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_ptr);
5713                 // debug statements here
5714         }
5715         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
5716         export function UpdateFailMalformedHTLC_clone(orig: number): number {
5717                 if(!isWasmInitialized) {
5718                         throw new Error("initializeWasm() must be awaited first!");
5719                 }
5720                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
5721                 return nativeResponseValue;
5722         }
5723         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
5724         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
5725                 if(!isWasmInitialized) {
5726                         throw new Error("initializeWasm() must be awaited first!");
5727                 }
5728                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
5729                 return decodeArray(nativeResponseValue);
5730         }
5731         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5732         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
5733                 if(!isWasmInitialized) {
5734                         throw new Error("initializeWasm() must be awaited first!");
5735                 }
5736                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
5737                 // debug statements here
5738         }
5739         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
5740         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
5741                 if(!isWasmInitialized) {
5742                         throw new Error("initializeWasm() must be awaited first!");
5743                 }
5744                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
5745                 return nativeResponseValue;
5746         }
5747         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
5748         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
5749                 if(!isWasmInitialized) {
5750                         throw new Error("initializeWasm() must be awaited first!");
5751                 }
5752                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
5753                 // debug statements here
5754         }
5755         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
5756         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
5757                 if(!isWasmInitialized) {
5758                         throw new Error("initializeWasm() must be awaited first!");
5759                 }
5760                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
5761                 return nativeResponseValue;
5762         }
5763         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
5764         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
5765                 if(!isWasmInitialized) {
5766                         throw new Error("initializeWasm() must be awaited first!");
5767                 }
5768                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
5769                 // debug statements here
5770         }
5771         // void CommitmentSigned_free(struct LDKCommitmentSigned this_ptr);
5772         export function CommitmentSigned_free(this_ptr: number): void {
5773                 if(!isWasmInitialized) {
5774                         throw new Error("initializeWasm() must be awaited first!");
5775                 }
5776                 const nativeResponseValue = wasm.CommitmentSigned_free(this_ptr);
5777                 // debug statements here
5778         }
5779         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
5780         export function CommitmentSigned_clone(orig: number): number {
5781                 if(!isWasmInitialized) {
5782                         throw new Error("initializeWasm() must be awaited first!");
5783                 }
5784                 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
5785                 return nativeResponseValue;
5786         }
5787         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
5788         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
5789                 if(!isWasmInitialized) {
5790                         throw new Error("initializeWasm() must be awaited first!");
5791                 }
5792                 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
5793                 return decodeArray(nativeResponseValue);
5794         }
5795         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5796         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
5797                 if(!isWasmInitialized) {
5798                         throw new Error("initializeWasm() must be awaited first!");
5799                 }
5800                 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
5801                 // debug statements here
5802         }
5803         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
5804         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
5805                 if(!isWasmInitialized) {
5806                         throw new Error("initializeWasm() must be awaited first!");
5807                 }
5808                 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
5809                 return decodeArray(nativeResponseValue);
5810         }
5811         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
5812         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
5813                 if(!isWasmInitialized) {
5814                         throw new Error("initializeWasm() must be awaited first!");
5815                 }
5816                 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
5817                 // debug statements here
5818         }
5819         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
5820         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
5821                 if(!isWasmInitialized) {
5822                         throw new Error("initializeWasm() must be awaited first!");
5823                 }
5824                 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
5825                 // debug statements here
5826         }
5827         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
5828         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
5829                 if(!isWasmInitialized) {
5830                         throw new Error("initializeWasm() must be awaited first!");
5831                 }
5832                 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
5833                 return nativeResponseValue;
5834         }
5835         // void RevokeAndACK_free(struct LDKRevokeAndACK this_ptr);
5836         export function RevokeAndACK_free(this_ptr: number): void {
5837                 if(!isWasmInitialized) {
5838                         throw new Error("initializeWasm() must be awaited first!");
5839                 }
5840                 const nativeResponseValue = wasm.RevokeAndACK_free(this_ptr);
5841                 // debug statements here
5842         }
5843         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
5844         export function RevokeAndACK_clone(orig: number): number {
5845                 if(!isWasmInitialized) {
5846                         throw new Error("initializeWasm() must be awaited first!");
5847                 }
5848                 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
5849                 return nativeResponseValue;
5850         }
5851         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
5852         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
5853                 if(!isWasmInitialized) {
5854                         throw new Error("initializeWasm() must be awaited first!");
5855                 }
5856                 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
5857                 return decodeArray(nativeResponseValue);
5858         }
5859         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5860         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
5861                 if(!isWasmInitialized) {
5862                         throw new Error("initializeWasm() must be awaited first!");
5863                 }
5864                 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
5865                 // debug statements here
5866         }
5867         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
5868         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
5869                 if(!isWasmInitialized) {
5870                         throw new Error("initializeWasm() must be awaited first!");
5871                 }
5872                 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
5873                 return decodeArray(nativeResponseValue);
5874         }
5875         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5876         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
5877                 if(!isWasmInitialized) {
5878                         throw new Error("initializeWasm() must be awaited first!");
5879                 }
5880                 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
5881                 // debug statements here
5882         }
5883         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
5884         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
5885                 if(!isWasmInitialized) {
5886                         throw new Error("initializeWasm() must be awaited first!");
5887                 }
5888                 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
5889                 return decodeArray(nativeResponseValue);
5890         }
5891         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5892         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5893                 if(!isWasmInitialized) {
5894                         throw new Error("initializeWasm() must be awaited first!");
5895                 }
5896                 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
5897                 // debug statements here
5898         }
5899         // 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);
5900         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
5901                 if(!isWasmInitialized) {
5902                         throw new Error("initializeWasm() must be awaited first!");
5903                 }
5904                 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
5905                 return nativeResponseValue;
5906         }
5907         // void UpdateFee_free(struct LDKUpdateFee this_ptr);
5908         export function UpdateFee_free(this_ptr: number): void {
5909                 if(!isWasmInitialized) {
5910                         throw new Error("initializeWasm() must be awaited first!");
5911                 }
5912                 const nativeResponseValue = wasm.UpdateFee_free(this_ptr);
5913                 // debug statements here
5914         }
5915         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
5916         export function UpdateFee_clone(orig: number): number {
5917                 if(!isWasmInitialized) {
5918                         throw new Error("initializeWasm() must be awaited first!");
5919                 }
5920                 const nativeResponseValue = wasm.UpdateFee_clone(orig);
5921                 return nativeResponseValue;
5922         }
5923         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
5924         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
5925                 if(!isWasmInitialized) {
5926                         throw new Error("initializeWasm() must be awaited first!");
5927                 }
5928                 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
5929                 return decodeArray(nativeResponseValue);
5930         }
5931         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5932         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
5933                 if(!isWasmInitialized) {
5934                         throw new Error("initializeWasm() must be awaited first!");
5935                 }
5936                 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
5937                 // debug statements here
5938         }
5939         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
5940         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
5941                 if(!isWasmInitialized) {
5942                         throw new Error("initializeWasm() must be awaited first!");
5943                 }
5944                 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
5945                 return nativeResponseValue;
5946         }
5947         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
5948         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
5949                 if(!isWasmInitialized) {
5950                         throw new Error("initializeWasm() must be awaited first!");
5951                 }
5952                 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
5953                 // debug statements here
5954         }
5955         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
5956         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
5957                 if(!isWasmInitialized) {
5958                         throw new Error("initializeWasm() must be awaited first!");
5959                 }
5960                 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
5961                 return nativeResponseValue;
5962         }
5963         // void DataLossProtect_free(struct LDKDataLossProtect this_ptr);
5964         export function DataLossProtect_free(this_ptr: number): void {
5965                 if(!isWasmInitialized) {
5966                         throw new Error("initializeWasm() must be awaited first!");
5967                 }
5968                 const nativeResponseValue = wasm.DataLossProtect_free(this_ptr);
5969                 // debug statements here
5970         }
5971         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
5972         export function DataLossProtect_clone(orig: number): number {
5973                 if(!isWasmInitialized) {
5974                         throw new Error("initializeWasm() must be awaited first!");
5975                 }
5976                 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
5977                 return nativeResponseValue;
5978         }
5979         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
5980         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
5981                 if(!isWasmInitialized) {
5982                         throw new Error("initializeWasm() must be awaited first!");
5983                 }
5984                 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
5985                 return decodeArray(nativeResponseValue);
5986         }
5987         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5988         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
5989                 if(!isWasmInitialized) {
5990                         throw new Error("initializeWasm() must be awaited first!");
5991                 }
5992                 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
5993                 // debug statements here
5994         }
5995         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
5996         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
5997                 if(!isWasmInitialized) {
5998                         throw new Error("initializeWasm() must be awaited first!");
5999                 }
6000                 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
6001                 return decodeArray(nativeResponseValue);
6002         }
6003         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6004         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
6005                 if(!isWasmInitialized) {
6006                         throw new Error("initializeWasm() must be awaited first!");
6007                 }
6008                 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
6009                 // debug statements here
6010         }
6011         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
6012         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
6013                 if(!isWasmInitialized) {
6014                         throw new Error("initializeWasm() must be awaited first!");
6015                 }
6016                 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
6017                 return nativeResponseValue;
6018         }
6019         // void ChannelReestablish_free(struct LDKChannelReestablish this_ptr);
6020         export function ChannelReestablish_free(this_ptr: number): void {
6021                 if(!isWasmInitialized) {
6022                         throw new Error("initializeWasm() must be awaited first!");
6023                 }
6024                 const nativeResponseValue = wasm.ChannelReestablish_free(this_ptr);
6025                 // debug statements here
6026         }
6027         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
6028         export function ChannelReestablish_clone(orig: number): number {
6029                 if(!isWasmInitialized) {
6030                         throw new Error("initializeWasm() must be awaited first!");
6031                 }
6032                 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
6033                 return nativeResponseValue;
6034         }
6035         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
6036         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
6037                 if(!isWasmInitialized) {
6038                         throw new Error("initializeWasm() must be awaited first!");
6039                 }
6040                 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
6041                 return decodeArray(nativeResponseValue);
6042         }
6043         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6044         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
6045                 if(!isWasmInitialized) {
6046                         throw new Error("initializeWasm() must be awaited first!");
6047                 }
6048                 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
6049                 // debug statements here
6050         }
6051         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
6052         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
6053                 if(!isWasmInitialized) {
6054                         throw new Error("initializeWasm() must be awaited first!");
6055                 }
6056                 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
6057                 return nativeResponseValue;
6058         }
6059         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
6060         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
6061                 if(!isWasmInitialized) {
6062                         throw new Error("initializeWasm() must be awaited first!");
6063                 }
6064                 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
6065                 // debug statements here
6066         }
6067         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
6068         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
6069                 if(!isWasmInitialized) {
6070                         throw new Error("initializeWasm() must be awaited first!");
6071                 }
6072                 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
6073                 return nativeResponseValue;
6074         }
6075         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
6076         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
6077                 if(!isWasmInitialized) {
6078                         throw new Error("initializeWasm() must be awaited first!");
6079                 }
6080                 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
6081                 // debug statements here
6082         }
6083         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_ptr);
6084         export function AnnouncementSignatures_free(this_ptr: number): void {
6085                 if(!isWasmInitialized) {
6086                         throw new Error("initializeWasm() must be awaited first!");
6087                 }
6088                 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_ptr);
6089                 // debug statements here
6090         }
6091         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
6092         export function AnnouncementSignatures_clone(orig: number): number {
6093                 if(!isWasmInitialized) {
6094                         throw new Error("initializeWasm() must be awaited first!");
6095                 }
6096                 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
6097                 return nativeResponseValue;
6098         }
6099         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
6100         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
6101                 if(!isWasmInitialized) {
6102                         throw new Error("initializeWasm() must be awaited first!");
6103                 }
6104                 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
6105                 return decodeArray(nativeResponseValue);
6106         }
6107         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6108         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
6109                 if(!isWasmInitialized) {
6110                         throw new Error("initializeWasm() must be awaited first!");
6111                 }
6112                 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
6113                 // debug statements here
6114         }
6115         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
6116         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
6117                 if(!isWasmInitialized) {
6118                         throw new Error("initializeWasm() must be awaited first!");
6119                 }
6120                 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
6121                 return nativeResponseValue;
6122         }
6123         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
6124         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
6125                 if(!isWasmInitialized) {
6126                         throw new Error("initializeWasm() must be awaited first!");
6127                 }
6128                 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
6129                 // debug statements here
6130         }
6131         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
6132         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
6133                 if(!isWasmInitialized) {
6134                         throw new Error("initializeWasm() must be awaited first!");
6135                 }
6136                 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
6137                 return decodeArray(nativeResponseValue);
6138         }
6139         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
6140         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
6141                 if(!isWasmInitialized) {
6142                         throw new Error("initializeWasm() must be awaited first!");
6143                 }
6144                 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
6145                 // debug statements here
6146         }
6147         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
6148         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
6149                 if(!isWasmInitialized) {
6150                         throw new Error("initializeWasm() must be awaited first!");
6151                 }
6152                 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
6153                 return decodeArray(nativeResponseValue);
6154         }
6155         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
6156         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
6157                 if(!isWasmInitialized) {
6158                         throw new Error("initializeWasm() must be awaited first!");
6159                 }
6160                 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
6161                 // debug statements here
6162         }
6163         // 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);
6164         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
6165                 if(!isWasmInitialized) {
6166                         throw new Error("initializeWasm() must be awaited first!");
6167                 }
6168                 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
6169                 return nativeResponseValue;
6170         }
6171         // void NetAddress_free(struct LDKNetAddress this_ptr);
6172         export function NetAddress_free(this_ptr: number): void {
6173                 if(!isWasmInitialized) {
6174                         throw new Error("initializeWasm() must be awaited first!");
6175                 }
6176                 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
6177                 // debug statements here
6178         }
6179         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
6180         export function NetAddress_clone(orig: number): number {
6181                 if(!isWasmInitialized) {
6182                         throw new Error("initializeWasm() must be awaited first!");
6183                 }
6184                 const nativeResponseValue = wasm.NetAddress_clone(orig);
6185                 return nativeResponseValue;
6186         }
6187         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
6188         export function NetAddress_write(obj: number): Uint8Array {
6189                 if(!isWasmInitialized) {
6190                         throw new Error("initializeWasm() must be awaited first!");
6191                 }
6192                 const nativeResponseValue = wasm.NetAddress_write(obj);
6193                 return decodeArray(nativeResponseValue);
6194         }
6195         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
6196         export function Result_read(ser: Uint8Array): number {
6197                 if(!isWasmInitialized) {
6198                         throw new Error("initializeWasm() must be awaited first!");
6199                 }
6200                 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
6201                 return nativeResponseValue;
6202         }
6203         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_ptr);
6204         export function UnsignedNodeAnnouncement_free(this_ptr: number): void {
6205                 if(!isWasmInitialized) {
6206                         throw new Error("initializeWasm() must be awaited first!");
6207                 }
6208                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_ptr);
6209                 // debug statements here
6210         }
6211         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
6212         export function UnsignedNodeAnnouncement_clone(orig: number): number {
6213                 if(!isWasmInitialized) {
6214                         throw new Error("initializeWasm() must be awaited first!");
6215                 }
6216                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
6217                 return nativeResponseValue;
6218         }
6219         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
6220         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
6221                 if(!isWasmInitialized) {
6222                         throw new Error("initializeWasm() must be awaited first!");
6223                 }
6224                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
6225                 return nativeResponseValue;
6226         }
6227         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
6228         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
6229                 if(!isWasmInitialized) {
6230                         throw new Error("initializeWasm() must be awaited first!");
6231                 }
6232                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
6233                 // debug statements here
6234         }
6235         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
6236         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
6237                 if(!isWasmInitialized) {
6238                         throw new Error("initializeWasm() must be awaited first!");
6239                 }
6240                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
6241                 return nativeResponseValue;
6242         }
6243         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
6244         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
6245                 if(!isWasmInitialized) {
6246                         throw new Error("initializeWasm() must be awaited first!");
6247                 }
6248                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
6249                 // debug statements here
6250         }
6251         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
6252         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
6253                 if(!isWasmInitialized) {
6254                         throw new Error("initializeWasm() must be awaited first!");
6255                 }
6256                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
6257                 return decodeArray(nativeResponseValue);
6258         }
6259         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6260         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
6261                 if(!isWasmInitialized) {
6262                         throw new Error("initializeWasm() must be awaited first!");
6263                 }
6264                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
6265                 // debug statements here
6266         }
6267         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
6268         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
6269                 if(!isWasmInitialized) {
6270                         throw new Error("initializeWasm() must be awaited first!");
6271                 }
6272                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
6273                 return decodeArray(nativeResponseValue);
6274         }
6275         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
6276         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
6277                 if(!isWasmInitialized) {
6278                         throw new Error("initializeWasm() must be awaited first!");
6279                 }
6280                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
6281                 // debug statements here
6282         }
6283         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
6284         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
6285                 if(!isWasmInitialized) {
6286                         throw new Error("initializeWasm() must be awaited first!");
6287                 }
6288                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
6289                 return decodeArray(nativeResponseValue);
6290         }
6291         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6292         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
6293                 if(!isWasmInitialized) {
6294                         throw new Error("initializeWasm() must be awaited first!");
6295                 }
6296                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
6297                 // debug statements here
6298         }
6299         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
6300         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
6301                 if(!isWasmInitialized) {
6302                         throw new Error("initializeWasm() must be awaited first!");
6303                 }
6304                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
6305                 // debug statements here
6306         }
6307         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_ptr);
6308         export function NodeAnnouncement_free(this_ptr: number): void {
6309                 if(!isWasmInitialized) {
6310                         throw new Error("initializeWasm() must be awaited first!");
6311                 }
6312                 const nativeResponseValue = wasm.NodeAnnouncement_free(this_ptr);
6313                 // debug statements here
6314         }
6315         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
6316         export function NodeAnnouncement_clone(orig: number): number {
6317                 if(!isWasmInitialized) {
6318                         throw new Error("initializeWasm() must be awaited first!");
6319                 }
6320                 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
6321                 return nativeResponseValue;
6322         }
6323         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
6324         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
6325                 if(!isWasmInitialized) {
6326                         throw new Error("initializeWasm() must be awaited first!");
6327                 }
6328                 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
6329                 return decodeArray(nativeResponseValue);
6330         }
6331         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
6332         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
6333                 if(!isWasmInitialized) {
6334                         throw new Error("initializeWasm() must be awaited first!");
6335                 }
6336                 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
6337                 // debug statements here
6338         }
6339         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
6340         export function NodeAnnouncement_get_contents(this_ptr: number): number {
6341                 if(!isWasmInitialized) {
6342                         throw new Error("initializeWasm() must be awaited first!");
6343                 }
6344                 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
6345                 return nativeResponseValue;
6346         }
6347         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
6348         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
6349                 if(!isWasmInitialized) {
6350                         throw new Error("initializeWasm() must be awaited first!");
6351                 }
6352                 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
6353                 // debug statements here
6354         }
6355         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
6356         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
6357                 if(!isWasmInitialized) {
6358                         throw new Error("initializeWasm() must be awaited first!");
6359                 }
6360                 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
6361                 return nativeResponseValue;
6362         }
6363         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_ptr);
6364         export function UnsignedChannelAnnouncement_free(this_ptr: number): void {
6365                 if(!isWasmInitialized) {
6366                         throw new Error("initializeWasm() must be awaited first!");
6367                 }
6368                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_ptr);
6369                 // debug statements here
6370         }
6371         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
6372         export function UnsignedChannelAnnouncement_clone(orig: number): number {
6373                 if(!isWasmInitialized) {
6374                         throw new Error("initializeWasm() must be awaited first!");
6375                 }
6376                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
6377                 return nativeResponseValue;
6378         }
6379         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
6380         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
6381                 if(!isWasmInitialized) {
6382                         throw new Error("initializeWasm() must be awaited first!");
6383                 }
6384                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
6385                 return nativeResponseValue;
6386         }
6387         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
6388         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
6389                 if(!isWasmInitialized) {
6390                         throw new Error("initializeWasm() must be awaited first!");
6391                 }
6392                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
6393                 // debug statements here
6394         }
6395         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
6396         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
6397                 if(!isWasmInitialized) {
6398                         throw new Error("initializeWasm() must be awaited first!");
6399                 }
6400                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
6401                 return decodeArray(nativeResponseValue);
6402         }
6403         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6404         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6405                 if(!isWasmInitialized) {
6406                         throw new Error("initializeWasm() must be awaited first!");
6407                 }
6408                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
6409                 // debug statements here
6410         }
6411         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
6412         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
6413                 if(!isWasmInitialized) {
6414                         throw new Error("initializeWasm() must be awaited first!");
6415                 }
6416                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
6417                 return nativeResponseValue;
6418         }
6419         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
6420         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
6421                 if(!isWasmInitialized) {
6422                         throw new Error("initializeWasm() must be awaited first!");
6423                 }
6424                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
6425                 // debug statements here
6426         }
6427         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
6428         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
6429                 if(!isWasmInitialized) {
6430                         throw new Error("initializeWasm() must be awaited first!");
6431                 }
6432                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
6433                 return decodeArray(nativeResponseValue);
6434         }
6435         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6436         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
6437                 if(!isWasmInitialized) {
6438                         throw new Error("initializeWasm() must be awaited first!");
6439                 }
6440                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
6441                 // debug statements here
6442         }
6443         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
6444         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
6445                 if(!isWasmInitialized) {
6446                         throw new Error("initializeWasm() must be awaited first!");
6447                 }
6448                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
6449                 return decodeArray(nativeResponseValue);
6450         }
6451         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6452         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
6453                 if(!isWasmInitialized) {
6454                         throw new Error("initializeWasm() must be awaited first!");
6455                 }
6456                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
6457                 // debug statements here
6458         }
6459         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
6460         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
6461                 if(!isWasmInitialized) {
6462                         throw new Error("initializeWasm() must be awaited first!");
6463                 }
6464                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
6465                 return decodeArray(nativeResponseValue);
6466         }
6467         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6468         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
6469                 if(!isWasmInitialized) {
6470                         throw new Error("initializeWasm() must be awaited first!");
6471                 }
6472                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
6473                 // debug statements here
6474         }
6475         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
6476         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
6477                 if(!isWasmInitialized) {
6478                         throw new Error("initializeWasm() must be awaited first!");
6479                 }
6480                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
6481                 return decodeArray(nativeResponseValue);
6482         }
6483         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6484         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
6485                 if(!isWasmInitialized) {
6486                         throw new Error("initializeWasm() must be awaited first!");
6487                 }
6488                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
6489                 // debug statements here
6490         }
6491         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_ptr);
6492         export function ChannelAnnouncement_free(this_ptr: number): void {
6493                 if(!isWasmInitialized) {
6494                         throw new Error("initializeWasm() must be awaited first!");
6495                 }
6496                 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_ptr);
6497                 // debug statements here
6498         }
6499         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
6500         export function ChannelAnnouncement_clone(orig: number): number {
6501                 if(!isWasmInitialized) {
6502                         throw new Error("initializeWasm() must be awaited first!");
6503                 }
6504                 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
6505                 return nativeResponseValue;
6506         }
6507         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
6508         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
6509                 if(!isWasmInitialized) {
6510                         throw new Error("initializeWasm() must be awaited first!");
6511                 }
6512                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
6513                 return decodeArray(nativeResponseValue);
6514         }
6515         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
6516         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
6517                 if(!isWasmInitialized) {
6518                         throw new Error("initializeWasm() must be awaited first!");
6519                 }
6520                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
6521                 // debug statements here
6522         }
6523         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
6524         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
6525                 if(!isWasmInitialized) {
6526                         throw new Error("initializeWasm() must be awaited first!");
6527                 }
6528                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
6529                 return decodeArray(nativeResponseValue);
6530         }
6531         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
6532         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
6533                 if(!isWasmInitialized) {
6534                         throw new Error("initializeWasm() must be awaited first!");
6535                 }
6536                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
6537                 // debug statements here
6538         }
6539         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
6540         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
6541                 if(!isWasmInitialized) {
6542                         throw new Error("initializeWasm() must be awaited first!");
6543                 }
6544                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
6545                 return decodeArray(nativeResponseValue);
6546         }
6547         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
6548         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
6549                 if(!isWasmInitialized) {
6550                         throw new Error("initializeWasm() must be awaited first!");
6551                 }
6552                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
6553                 // debug statements here
6554         }
6555         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
6556         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
6557                 if(!isWasmInitialized) {
6558                         throw new Error("initializeWasm() must be awaited first!");
6559                 }
6560                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
6561                 return decodeArray(nativeResponseValue);
6562         }
6563         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
6564         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
6565                 if(!isWasmInitialized) {
6566                         throw new Error("initializeWasm() must be awaited first!");
6567                 }
6568                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
6569                 // debug statements here
6570         }
6571         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
6572         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
6573                 if(!isWasmInitialized) {
6574                         throw new Error("initializeWasm() must be awaited first!");
6575                 }
6576                 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
6577                 return nativeResponseValue;
6578         }
6579         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
6580         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
6581                 if(!isWasmInitialized) {
6582                         throw new Error("initializeWasm() must be awaited first!");
6583                 }
6584                 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
6585                 // debug statements here
6586         }
6587         // 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);
6588         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 {
6589                 if(!isWasmInitialized) {
6590                         throw new Error("initializeWasm() must be awaited first!");
6591                 }
6592                 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);
6593                 return nativeResponseValue;
6594         }
6595         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_ptr);
6596         export function UnsignedChannelUpdate_free(this_ptr: number): void {
6597                 if(!isWasmInitialized) {
6598                         throw new Error("initializeWasm() must be awaited first!");
6599                 }
6600                 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_ptr);
6601                 // debug statements here
6602         }
6603         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
6604         export function UnsignedChannelUpdate_clone(orig: number): number {
6605                 if(!isWasmInitialized) {
6606                         throw new Error("initializeWasm() must be awaited first!");
6607                 }
6608                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
6609                 return nativeResponseValue;
6610         }
6611         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
6612         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
6613                 if(!isWasmInitialized) {
6614                         throw new Error("initializeWasm() must be awaited first!");
6615                 }
6616                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
6617                 return decodeArray(nativeResponseValue);
6618         }
6619         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6620         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6621                 if(!isWasmInitialized) {
6622                         throw new Error("initializeWasm() must be awaited first!");
6623                 }
6624                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
6625                 // debug statements here
6626         }
6627         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6628         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
6629                 if(!isWasmInitialized) {
6630                         throw new Error("initializeWasm() must be awaited first!");
6631                 }
6632                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
6633                 return nativeResponseValue;
6634         }
6635         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
6636         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
6637                 if(!isWasmInitialized) {
6638                         throw new Error("initializeWasm() must be awaited first!");
6639                 }
6640                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
6641                 // debug statements here
6642         }
6643         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6644         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
6645                 if(!isWasmInitialized) {
6646                         throw new Error("initializeWasm() must be awaited first!");
6647                 }
6648                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
6649                 return nativeResponseValue;
6650         }
6651         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
6652         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
6653                 if(!isWasmInitialized) {
6654                         throw new Error("initializeWasm() must be awaited first!");
6655                 }
6656                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
6657                 // debug statements here
6658         }
6659         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6660         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
6661                 if(!isWasmInitialized) {
6662                         throw new Error("initializeWasm() must be awaited first!");
6663                 }
6664                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
6665                 return nativeResponseValue;
6666         }
6667         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
6668         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
6669                 if(!isWasmInitialized) {
6670                         throw new Error("initializeWasm() must be awaited first!");
6671                 }
6672                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
6673                 // debug statements here
6674         }
6675         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6676         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
6677                 if(!isWasmInitialized) {
6678                         throw new Error("initializeWasm() must be awaited first!");
6679                 }
6680                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
6681                 return nativeResponseValue;
6682         }
6683         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
6684         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
6685                 if(!isWasmInitialized) {
6686                         throw new Error("initializeWasm() must be awaited first!");
6687                 }
6688                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
6689                 // debug statements here
6690         }
6691         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6692         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
6693                 if(!isWasmInitialized) {
6694                         throw new Error("initializeWasm() must be awaited first!");
6695                 }
6696                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
6697                 return nativeResponseValue;
6698         }
6699         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
6700         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
6701                 if(!isWasmInitialized) {
6702                         throw new Error("initializeWasm() must be awaited first!");
6703                 }
6704                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
6705                 // debug statements here
6706         }
6707         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6708         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
6709                 if(!isWasmInitialized) {
6710                         throw new Error("initializeWasm() must be awaited first!");
6711                 }
6712                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
6713                 return nativeResponseValue;
6714         }
6715         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
6716         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
6717                 if(!isWasmInitialized) {
6718                         throw new Error("initializeWasm() must be awaited first!");
6719                 }
6720                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
6721                 // debug statements here
6722         }
6723         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6724         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
6725                 if(!isWasmInitialized) {
6726                         throw new Error("initializeWasm() must be awaited first!");
6727                 }
6728                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
6729                 return nativeResponseValue;
6730         }
6731         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
6732         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
6733                 if(!isWasmInitialized) {
6734                         throw new Error("initializeWasm() must be awaited first!");
6735                 }
6736                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
6737                 // debug statements here
6738         }
6739         // void ChannelUpdate_free(struct LDKChannelUpdate this_ptr);
6740         export function ChannelUpdate_free(this_ptr: number): void {
6741                 if(!isWasmInitialized) {
6742                         throw new Error("initializeWasm() must be awaited first!");
6743                 }
6744                 const nativeResponseValue = wasm.ChannelUpdate_free(this_ptr);
6745                 // debug statements here
6746         }
6747         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
6748         export function ChannelUpdate_clone(orig: number): number {
6749                 if(!isWasmInitialized) {
6750                         throw new Error("initializeWasm() must be awaited first!");
6751                 }
6752                 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
6753                 return nativeResponseValue;
6754         }
6755         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
6756         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
6757                 if(!isWasmInitialized) {
6758                         throw new Error("initializeWasm() must be awaited first!");
6759                 }
6760                 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
6761                 return decodeArray(nativeResponseValue);
6762         }
6763         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
6764         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
6765                 if(!isWasmInitialized) {
6766                         throw new Error("initializeWasm() must be awaited first!");
6767                 }
6768                 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
6769                 // debug statements here
6770         }
6771         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
6772         export function ChannelUpdate_get_contents(this_ptr: number): number {
6773                 if(!isWasmInitialized) {
6774                         throw new Error("initializeWasm() must be awaited first!");
6775                 }
6776                 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
6777                 return nativeResponseValue;
6778         }
6779         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
6780         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
6781                 if(!isWasmInitialized) {
6782                         throw new Error("initializeWasm() must be awaited first!");
6783                 }
6784                 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
6785                 // debug statements here
6786         }
6787         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
6788         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
6789                 if(!isWasmInitialized) {
6790                         throw new Error("initializeWasm() must be awaited first!");
6791                 }
6792                 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
6793                 return nativeResponseValue;
6794         }
6795         // void QueryChannelRange_free(struct LDKQueryChannelRange this_ptr);
6796         export function QueryChannelRange_free(this_ptr: number): void {
6797                 if(!isWasmInitialized) {
6798                         throw new Error("initializeWasm() must be awaited first!");
6799                 }
6800                 const nativeResponseValue = wasm.QueryChannelRange_free(this_ptr);
6801                 // debug statements here
6802         }
6803         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
6804         export function QueryChannelRange_clone(orig: number): number {
6805                 if(!isWasmInitialized) {
6806                         throw new Error("initializeWasm() must be awaited first!");
6807                 }
6808                 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
6809                 return nativeResponseValue;
6810         }
6811         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
6812         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
6813                 if(!isWasmInitialized) {
6814                         throw new Error("initializeWasm() must be awaited first!");
6815                 }
6816                 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
6817                 return decodeArray(nativeResponseValue);
6818         }
6819         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6820         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6821                 if(!isWasmInitialized) {
6822                         throw new Error("initializeWasm() must be awaited first!");
6823                 }
6824                 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
6825                 // debug statements here
6826         }
6827         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
6828         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
6829                 if(!isWasmInitialized) {
6830                         throw new Error("initializeWasm() must be awaited first!");
6831                 }
6832                 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
6833                 return nativeResponseValue;
6834         }
6835         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
6836         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
6837                 if(!isWasmInitialized) {
6838                         throw new Error("initializeWasm() must be awaited first!");
6839                 }
6840                 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
6841                 // debug statements here
6842         }
6843         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
6844         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
6845                 if(!isWasmInitialized) {
6846                         throw new Error("initializeWasm() must be awaited first!");
6847                 }
6848                 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
6849                 return nativeResponseValue;
6850         }
6851         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
6852         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
6853                 if(!isWasmInitialized) {
6854                         throw new Error("initializeWasm() must be awaited first!");
6855                 }
6856                 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
6857                 // debug statements here
6858         }
6859         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
6860         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
6861                 if(!isWasmInitialized) {
6862                         throw new Error("initializeWasm() must be awaited first!");
6863                 }
6864                 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
6865                 return nativeResponseValue;
6866         }
6867         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_ptr);
6868         export function ReplyChannelRange_free(this_ptr: number): void {
6869                 if(!isWasmInitialized) {
6870                         throw new Error("initializeWasm() must be awaited first!");
6871                 }
6872                 const nativeResponseValue = wasm.ReplyChannelRange_free(this_ptr);
6873                 // debug statements here
6874         }
6875         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
6876         export function ReplyChannelRange_clone(orig: number): number {
6877                 if(!isWasmInitialized) {
6878                         throw new Error("initializeWasm() must be awaited first!");
6879                 }
6880                 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
6881                 return nativeResponseValue;
6882         }
6883         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
6884         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
6885                 if(!isWasmInitialized) {
6886                         throw new Error("initializeWasm() must be awaited first!");
6887                 }
6888                 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
6889                 return decodeArray(nativeResponseValue);
6890         }
6891         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6892         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6893                 if(!isWasmInitialized) {
6894                         throw new Error("initializeWasm() must be awaited first!");
6895                 }
6896                 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
6897                 // debug statements here
6898         }
6899         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
6900         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
6901                 if(!isWasmInitialized) {
6902                         throw new Error("initializeWasm() must be awaited first!");
6903                 }
6904                 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
6905                 return nativeResponseValue;
6906         }
6907         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
6908         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
6909                 if(!isWasmInitialized) {
6910                         throw new Error("initializeWasm() must be awaited first!");
6911                 }
6912                 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
6913                 // debug statements here
6914         }
6915         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
6916         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
6917                 if(!isWasmInitialized) {
6918                         throw new Error("initializeWasm() must be awaited first!");
6919                 }
6920                 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
6921                 return nativeResponseValue;
6922         }
6923         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
6924         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
6925                 if(!isWasmInitialized) {
6926                         throw new Error("initializeWasm() must be awaited first!");
6927                 }
6928                 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
6929                 // debug statements here
6930         }
6931         // bool ReplyChannelRange_get_full_information(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
6932         export function ReplyChannelRange_get_full_information(this_ptr: number): boolean {
6933                 if(!isWasmInitialized) {
6934                         throw new Error("initializeWasm() must be awaited first!");
6935                 }
6936                 const nativeResponseValue = wasm.ReplyChannelRange_get_full_information(this_ptr);
6937                 return nativeResponseValue;
6938         }
6939         // void ReplyChannelRange_set_full_information(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
6940         export function ReplyChannelRange_set_full_information(this_ptr: number, val: boolean): void {
6941                 if(!isWasmInitialized) {
6942                         throw new Error("initializeWasm() must be awaited first!");
6943                 }
6944                 const nativeResponseValue = wasm.ReplyChannelRange_set_full_information(this_ptr, val);
6945                 // debug statements here
6946         }
6947         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
6948         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
6949                 if(!isWasmInitialized) {
6950                         throw new Error("initializeWasm() must be awaited first!");
6951                 }
6952                 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
6953                 // debug statements here
6954         }
6955         // MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool full_information_arg, struct LDKCVec_u64Z short_channel_ids_arg);
6956         export function ReplyChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number, full_information_arg: boolean, short_channel_ids_arg: number[]): number {
6957                 if(!isWasmInitialized) {
6958                         throw new Error("initializeWasm() must be awaited first!");
6959                 }
6960                 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg);
6961                 return nativeResponseValue;
6962         }
6963         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_ptr);
6964         export function QueryShortChannelIds_free(this_ptr: number): void {
6965                 if(!isWasmInitialized) {
6966                         throw new Error("initializeWasm() must be awaited first!");
6967                 }
6968                 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_ptr);
6969                 // debug statements here
6970         }
6971         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
6972         export function QueryShortChannelIds_clone(orig: number): number {
6973                 if(!isWasmInitialized) {
6974                         throw new Error("initializeWasm() must be awaited first!");
6975                 }
6976                 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
6977                 return nativeResponseValue;
6978         }
6979         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
6980         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
6981                 if(!isWasmInitialized) {
6982                         throw new Error("initializeWasm() must be awaited first!");
6983                 }
6984                 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
6985                 return decodeArray(nativeResponseValue);
6986         }
6987         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6988         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6989                 if(!isWasmInitialized) {
6990                         throw new Error("initializeWasm() must be awaited first!");
6991                 }
6992                 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
6993                 // debug statements here
6994         }
6995         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
6996         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
6997                 if(!isWasmInitialized) {
6998                         throw new Error("initializeWasm() must be awaited first!");
6999                 }
7000                 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
7001                 // debug statements here
7002         }
7003         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
7004         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
7005                 if(!isWasmInitialized) {
7006                         throw new Error("initializeWasm() must be awaited first!");
7007                 }
7008                 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
7009                 return nativeResponseValue;
7010         }
7011         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_ptr);
7012         export function ReplyShortChannelIdsEnd_free(this_ptr: number): void {
7013                 if(!isWasmInitialized) {
7014                         throw new Error("initializeWasm() must be awaited first!");
7015                 }
7016                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_ptr);
7017                 // debug statements here
7018         }
7019         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
7020         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
7021                 if(!isWasmInitialized) {
7022                         throw new Error("initializeWasm() must be awaited first!");
7023                 }
7024                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
7025                 return nativeResponseValue;
7026         }
7027         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
7028         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
7029                 if(!isWasmInitialized) {
7030                         throw new Error("initializeWasm() must be awaited first!");
7031                 }
7032                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
7033                 return decodeArray(nativeResponseValue);
7034         }
7035         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7036         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
7037                 if(!isWasmInitialized) {
7038                         throw new Error("initializeWasm() must be awaited first!");
7039                 }
7040                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
7041                 // debug statements here
7042         }
7043         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
7044         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
7045                 if(!isWasmInitialized) {
7046                         throw new Error("initializeWasm() must be awaited first!");
7047                 }
7048                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
7049                 return nativeResponseValue;
7050         }
7051         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
7052         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
7053                 if(!isWasmInitialized) {
7054                         throw new Error("initializeWasm() must be awaited first!");
7055                 }
7056                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
7057                 // debug statements here
7058         }
7059         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
7060         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
7061                 if(!isWasmInitialized) {
7062                         throw new Error("initializeWasm() must be awaited first!");
7063                 }
7064                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
7065                 return nativeResponseValue;
7066         }
7067         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_ptr);
7068         export function GossipTimestampFilter_free(this_ptr: number): void {
7069                 if(!isWasmInitialized) {
7070                         throw new Error("initializeWasm() must be awaited first!");
7071                 }
7072                 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_ptr);
7073                 // debug statements here
7074         }
7075         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
7076         export function GossipTimestampFilter_clone(orig: number): number {
7077                 if(!isWasmInitialized) {
7078                         throw new Error("initializeWasm() must be awaited first!");
7079                 }
7080                 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
7081                 return nativeResponseValue;
7082         }
7083         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
7084         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
7085                 if(!isWasmInitialized) {
7086                         throw new Error("initializeWasm() must be awaited first!");
7087                 }
7088                 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
7089                 return decodeArray(nativeResponseValue);
7090         }
7091         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7092         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
7093                 if(!isWasmInitialized) {
7094                         throw new Error("initializeWasm() must be awaited first!");
7095                 }
7096                 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
7097                 // debug statements here
7098         }
7099         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
7100         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
7101                 if(!isWasmInitialized) {
7102                         throw new Error("initializeWasm() must be awaited first!");
7103                 }
7104                 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
7105                 return nativeResponseValue;
7106         }
7107         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
7108         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
7109                 if(!isWasmInitialized) {
7110                         throw new Error("initializeWasm() must be awaited first!");
7111                 }
7112                 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
7113                 // debug statements here
7114         }
7115         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
7116         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
7117                 if(!isWasmInitialized) {
7118                         throw new Error("initializeWasm() must be awaited first!");
7119                 }
7120                 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
7121                 return nativeResponseValue;
7122         }
7123         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
7124         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
7125                 if(!isWasmInitialized) {
7126                         throw new Error("initializeWasm() must be awaited first!");
7127                 }
7128                 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
7129                 // debug statements here
7130         }
7131         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
7132         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
7133                 if(!isWasmInitialized) {
7134                         throw new Error("initializeWasm() must be awaited first!");
7135                 }
7136                 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
7137                 return nativeResponseValue;
7138         }
7139         // void ErrorAction_free(struct LDKErrorAction this_ptr);
7140         export function ErrorAction_free(this_ptr: number): void {
7141                 if(!isWasmInitialized) {
7142                         throw new Error("initializeWasm() must be awaited first!");
7143                 }
7144                 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
7145                 // debug statements here
7146         }
7147         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
7148         export function ErrorAction_clone(orig: number): number {
7149                 if(!isWasmInitialized) {
7150                         throw new Error("initializeWasm() must be awaited first!");
7151                 }
7152                 const nativeResponseValue = wasm.ErrorAction_clone(orig);
7153                 return nativeResponseValue;
7154         }
7155         // void LightningError_free(struct LDKLightningError this_ptr);
7156         export function LightningError_free(this_ptr: number): void {
7157                 if(!isWasmInitialized) {
7158                         throw new Error("initializeWasm() must be awaited first!");
7159                 }
7160                 const nativeResponseValue = wasm.LightningError_free(this_ptr);
7161                 // debug statements here
7162         }
7163         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
7164         export function LightningError_get_err(this_ptr: number): String {
7165                 if(!isWasmInitialized) {
7166                         throw new Error("initializeWasm() must be awaited first!");
7167                 }
7168                 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
7169                 return nativeResponseValue;
7170         }
7171         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7172         export function LightningError_set_err(this_ptr: number, val: Uint8Array): void {
7173                 if(!isWasmInitialized) {
7174                         throw new Error("initializeWasm() must be awaited first!");
7175                 }
7176                 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, encodeArray(val));
7177                 // debug statements here
7178         }
7179         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
7180         export function LightningError_get_action(this_ptr: number): number {
7181                 if(!isWasmInitialized) {
7182                         throw new Error("initializeWasm() must be awaited first!");
7183                 }
7184                 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
7185                 return nativeResponseValue;
7186         }
7187         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
7188         export function LightningError_set_action(this_ptr: number, val: number): void {
7189                 if(!isWasmInitialized) {
7190                         throw new Error("initializeWasm() must be awaited first!");
7191                 }
7192                 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
7193                 // debug statements here
7194         }
7195         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKCVec_u8Z err_arg, struct LDKErrorAction action_arg);
7196         export function LightningError_new(err_arg: Uint8Array, action_arg: number): number {
7197                 if(!isWasmInitialized) {
7198                         throw new Error("initializeWasm() must be awaited first!");
7199                 }
7200                 const nativeResponseValue = wasm.LightningError_new(encodeArray(err_arg), action_arg);
7201                 return nativeResponseValue;
7202         }
7203         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_ptr);
7204         export function CommitmentUpdate_free(this_ptr: number): void {
7205                 if(!isWasmInitialized) {
7206                         throw new Error("initializeWasm() must be awaited first!");
7207                 }
7208                 const nativeResponseValue = wasm.CommitmentUpdate_free(this_ptr);
7209                 // debug statements here
7210         }
7211         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
7212         export function CommitmentUpdate_clone(orig: number): number {
7213                 if(!isWasmInitialized) {
7214                         throw new Error("initializeWasm() must be awaited first!");
7215                 }
7216                 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
7217                 return nativeResponseValue;
7218         }
7219         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
7220         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
7221                 if(!isWasmInitialized) {
7222                         throw new Error("initializeWasm() must be awaited first!");
7223                 }
7224                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
7225                 // debug statements here
7226         }
7227         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
7228         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
7229                 if(!isWasmInitialized) {
7230                         throw new Error("initializeWasm() must be awaited first!");
7231                 }
7232                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
7233                 // debug statements here
7234         }
7235         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
7236         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
7237                 if(!isWasmInitialized) {
7238                         throw new Error("initializeWasm() must be awaited first!");
7239                 }
7240                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
7241                 // debug statements here
7242         }
7243         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
7244         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
7245                 if(!isWasmInitialized) {
7246                         throw new Error("initializeWasm() must be awaited first!");
7247                 }
7248                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
7249                 // debug statements here
7250         }
7251         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
7252         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
7253                 if(!isWasmInitialized) {
7254                         throw new Error("initializeWasm() must be awaited first!");
7255                 }
7256                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
7257                 return nativeResponseValue;
7258         }
7259         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
7260         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
7261                 if(!isWasmInitialized) {
7262                         throw new Error("initializeWasm() must be awaited first!");
7263                 }
7264                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
7265                 // debug statements here
7266         }
7267         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
7268         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
7269                 if(!isWasmInitialized) {
7270                         throw new Error("initializeWasm() must be awaited first!");
7271                 }
7272                 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
7273                 return nativeResponseValue;
7274         }
7275         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
7276         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
7277                 if(!isWasmInitialized) {
7278                         throw new Error("initializeWasm() must be awaited first!");
7279                 }
7280                 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
7281                 // debug statements here
7282         }
7283         // 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);
7284         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 {
7285                 if(!isWasmInitialized) {
7286                         throw new Error("initializeWasm() must be awaited first!");
7287                 }
7288                 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);
7289                 return nativeResponseValue;
7290         }
7291         // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
7292         export function HTLCFailChannelUpdate_free(this_ptr: number): void {
7293                 if(!isWasmInitialized) {
7294                         throw new Error("initializeWasm() must be awaited first!");
7295                 }
7296                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
7297                 // debug statements here
7298         }
7299         // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
7300         export function HTLCFailChannelUpdate_clone(orig: number): number {
7301                 if(!isWasmInitialized) {
7302                         throw new Error("initializeWasm() must be awaited first!");
7303                 }
7304                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
7305                 return nativeResponseValue;
7306         }
7307         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
7308         export function ChannelMessageHandler_free(this_ptr: number): void {
7309                 if(!isWasmInitialized) {
7310                         throw new Error("initializeWasm() must be awaited first!");
7311                 }
7312                 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
7313                 // debug statements here
7314         }
7315         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
7316         export function RoutingMessageHandler_free(this_ptr: number): void {
7317                 if(!isWasmInitialized) {
7318                         throw new Error("initializeWasm() must be awaited first!");
7319                 }
7320                 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
7321                 // debug statements here
7322         }
7323         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
7324         export function AcceptChannel_write(obj: number): Uint8Array {
7325                 if(!isWasmInitialized) {
7326                         throw new Error("initializeWasm() must be awaited first!");
7327                 }
7328                 const nativeResponseValue = wasm.AcceptChannel_write(obj);
7329                 return decodeArray(nativeResponseValue);
7330         }
7331         // struct LDKAcceptChannel AcceptChannel_read(struct LDKu8slice ser);
7332         export function AcceptChannel_read(ser: Uint8Array): number {
7333                 if(!isWasmInitialized) {
7334                         throw new Error("initializeWasm() must be awaited first!");
7335                 }
7336                 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
7337                 return nativeResponseValue;
7338         }
7339         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
7340         export function AnnouncementSignatures_write(obj: number): Uint8Array {
7341                 if(!isWasmInitialized) {
7342                         throw new Error("initializeWasm() must be awaited first!");
7343                 }
7344                 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
7345                 return decodeArray(nativeResponseValue);
7346         }
7347         // struct LDKAnnouncementSignatures AnnouncementSignatures_read(struct LDKu8slice ser);
7348         export function AnnouncementSignatures_read(ser: Uint8Array): number {
7349                 if(!isWasmInitialized) {
7350                         throw new Error("initializeWasm() must be awaited first!");
7351                 }
7352                 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
7353                 return nativeResponseValue;
7354         }
7355         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
7356         export function ChannelReestablish_write(obj: number): Uint8Array {
7357                 if(!isWasmInitialized) {
7358                         throw new Error("initializeWasm() must be awaited first!");
7359                 }
7360                 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
7361                 return decodeArray(nativeResponseValue);
7362         }
7363         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
7364         export function ChannelReestablish_read(ser: Uint8Array): number {
7365                 if(!isWasmInitialized) {
7366                         throw new Error("initializeWasm() must be awaited first!");
7367                 }
7368                 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
7369                 return nativeResponseValue;
7370         }
7371         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
7372         export function ClosingSigned_write(obj: number): Uint8Array {
7373                 if(!isWasmInitialized) {
7374                         throw new Error("initializeWasm() must be awaited first!");
7375                 }
7376                 const nativeResponseValue = wasm.ClosingSigned_write(obj);
7377                 return decodeArray(nativeResponseValue);
7378         }
7379         // struct LDKClosingSigned ClosingSigned_read(struct LDKu8slice ser);
7380         export function ClosingSigned_read(ser: Uint8Array): number {
7381                 if(!isWasmInitialized) {
7382                         throw new Error("initializeWasm() must be awaited first!");
7383                 }
7384                 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
7385                 return nativeResponseValue;
7386         }
7387         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
7388         export function CommitmentSigned_write(obj: number): Uint8Array {
7389                 if(!isWasmInitialized) {
7390                         throw new Error("initializeWasm() must be awaited first!");
7391                 }
7392                 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
7393                 return decodeArray(nativeResponseValue);
7394         }
7395         // struct LDKCommitmentSigned CommitmentSigned_read(struct LDKu8slice ser);
7396         export function CommitmentSigned_read(ser: Uint8Array): number {
7397                 if(!isWasmInitialized) {
7398                         throw new Error("initializeWasm() must be awaited first!");
7399                 }
7400                 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
7401                 return nativeResponseValue;
7402         }
7403         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
7404         export function FundingCreated_write(obj: number): Uint8Array {
7405                 if(!isWasmInitialized) {
7406                         throw new Error("initializeWasm() must be awaited first!");
7407                 }
7408                 const nativeResponseValue = wasm.FundingCreated_write(obj);
7409                 return decodeArray(nativeResponseValue);
7410         }
7411         // struct LDKFundingCreated FundingCreated_read(struct LDKu8slice ser);
7412         export function FundingCreated_read(ser: Uint8Array): number {
7413                 if(!isWasmInitialized) {
7414                         throw new Error("initializeWasm() must be awaited first!");
7415                 }
7416                 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
7417                 return nativeResponseValue;
7418         }
7419         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
7420         export function FundingSigned_write(obj: number): Uint8Array {
7421                 if(!isWasmInitialized) {
7422                         throw new Error("initializeWasm() must be awaited first!");
7423                 }
7424                 const nativeResponseValue = wasm.FundingSigned_write(obj);
7425                 return decodeArray(nativeResponseValue);
7426         }
7427         // struct LDKFundingSigned FundingSigned_read(struct LDKu8slice ser);
7428         export function FundingSigned_read(ser: Uint8Array): number {
7429                 if(!isWasmInitialized) {
7430                         throw new Error("initializeWasm() must be awaited first!");
7431                 }
7432                 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
7433                 return nativeResponseValue;
7434         }
7435         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
7436         export function FundingLocked_write(obj: number): Uint8Array {
7437                 if(!isWasmInitialized) {
7438                         throw new Error("initializeWasm() must be awaited first!");
7439                 }
7440                 const nativeResponseValue = wasm.FundingLocked_write(obj);
7441                 return decodeArray(nativeResponseValue);
7442         }
7443         // struct LDKFundingLocked FundingLocked_read(struct LDKu8slice ser);
7444         export function FundingLocked_read(ser: Uint8Array): number {
7445                 if(!isWasmInitialized) {
7446                         throw new Error("initializeWasm() must be awaited first!");
7447                 }
7448                 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
7449                 return nativeResponseValue;
7450         }
7451         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
7452         export function Init_write(obj: number): Uint8Array {
7453                 if(!isWasmInitialized) {
7454                         throw new Error("initializeWasm() must be awaited first!");
7455                 }
7456                 const nativeResponseValue = wasm.Init_write(obj);
7457                 return decodeArray(nativeResponseValue);
7458         }
7459         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
7460         export function Init_read(ser: Uint8Array): number {
7461                 if(!isWasmInitialized) {
7462                         throw new Error("initializeWasm() must be awaited first!");
7463                 }
7464                 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
7465                 return nativeResponseValue;
7466         }
7467         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
7468         export function OpenChannel_write(obj: number): Uint8Array {
7469                 if(!isWasmInitialized) {
7470                         throw new Error("initializeWasm() must be awaited first!");
7471                 }
7472                 const nativeResponseValue = wasm.OpenChannel_write(obj);
7473                 return decodeArray(nativeResponseValue);
7474         }
7475         // struct LDKOpenChannel OpenChannel_read(struct LDKu8slice ser);
7476         export function OpenChannel_read(ser: Uint8Array): number {
7477                 if(!isWasmInitialized) {
7478                         throw new Error("initializeWasm() must be awaited first!");
7479                 }
7480                 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
7481                 return nativeResponseValue;
7482         }
7483         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
7484         export function RevokeAndACK_write(obj: number): Uint8Array {
7485                 if(!isWasmInitialized) {
7486                         throw new Error("initializeWasm() must be awaited first!");
7487                 }
7488                 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
7489                 return decodeArray(nativeResponseValue);
7490         }
7491         // struct LDKRevokeAndACK RevokeAndACK_read(struct LDKu8slice ser);
7492         export function RevokeAndACK_read(ser: Uint8Array): number {
7493                 if(!isWasmInitialized) {
7494                         throw new Error("initializeWasm() must be awaited first!");
7495                 }
7496                 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
7497                 return nativeResponseValue;
7498         }
7499         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
7500         export function Shutdown_write(obj: number): Uint8Array {
7501                 if(!isWasmInitialized) {
7502                         throw new Error("initializeWasm() must be awaited first!");
7503                 }
7504                 const nativeResponseValue = wasm.Shutdown_write(obj);
7505                 return decodeArray(nativeResponseValue);
7506         }
7507         // struct LDKShutdown Shutdown_read(struct LDKu8slice ser);
7508         export function Shutdown_read(ser: Uint8Array): number {
7509                 if(!isWasmInitialized) {
7510                         throw new Error("initializeWasm() must be awaited first!");
7511                 }
7512                 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
7513                 return nativeResponseValue;
7514         }
7515         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
7516         export function UpdateFailHTLC_write(obj: number): Uint8Array {
7517                 if(!isWasmInitialized) {
7518                         throw new Error("initializeWasm() must be awaited first!");
7519                 }
7520                 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
7521                 return decodeArray(nativeResponseValue);
7522         }
7523         // struct LDKUpdateFailHTLC UpdateFailHTLC_read(struct LDKu8slice ser);
7524         export function UpdateFailHTLC_read(ser: Uint8Array): number {
7525                 if(!isWasmInitialized) {
7526                         throw new Error("initializeWasm() must be awaited first!");
7527                 }
7528                 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
7529                 return nativeResponseValue;
7530         }
7531         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
7532         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
7533                 if(!isWasmInitialized) {
7534                         throw new Error("initializeWasm() must be awaited first!");
7535                 }
7536                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
7537                 return decodeArray(nativeResponseValue);
7538         }
7539         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
7540         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
7541                 if(!isWasmInitialized) {
7542                         throw new Error("initializeWasm() must be awaited first!");
7543                 }
7544                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
7545                 return nativeResponseValue;
7546         }
7547         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
7548         export function UpdateFee_write(obj: number): Uint8Array {
7549                 if(!isWasmInitialized) {
7550                         throw new Error("initializeWasm() must be awaited first!");
7551                 }
7552                 const nativeResponseValue = wasm.UpdateFee_write(obj);
7553                 return decodeArray(nativeResponseValue);
7554         }
7555         // struct LDKUpdateFee UpdateFee_read(struct LDKu8slice ser);
7556         export function UpdateFee_read(ser: Uint8Array): number {
7557                 if(!isWasmInitialized) {
7558                         throw new Error("initializeWasm() must be awaited first!");
7559                 }
7560                 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
7561                 return nativeResponseValue;
7562         }
7563         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
7564         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
7565                 if(!isWasmInitialized) {
7566                         throw new Error("initializeWasm() must be awaited first!");
7567                 }
7568                 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
7569                 return decodeArray(nativeResponseValue);
7570         }
7571         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_read(struct LDKu8slice ser);
7572         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
7573                 if(!isWasmInitialized) {
7574                         throw new Error("initializeWasm() must be awaited first!");
7575                 }
7576                 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
7577                 return nativeResponseValue;
7578         }
7579         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
7580         export function UpdateAddHTLC_write(obj: number): Uint8Array {
7581                 if(!isWasmInitialized) {
7582                         throw new Error("initializeWasm() must be awaited first!");
7583                 }
7584                 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
7585                 return decodeArray(nativeResponseValue);
7586         }
7587         // struct LDKUpdateAddHTLC UpdateAddHTLC_read(struct LDKu8slice ser);
7588         export function UpdateAddHTLC_read(ser: Uint8Array): number {
7589                 if(!isWasmInitialized) {
7590                         throw new Error("initializeWasm() must be awaited first!");
7591                 }
7592                 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
7593                 return nativeResponseValue;
7594         }
7595         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
7596         export function Ping_write(obj: number): Uint8Array {
7597                 if(!isWasmInitialized) {
7598                         throw new Error("initializeWasm() must be awaited first!");
7599                 }
7600                 const nativeResponseValue = wasm.Ping_write(obj);
7601                 return decodeArray(nativeResponseValue);
7602         }
7603         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
7604         export function Ping_read(ser: Uint8Array): number {
7605                 if(!isWasmInitialized) {
7606                         throw new Error("initializeWasm() must be awaited first!");
7607                 }
7608                 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
7609                 return nativeResponseValue;
7610         }
7611         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
7612         export function Pong_write(obj: number): Uint8Array {
7613                 if(!isWasmInitialized) {
7614                         throw new Error("initializeWasm() must be awaited first!");
7615                 }
7616                 const nativeResponseValue = wasm.Pong_write(obj);
7617                 return decodeArray(nativeResponseValue);
7618         }
7619         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
7620         export function Pong_read(ser: Uint8Array): number {
7621                 if(!isWasmInitialized) {
7622                         throw new Error("initializeWasm() must be awaited first!");
7623                 }
7624                 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
7625                 return nativeResponseValue;
7626         }
7627         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
7628         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
7629                 if(!isWasmInitialized) {
7630                         throw new Error("initializeWasm() must be awaited first!");
7631                 }
7632                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
7633                 return decodeArray(nativeResponseValue);
7634         }
7635         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
7636         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
7637                 if(!isWasmInitialized) {
7638                         throw new Error("initializeWasm() must be awaited first!");
7639                 }
7640                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
7641                 return nativeResponseValue;
7642         }
7643         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
7644         export function ChannelAnnouncement_write(obj: number): Uint8Array {
7645                 if(!isWasmInitialized) {
7646                         throw new Error("initializeWasm() must be awaited first!");
7647                 }
7648                 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
7649                 return decodeArray(nativeResponseValue);
7650         }
7651         // struct LDKChannelAnnouncement ChannelAnnouncement_read(struct LDKu8slice ser);
7652         export function ChannelAnnouncement_read(ser: Uint8Array): number {
7653                 if(!isWasmInitialized) {
7654                         throw new Error("initializeWasm() must be awaited first!");
7655                 }
7656                 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
7657                 return nativeResponseValue;
7658         }
7659         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
7660         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
7661                 if(!isWasmInitialized) {
7662                         throw new Error("initializeWasm() must be awaited first!");
7663                 }
7664                 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
7665                 return decodeArray(nativeResponseValue);
7666         }
7667         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
7668         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
7669                 if(!isWasmInitialized) {
7670                         throw new Error("initializeWasm() must be awaited first!");
7671                 }
7672                 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
7673                 return nativeResponseValue;
7674         }
7675         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
7676         export function ChannelUpdate_write(obj: number): Uint8Array {
7677                 if(!isWasmInitialized) {
7678                         throw new Error("initializeWasm() must be awaited first!");
7679                 }
7680                 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
7681                 return decodeArray(nativeResponseValue);
7682         }
7683         // struct LDKChannelUpdate ChannelUpdate_read(struct LDKu8slice ser);
7684         export function ChannelUpdate_read(ser: Uint8Array): number {
7685                 if(!isWasmInitialized) {
7686                         throw new Error("initializeWasm() must be awaited first!");
7687                 }
7688                 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
7689                 return nativeResponseValue;
7690         }
7691         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
7692         export function ErrorMessage_write(obj: number): Uint8Array {
7693                 if(!isWasmInitialized) {
7694                         throw new Error("initializeWasm() must be awaited first!");
7695                 }
7696                 const nativeResponseValue = wasm.ErrorMessage_write(obj);
7697                 return decodeArray(nativeResponseValue);
7698         }
7699         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
7700         export function ErrorMessage_read(ser: Uint8Array): number {
7701                 if(!isWasmInitialized) {
7702                         throw new Error("initializeWasm() must be awaited first!");
7703                 }
7704                 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
7705                 return nativeResponseValue;
7706         }
7707         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
7708         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
7709                 if(!isWasmInitialized) {
7710                         throw new Error("initializeWasm() must be awaited first!");
7711                 }
7712                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
7713                 return decodeArray(nativeResponseValue);
7714         }
7715         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
7716         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
7717                 if(!isWasmInitialized) {
7718                         throw new Error("initializeWasm() must be awaited first!");
7719                 }
7720                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
7721                 return nativeResponseValue;
7722         }
7723         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
7724         export function NodeAnnouncement_write(obj: number): Uint8Array {
7725                 if(!isWasmInitialized) {
7726                         throw new Error("initializeWasm() must be awaited first!");
7727                 }
7728                 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
7729                 return decodeArray(nativeResponseValue);
7730         }
7731         // struct LDKNodeAnnouncement NodeAnnouncement_read(struct LDKu8slice ser);
7732         export function NodeAnnouncement_read(ser: Uint8Array): number {
7733                 if(!isWasmInitialized) {
7734                         throw new Error("initializeWasm() must be awaited first!");
7735                 }
7736                 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
7737                 return nativeResponseValue;
7738         }
7739         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
7740         export function QueryShortChannelIds_read(ser: Uint8Array): number {
7741                 if(!isWasmInitialized) {
7742                         throw new Error("initializeWasm() must be awaited first!");
7743                 }
7744                 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
7745                 return nativeResponseValue;
7746         }
7747         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
7748         export function QueryShortChannelIds_write(obj: number): Uint8Array {
7749                 if(!isWasmInitialized) {
7750                         throw new Error("initializeWasm() must be awaited first!");
7751                 }
7752                 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
7753                 return decodeArray(nativeResponseValue);
7754         }
7755         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
7756         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
7757                 if(!isWasmInitialized) {
7758                         throw new Error("initializeWasm() must be awaited first!");
7759                 }
7760                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
7761                 return nativeResponseValue;
7762         }
7763         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
7764         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
7765                 if(!isWasmInitialized) {
7766                         throw new Error("initializeWasm() must be awaited first!");
7767                 }
7768                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
7769                 return decodeArray(nativeResponseValue);
7770         }
7771         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
7772         export function QueryChannelRange_read(ser: Uint8Array): number {
7773                 if(!isWasmInitialized) {
7774                         throw new Error("initializeWasm() must be awaited first!");
7775                 }
7776                 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
7777                 return nativeResponseValue;
7778         }
7779         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
7780         export function QueryChannelRange_write(obj: number): Uint8Array {
7781                 if(!isWasmInitialized) {
7782                         throw new Error("initializeWasm() must be awaited first!");
7783                 }
7784                 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
7785                 return decodeArray(nativeResponseValue);
7786         }
7787         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
7788         export function ReplyChannelRange_read(ser: Uint8Array): number {
7789                 if(!isWasmInitialized) {
7790                         throw new Error("initializeWasm() must be awaited first!");
7791                 }
7792                 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
7793                 return nativeResponseValue;
7794         }
7795         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
7796         export function ReplyChannelRange_write(obj: number): Uint8Array {
7797                 if(!isWasmInitialized) {
7798                         throw new Error("initializeWasm() must be awaited first!");
7799                 }
7800                 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
7801                 return decodeArray(nativeResponseValue);
7802         }
7803         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
7804         export function GossipTimestampFilter_read(ser: Uint8Array): number {
7805                 if(!isWasmInitialized) {
7806                         throw new Error("initializeWasm() must be awaited first!");
7807                 }
7808                 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
7809                 return nativeResponseValue;
7810         }
7811         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
7812         export function GossipTimestampFilter_write(obj: number): Uint8Array {
7813                 if(!isWasmInitialized) {
7814                         throw new Error("initializeWasm() must be awaited first!");
7815                 }
7816                 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
7817                 return decodeArray(nativeResponseValue);
7818         }
7819         // void MessageHandler_free(struct LDKMessageHandler this_ptr);
7820         export function MessageHandler_free(this_ptr: number): void {
7821                 if(!isWasmInitialized) {
7822                         throw new Error("initializeWasm() must be awaited first!");
7823                 }
7824                 const nativeResponseValue = wasm.MessageHandler_free(this_ptr);
7825                 // debug statements here
7826         }
7827         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
7828         export function MessageHandler_get_chan_handler(this_ptr: number): number {
7829                 if(!isWasmInitialized) {
7830                         throw new Error("initializeWasm() must be awaited first!");
7831                 }
7832                 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
7833                 return nativeResponseValue;
7834         }
7835         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
7836         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
7837                 if(!isWasmInitialized) {
7838                         throw new Error("initializeWasm() must be awaited first!");
7839                 }
7840                 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
7841                 // debug statements here
7842         }
7843         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
7844         export function MessageHandler_get_route_handler(this_ptr: number): number {
7845                 if(!isWasmInitialized) {
7846                         throw new Error("initializeWasm() must be awaited first!");
7847                 }
7848                 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
7849                 return nativeResponseValue;
7850         }
7851         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
7852         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
7853                 if(!isWasmInitialized) {
7854                         throw new Error("initializeWasm() must be awaited first!");
7855                 }
7856                 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
7857                 // debug statements here
7858         }
7859         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
7860         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
7861                 if(!isWasmInitialized) {
7862                         throw new Error("initializeWasm() must be awaited first!");
7863                 }
7864                 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
7865                 return nativeResponseValue;
7866         }
7867         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
7868         export function SocketDescriptor_clone(orig: number): number {
7869                 if(!isWasmInitialized) {
7870                         throw new Error("initializeWasm() must be awaited first!");
7871                 }
7872                 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
7873                 return nativeResponseValue;
7874         }
7875         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
7876         export function SocketDescriptor_free(this_ptr: number): void {
7877                 if(!isWasmInitialized) {
7878                         throw new Error("initializeWasm() must be awaited first!");
7879                 }
7880                 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
7881                 // debug statements here
7882         }
7883         // void PeerHandleError_free(struct LDKPeerHandleError this_ptr);
7884         export function PeerHandleError_free(this_ptr: number): void {
7885                 if(!isWasmInitialized) {
7886                         throw new Error("initializeWasm() must be awaited first!");
7887                 }
7888                 const nativeResponseValue = wasm.PeerHandleError_free(this_ptr);
7889                 // debug statements here
7890         }
7891         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
7892         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
7893                 if(!isWasmInitialized) {
7894                         throw new Error("initializeWasm() must be awaited first!");
7895                 }
7896                 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
7897                 return nativeResponseValue;
7898         }
7899         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
7900         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
7901                 if(!isWasmInitialized) {
7902                         throw new Error("initializeWasm() must be awaited first!");
7903                 }
7904                 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
7905                 // debug statements here
7906         }
7907         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
7908         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
7909                 if(!isWasmInitialized) {
7910                         throw new Error("initializeWasm() must be awaited first!");
7911                 }
7912                 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
7913                 return nativeResponseValue;
7914         }
7915         // void PeerManager_free(struct LDKPeerManager this_ptr);
7916         export function PeerManager_free(this_ptr: number): void {
7917                 if(!isWasmInitialized) {
7918                         throw new Error("initializeWasm() must be awaited first!");
7919                 }
7920                 const nativeResponseValue = wasm.PeerManager_free(this_ptr);
7921                 // debug statements here
7922         }
7923         // 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);
7924         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
7925                 if(!isWasmInitialized) {
7926                         throw new Error("initializeWasm() must be awaited first!");
7927                 }
7928                 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
7929                 return nativeResponseValue;
7930         }
7931         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
7932         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
7933                 if(!isWasmInitialized) {
7934                         throw new Error("initializeWasm() must be awaited first!");
7935                 }
7936                 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
7937                 return nativeResponseValue;
7938         }
7939         // 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);
7940         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
7941                 if(!isWasmInitialized) {
7942                         throw new Error("initializeWasm() must be awaited first!");
7943                 }
7944                 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
7945                 return nativeResponseValue;
7946         }
7947         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
7948         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
7949                 if(!isWasmInitialized) {
7950                         throw new Error("initializeWasm() must be awaited first!");
7951                 }
7952                 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
7953                 return nativeResponseValue;
7954         }
7955         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
7956         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
7957                 if(!isWasmInitialized) {
7958                         throw new Error("initializeWasm() must be awaited first!");
7959                 }
7960                 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
7961                 return nativeResponseValue;
7962         }
7963         // 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);
7964         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
7965                 if(!isWasmInitialized) {
7966                         throw new Error("initializeWasm() must be awaited first!");
7967                 }
7968                 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
7969                 return nativeResponseValue;
7970         }
7971         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
7972         export function PeerManager_process_events(this_arg: number): void {
7973                 if(!isWasmInitialized) {
7974                         throw new Error("initializeWasm() must be awaited first!");
7975                 }
7976                 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
7977                 // debug statements here
7978         }
7979         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
7980         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
7981                 if(!isWasmInitialized) {
7982                         throw new Error("initializeWasm() must be awaited first!");
7983                 }
7984                 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
7985                 // debug statements here
7986         }
7987         // void PeerManager_timer_tick_occured(const struct LDKPeerManager *NONNULL_PTR this_arg);
7988         export function PeerManager_timer_tick_occured(this_arg: number): void {
7989                 if(!isWasmInitialized) {
7990                         throw new Error("initializeWasm() must be awaited first!");
7991                 }
7992                 const nativeResponseValue = wasm.PeerManager_timer_tick_occured(this_arg);
7993                 // debug statements here
7994         }
7995         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
7996         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
7997                 if(!isWasmInitialized) {
7998                         throw new Error("initializeWasm() must be awaited first!");
7999                 }
8000                 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
8001                 return decodeArray(nativeResponseValue);
8002         }
8003         // struct LDKCResult_SecretKeySecpErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
8004         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
8005                 if(!isWasmInitialized) {
8006                         throw new Error("initializeWasm() must be awaited first!");
8007                 }
8008                 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
8009                 return nativeResponseValue;
8010         }
8011         // struct LDKCResult_PublicKeySecpErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
8012         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
8013                 if(!isWasmInitialized) {
8014                         throw new Error("initializeWasm() must be awaited first!");
8015                 }
8016                 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
8017                 return nativeResponseValue;
8018         }
8019         // struct LDKCResult_SecretKeySecpErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
8020         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
8021                 if(!isWasmInitialized) {
8022                         throw new Error("initializeWasm() must be awaited first!");
8023                 }
8024                 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
8025                 return nativeResponseValue;
8026         }
8027         // struct LDKCResult_PublicKeySecpErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
8028         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
8029                 if(!isWasmInitialized) {
8030                         throw new Error("initializeWasm() must be awaited first!");
8031                 }
8032                 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
8033                 return nativeResponseValue;
8034         }
8035         // void TxCreationKeys_free(struct LDKTxCreationKeys this_ptr);
8036         export function TxCreationKeys_free(this_ptr: number): void {
8037                 if(!isWasmInitialized) {
8038                         throw new Error("initializeWasm() must be awaited first!");
8039                 }
8040                 const nativeResponseValue = wasm.TxCreationKeys_free(this_ptr);
8041                 // debug statements here
8042         }
8043         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
8044         export function TxCreationKeys_clone(orig: number): number {
8045                 if(!isWasmInitialized) {
8046                         throw new Error("initializeWasm() must be awaited first!");
8047                 }
8048                 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
8049                 return nativeResponseValue;
8050         }
8051         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
8052         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
8053                 if(!isWasmInitialized) {
8054                         throw new Error("initializeWasm() must be awaited first!");
8055                 }
8056                 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
8057                 return decodeArray(nativeResponseValue);
8058         }
8059         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8060         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8061                 if(!isWasmInitialized) {
8062                         throw new Error("initializeWasm() must be awaited first!");
8063                 }
8064                 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
8065                 // debug statements here
8066         }
8067         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
8068         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
8069                 if(!isWasmInitialized) {
8070                         throw new Error("initializeWasm() must be awaited first!");
8071                 }
8072                 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
8073                 return decodeArray(nativeResponseValue);
8074         }
8075         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8076         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
8077                 if(!isWasmInitialized) {
8078                         throw new Error("initializeWasm() must be awaited first!");
8079                 }
8080                 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
8081                 // debug statements here
8082         }
8083         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
8084         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
8085                 if(!isWasmInitialized) {
8086                         throw new Error("initializeWasm() must be awaited first!");
8087                 }
8088                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
8089                 return decodeArray(nativeResponseValue);
8090         }
8091         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8092         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
8093                 if(!isWasmInitialized) {
8094                         throw new Error("initializeWasm() must be awaited first!");
8095                 }
8096                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
8097                 // debug statements here
8098         }
8099         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
8100         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
8101                 if(!isWasmInitialized) {
8102                         throw new Error("initializeWasm() must be awaited first!");
8103                 }
8104                 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
8105                 return decodeArray(nativeResponseValue);
8106         }
8107         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8108         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
8109                 if(!isWasmInitialized) {
8110                         throw new Error("initializeWasm() must be awaited first!");
8111                 }
8112                 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
8113                 // debug statements here
8114         }
8115         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
8116         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
8117                 if(!isWasmInitialized) {
8118                         throw new Error("initializeWasm() must be awaited first!");
8119                 }
8120                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
8121                 return decodeArray(nativeResponseValue);
8122         }
8123         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8124         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
8125                 if(!isWasmInitialized) {
8126                         throw new Error("initializeWasm() must be awaited first!");
8127                 }
8128                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
8129                 // debug statements here
8130         }
8131         // 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);
8132         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 {
8133                 if(!isWasmInitialized) {
8134                         throw new Error("initializeWasm() must be awaited first!");
8135                 }
8136                 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));
8137                 return nativeResponseValue;
8138         }
8139         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
8140         export function TxCreationKeys_write(obj: number): Uint8Array {
8141                 if(!isWasmInitialized) {
8142                         throw new Error("initializeWasm() must be awaited first!");
8143                 }
8144                 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
8145                 return decodeArray(nativeResponseValue);
8146         }
8147         // struct LDKTxCreationKeys TxCreationKeys_read(struct LDKu8slice ser);
8148         export function TxCreationKeys_read(ser: Uint8Array): number {
8149                 if(!isWasmInitialized) {
8150                         throw new Error("initializeWasm() must be awaited first!");
8151                 }
8152                 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
8153                 return nativeResponseValue;
8154         }
8155         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_ptr);
8156         export function ChannelPublicKeys_free(this_ptr: number): void {
8157                 if(!isWasmInitialized) {
8158                         throw new Error("initializeWasm() must be awaited first!");
8159                 }
8160                 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_ptr);
8161                 // debug statements here
8162         }
8163         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
8164         export function ChannelPublicKeys_clone(orig: number): number {
8165                 if(!isWasmInitialized) {
8166                         throw new Error("initializeWasm() must be awaited first!");
8167                 }
8168                 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
8169                 return nativeResponseValue;
8170         }
8171         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
8172         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
8173                 if(!isWasmInitialized) {
8174                         throw new Error("initializeWasm() must be awaited first!");
8175                 }
8176                 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
8177                 return decodeArray(nativeResponseValue);
8178         }
8179         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8180         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
8181                 if(!isWasmInitialized) {
8182                         throw new Error("initializeWasm() must be awaited first!");
8183                 }
8184                 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
8185                 // debug statements here
8186         }
8187         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
8188         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
8189                 if(!isWasmInitialized) {
8190                         throw new Error("initializeWasm() must be awaited first!");
8191                 }
8192                 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
8193                 return decodeArray(nativeResponseValue);
8194         }
8195         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8196         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
8197                 if(!isWasmInitialized) {
8198                         throw new Error("initializeWasm() must be awaited first!");
8199                 }
8200                 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
8201                 // debug statements here
8202         }
8203         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
8204         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
8205                 if(!isWasmInitialized) {
8206                         throw new Error("initializeWasm() must be awaited first!");
8207                 }
8208                 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
8209                 return decodeArray(nativeResponseValue);
8210         }
8211         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8212         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
8213                 if(!isWasmInitialized) {
8214                         throw new Error("initializeWasm() must be awaited first!");
8215                 }
8216                 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
8217                 // debug statements here
8218         }
8219         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
8220         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
8221                 if(!isWasmInitialized) {
8222                         throw new Error("initializeWasm() must be awaited first!");
8223                 }
8224                 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
8225                 return decodeArray(nativeResponseValue);
8226         }
8227         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8228         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
8229                 if(!isWasmInitialized) {
8230                         throw new Error("initializeWasm() must be awaited first!");
8231                 }
8232                 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
8233                 // debug statements here
8234         }
8235         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
8236         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
8237                 if(!isWasmInitialized) {
8238                         throw new Error("initializeWasm() must be awaited first!");
8239                 }
8240                 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
8241                 return decodeArray(nativeResponseValue);
8242         }
8243         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8244         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
8245                 if(!isWasmInitialized) {
8246                         throw new Error("initializeWasm() must be awaited first!");
8247                 }
8248                 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
8249                 // debug statements here
8250         }
8251         // 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);
8252         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 {
8253                 if(!isWasmInitialized) {
8254                         throw new Error("initializeWasm() must be awaited first!");
8255                 }
8256                 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));
8257                 return nativeResponseValue;
8258         }
8259         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
8260         export function ChannelPublicKeys_write(obj: number): Uint8Array {
8261                 if(!isWasmInitialized) {
8262                         throw new Error("initializeWasm() must be awaited first!");
8263                 }
8264                 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
8265                 return decodeArray(nativeResponseValue);
8266         }
8267         // struct LDKChannelPublicKeys ChannelPublicKeys_read(struct LDKu8slice ser);
8268         export function ChannelPublicKeys_read(ser: Uint8Array): number {
8269                 if(!isWasmInitialized) {
8270                         throw new Error("initializeWasm() must be awaited first!");
8271                 }
8272                 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
8273                 return nativeResponseValue;
8274         }
8275         // MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ 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);
8276         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 {
8277                 if(!isWasmInitialized) {
8278                         throw new Error("initializeWasm() must be awaited first!");
8279                 }
8280                 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));
8281                 return nativeResponseValue;
8282         }
8283         // MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
8284         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
8285                 if(!isWasmInitialized) {
8286                         throw new Error("initializeWasm() must be awaited first!");
8287                 }
8288                 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
8289                 return nativeResponseValue;
8290         }
8291         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
8292         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
8293                 if(!isWasmInitialized) {
8294                         throw new Error("initializeWasm() must be awaited first!");
8295                 }
8296                 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
8297                 return decodeArray(nativeResponseValue);
8298         }
8299         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_ptr);
8300         export function HTLCOutputInCommitment_free(this_ptr: number): void {
8301                 if(!isWasmInitialized) {
8302                         throw new Error("initializeWasm() must be awaited first!");
8303                 }
8304                 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_ptr);
8305                 // debug statements here
8306         }
8307         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
8308         export function HTLCOutputInCommitment_clone(orig: number): number {
8309                 if(!isWasmInitialized) {
8310                         throw new Error("initializeWasm() must be awaited first!");
8311                 }
8312                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
8313                 return nativeResponseValue;
8314         }
8315         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
8316         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
8317                 if(!isWasmInitialized) {
8318                         throw new Error("initializeWasm() must be awaited first!");
8319                 }
8320                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
8321                 return nativeResponseValue;
8322         }
8323         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
8324         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
8325                 if(!isWasmInitialized) {
8326                         throw new Error("initializeWasm() must be awaited first!");
8327                 }
8328                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
8329                 // debug statements here
8330         }
8331         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
8332         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
8333                 if(!isWasmInitialized) {
8334                         throw new Error("initializeWasm() must be awaited first!");
8335                 }
8336                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
8337                 return nativeResponseValue;
8338         }
8339         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
8340         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
8341                 if(!isWasmInitialized) {
8342                         throw new Error("initializeWasm() must be awaited first!");
8343                 }
8344                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
8345                 // debug statements here
8346         }
8347         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
8348         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
8349                 if(!isWasmInitialized) {
8350                         throw new Error("initializeWasm() must be awaited first!");
8351                 }
8352                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
8353                 return nativeResponseValue;
8354         }
8355         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
8356         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
8357                 if(!isWasmInitialized) {
8358                         throw new Error("initializeWasm() must be awaited first!");
8359                 }
8360                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
8361                 // debug statements here
8362         }
8363         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
8364         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
8365                 if(!isWasmInitialized) {
8366                         throw new Error("initializeWasm() must be awaited first!");
8367                 }
8368                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
8369                 return decodeArray(nativeResponseValue);
8370         }
8371         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8372         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
8373                 if(!isWasmInitialized) {
8374                         throw new Error("initializeWasm() must be awaited first!");
8375                 }
8376                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
8377                 // debug statements here
8378         }
8379         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
8380         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
8381                 if(!isWasmInitialized) {
8382                         throw new Error("initializeWasm() must be awaited first!");
8383                 }
8384                 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
8385                 return decodeArray(nativeResponseValue);
8386         }
8387         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_read(struct LDKu8slice ser);
8388         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
8389                 if(!isWasmInitialized) {
8390                         throw new Error("initializeWasm() must be awaited first!");
8391                 }
8392                 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
8393                 return nativeResponseValue;
8394         }
8395         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
8396         export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
8397                 if(!isWasmInitialized) {
8398                         throw new Error("initializeWasm() must be awaited first!");
8399                 }
8400                 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
8401                 return decodeArray(nativeResponseValue);
8402         }
8403         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
8404         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
8405                 if(!isWasmInitialized) {
8406                         throw new Error("initializeWasm() must be awaited first!");
8407                 }
8408                 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
8409                 return decodeArray(nativeResponseValue);
8410         }
8411         // 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);
8412         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 {
8413                 if(!isWasmInitialized) {
8414                         throw new Error("initializeWasm() must be awaited first!");
8415                 }
8416                 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(prev_hash), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
8417                 return decodeArray(nativeResponseValue);
8418         }
8419         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_ptr);
8420         export function ChannelTransactionParameters_free(this_ptr: number): void {
8421                 if(!isWasmInitialized) {
8422                         throw new Error("initializeWasm() must be awaited first!");
8423                 }
8424                 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_ptr);
8425                 // debug statements here
8426         }
8427         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
8428         export function ChannelTransactionParameters_clone(orig: number): number {
8429                 if(!isWasmInitialized) {
8430                         throw new Error("initializeWasm() must be awaited first!");
8431                 }
8432                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
8433                 return nativeResponseValue;
8434         }
8435         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
8436         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
8437                 if(!isWasmInitialized) {
8438                         throw new Error("initializeWasm() must be awaited first!");
8439                 }
8440                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
8441                 return nativeResponseValue;
8442         }
8443         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
8444         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
8445                 if(!isWasmInitialized) {
8446                         throw new Error("initializeWasm() must be awaited first!");
8447                 }
8448                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
8449                 // debug statements here
8450         }
8451         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
8452         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
8453                 if(!isWasmInitialized) {
8454                         throw new Error("initializeWasm() must be awaited first!");
8455                 }
8456                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
8457                 return nativeResponseValue;
8458         }
8459         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
8460         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
8461                 if(!isWasmInitialized) {
8462                         throw new Error("initializeWasm() must be awaited first!");
8463                 }
8464                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
8465                 // debug statements here
8466         }
8467         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
8468         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
8469                 if(!isWasmInitialized) {
8470                         throw new Error("initializeWasm() must be awaited first!");
8471                 }
8472                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
8473                 return nativeResponseValue;
8474         }
8475         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
8476         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
8477                 if(!isWasmInitialized) {
8478                         throw new Error("initializeWasm() must be awaited first!");
8479                 }
8480                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
8481                 // debug statements here
8482         }
8483         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
8484         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
8485                 if(!isWasmInitialized) {
8486                         throw new Error("initializeWasm() must be awaited first!");
8487                 }
8488                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
8489                 return nativeResponseValue;
8490         }
8491         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
8492         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
8493                 if(!isWasmInitialized) {
8494                         throw new Error("initializeWasm() must be awaited first!");
8495                 }
8496                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
8497                 // debug statements here
8498         }
8499         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
8500         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
8501                 if(!isWasmInitialized) {
8502                         throw new Error("initializeWasm() must be awaited first!");
8503                 }
8504                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
8505                 return nativeResponseValue;
8506         }
8507         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8508         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
8509                 if(!isWasmInitialized) {
8510                         throw new Error("initializeWasm() must be awaited first!");
8511                 }
8512                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
8513                 // debug statements here
8514         }
8515         // 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);
8516         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 {
8517                 if(!isWasmInitialized) {
8518                         throw new Error("initializeWasm() must be awaited first!");
8519                 }
8520                 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
8521                 return nativeResponseValue;
8522         }
8523         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_ptr);
8524         export function CounterpartyChannelTransactionParameters_free(this_ptr: number): void {
8525                 if(!isWasmInitialized) {
8526                         throw new Error("initializeWasm() must be awaited first!");
8527                 }
8528                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_ptr);
8529                 // debug statements here
8530         }
8531         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
8532         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
8533                 if(!isWasmInitialized) {
8534                         throw new Error("initializeWasm() must be awaited first!");
8535                 }
8536                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
8537                 return nativeResponseValue;
8538         }
8539         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
8540         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
8541                 if(!isWasmInitialized) {
8542                         throw new Error("initializeWasm() must be awaited first!");
8543                 }
8544                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
8545                 return nativeResponseValue;
8546         }
8547         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
8548         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
8549                 if(!isWasmInitialized) {
8550                         throw new Error("initializeWasm() must be awaited first!");
8551                 }
8552                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
8553                 // debug statements here
8554         }
8555         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
8556         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
8557                 if(!isWasmInitialized) {
8558                         throw new Error("initializeWasm() must be awaited first!");
8559                 }
8560                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
8561                 return nativeResponseValue;
8562         }
8563         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
8564         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
8565                 if(!isWasmInitialized) {
8566                         throw new Error("initializeWasm() must be awaited first!");
8567                 }
8568                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
8569                 // debug statements here
8570         }
8571         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
8572         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
8573                 if(!isWasmInitialized) {
8574                         throw new Error("initializeWasm() must be awaited first!");
8575                 }
8576                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
8577                 return nativeResponseValue;
8578         }
8579         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
8580         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
8581                 if(!isWasmInitialized) {
8582                         throw new Error("initializeWasm() must be awaited first!");
8583                 }
8584                 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
8585                 return nativeResponseValue;
8586         }
8587         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
8588         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
8589                 if(!isWasmInitialized) {
8590                         throw new Error("initializeWasm() must be awaited first!");
8591                 }
8592                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
8593                 return nativeResponseValue;
8594         }
8595         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
8596         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
8597                 if(!isWasmInitialized) {
8598                         throw new Error("initializeWasm() must be awaited first!");
8599                 }
8600                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
8601                 return nativeResponseValue;
8602         }
8603         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
8604         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
8605                 if(!isWasmInitialized) {
8606                         throw new Error("initializeWasm() must be awaited first!");
8607                 }
8608                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
8609                 return decodeArray(nativeResponseValue);
8610         }
8611         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
8612         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
8613                 if(!isWasmInitialized) {
8614                         throw new Error("initializeWasm() must be awaited first!");
8615                 }
8616                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
8617                 return nativeResponseValue;
8618         }
8619         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
8620         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
8621                 if(!isWasmInitialized) {
8622                         throw new Error("initializeWasm() must be awaited first!");
8623                 }
8624                 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
8625                 return decodeArray(nativeResponseValue);
8626         }
8627         // struct LDKChannelTransactionParameters ChannelTransactionParameters_read(struct LDKu8slice ser);
8628         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
8629                 if(!isWasmInitialized) {
8630                         throw new Error("initializeWasm() must be awaited first!");
8631                 }
8632                 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
8633                 return nativeResponseValue;
8634         }
8635         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_ptr);
8636         export function DirectedChannelTransactionParameters_free(this_ptr: number): void {
8637                 if(!isWasmInitialized) {
8638                         throw new Error("initializeWasm() must be awaited first!");
8639                 }
8640                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_ptr);
8641                 // debug statements here
8642         }
8643         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
8644         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
8645                 if(!isWasmInitialized) {
8646                         throw new Error("initializeWasm() must be awaited first!");
8647                 }
8648                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
8649                 return nativeResponseValue;
8650         }
8651         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
8652         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
8653                 if(!isWasmInitialized) {
8654                         throw new Error("initializeWasm() must be awaited first!");
8655                 }
8656                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
8657                 return nativeResponseValue;
8658         }
8659         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
8660         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
8661                 if(!isWasmInitialized) {
8662                         throw new Error("initializeWasm() must be awaited first!");
8663                 }
8664                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
8665                 return nativeResponseValue;
8666         }
8667         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
8668         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
8669                 if(!isWasmInitialized) {
8670                         throw new Error("initializeWasm() must be awaited first!");
8671                 }
8672                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
8673                 return nativeResponseValue;
8674         }
8675         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
8676         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
8677                 if(!isWasmInitialized) {
8678                         throw new Error("initializeWasm() must be awaited first!");
8679                 }
8680                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
8681                 return nativeResponseValue;
8682         }
8683         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_ptr);
8684         export function HolderCommitmentTransaction_free(this_ptr: number): void {
8685                 if(!isWasmInitialized) {
8686                         throw new Error("initializeWasm() must be awaited first!");
8687                 }
8688                 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_ptr);
8689                 // debug statements here
8690         }
8691         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
8692         export function HolderCommitmentTransaction_clone(orig: number): number {
8693                 if(!isWasmInitialized) {
8694                         throw new Error("initializeWasm() must be awaited first!");
8695                 }
8696                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
8697                 return nativeResponseValue;
8698         }
8699         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
8700         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
8701                 if(!isWasmInitialized) {
8702                         throw new Error("initializeWasm() must be awaited first!");
8703                 }
8704                 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
8705                 return decodeArray(nativeResponseValue);
8706         }
8707         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
8708         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
8709                 if(!isWasmInitialized) {
8710                         throw new Error("initializeWasm() must be awaited first!");
8711                 }
8712                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
8713                 // debug statements here
8714         }
8715         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
8716         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
8717                 if(!isWasmInitialized) {
8718                         throw new Error("initializeWasm() must be awaited first!");
8719                 }
8720                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
8721                 // debug statements here
8722         }
8723         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
8724         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
8725                 if(!isWasmInitialized) {
8726                         throw new Error("initializeWasm() must be awaited first!");
8727                 }
8728                 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
8729                 return decodeArray(nativeResponseValue);
8730         }
8731         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_read(struct LDKu8slice ser);
8732         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
8733                 if(!isWasmInitialized) {
8734                         throw new Error("initializeWasm() must be awaited first!");
8735                 }
8736                 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
8737                 return nativeResponseValue;
8738         }
8739         // 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);
8740         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
8741                 if(!isWasmInitialized) {
8742                         throw new Error("initializeWasm() must be awaited first!");
8743                 }
8744                 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
8745                 return nativeResponseValue;
8746         }
8747         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_ptr);
8748         export function BuiltCommitmentTransaction_free(this_ptr: number): void {
8749                 if(!isWasmInitialized) {
8750                         throw new Error("initializeWasm() must be awaited first!");
8751                 }
8752                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_ptr);
8753                 // debug statements here
8754         }
8755         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
8756         export function BuiltCommitmentTransaction_clone(orig: number): number {
8757                 if(!isWasmInitialized) {
8758                         throw new Error("initializeWasm() must be awaited first!");
8759                 }
8760                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
8761                 return nativeResponseValue;
8762         }
8763         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
8764         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
8765                 if(!isWasmInitialized) {
8766                         throw new Error("initializeWasm() must be awaited first!");
8767                 }
8768                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
8769                 return decodeArray(nativeResponseValue);
8770         }
8771         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
8772         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
8773                 if(!isWasmInitialized) {
8774                         throw new Error("initializeWasm() must be awaited first!");
8775                 }
8776                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
8777                 // debug statements here
8778         }
8779         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
8780         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
8781                 if(!isWasmInitialized) {
8782                         throw new Error("initializeWasm() must be awaited first!");
8783                 }
8784                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
8785                 return decodeArray(nativeResponseValue);
8786         }
8787         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8788         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
8789                 if(!isWasmInitialized) {
8790                         throw new Error("initializeWasm() must be awaited first!");
8791                 }
8792                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
8793                 // debug statements here
8794         }
8795         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
8796         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
8797                 if(!isWasmInitialized) {
8798                         throw new Error("initializeWasm() must be awaited first!");
8799                 }
8800                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
8801                 return nativeResponseValue;
8802         }
8803         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
8804         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
8805                 if(!isWasmInitialized) {
8806                         throw new Error("initializeWasm() must be awaited first!");
8807                 }
8808                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
8809                 return decodeArray(nativeResponseValue);
8810         }
8811         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_read(struct LDKu8slice ser);
8812         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
8813                 if(!isWasmInitialized) {
8814                         throw new Error("initializeWasm() must be awaited first!");
8815                 }
8816                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
8817                 return nativeResponseValue;
8818         }
8819         // 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);
8820         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
8821                 if(!isWasmInitialized) {
8822                         throw new Error("initializeWasm() must be awaited first!");
8823                 }
8824                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
8825                 return decodeArray(nativeResponseValue);
8826         }
8827         // 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);
8828         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
8829                 if(!isWasmInitialized) {
8830                         throw new Error("initializeWasm() must be awaited first!");
8831                 }
8832                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
8833                 return decodeArray(nativeResponseValue);
8834         }
8835         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_ptr);
8836         export function CommitmentTransaction_free(this_ptr: number): void {
8837                 if(!isWasmInitialized) {
8838                         throw new Error("initializeWasm() must be awaited first!");
8839                 }
8840                 const nativeResponseValue = wasm.CommitmentTransaction_free(this_ptr);
8841                 // debug statements here
8842         }
8843         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
8844         export function CommitmentTransaction_clone(orig: number): number {
8845                 if(!isWasmInitialized) {
8846                         throw new Error("initializeWasm() must be awaited first!");
8847                 }
8848                 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
8849                 return nativeResponseValue;
8850         }
8851         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
8852         export function CommitmentTransaction_write(obj: number): Uint8Array {
8853                 if(!isWasmInitialized) {
8854                         throw new Error("initializeWasm() must be awaited first!");
8855                 }
8856                 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
8857                 return decodeArray(nativeResponseValue);
8858         }
8859         // struct LDKCommitmentTransaction CommitmentTransaction_read(struct LDKu8slice ser);
8860         export function CommitmentTransaction_read(ser: Uint8Array): number {
8861                 if(!isWasmInitialized) {
8862                         throw new Error("initializeWasm() must be awaited first!");
8863                 }
8864                 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
8865                 return nativeResponseValue;
8866         }
8867         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
8868         export function CommitmentTransaction_commitment_number(this_arg: number): number {
8869                 if(!isWasmInitialized) {
8870                         throw new Error("initializeWasm() must be awaited first!");
8871                 }
8872                 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
8873                 return nativeResponseValue;
8874         }
8875         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
8876         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
8877                 if(!isWasmInitialized) {
8878                         throw new Error("initializeWasm() must be awaited first!");
8879                 }
8880                 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
8881                 return nativeResponseValue;
8882         }
8883         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
8884         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
8885                 if(!isWasmInitialized) {
8886                         throw new Error("initializeWasm() must be awaited first!");
8887                 }
8888                 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
8889                 return nativeResponseValue;
8890         }
8891         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
8892         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
8893                 if(!isWasmInitialized) {
8894                         throw new Error("initializeWasm() must be awaited first!");
8895                 }
8896                 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
8897                 return nativeResponseValue;
8898         }
8899         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
8900         export function CommitmentTransaction_trust(this_arg: number): number {
8901                 if(!isWasmInitialized) {
8902                         throw new Error("initializeWasm() must be awaited first!");
8903                 }
8904                 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
8905                 return nativeResponseValue;
8906         }
8907         // 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);
8908         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
8909                 if(!isWasmInitialized) {
8910                         throw new Error("initializeWasm() must be awaited first!");
8911                 }
8912                 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
8913                 return nativeResponseValue;
8914         }
8915         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_ptr);
8916         export function TrustedCommitmentTransaction_free(this_ptr: number): void {
8917                 if(!isWasmInitialized) {
8918                         throw new Error("initializeWasm() must be awaited first!");
8919                 }
8920                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_ptr);
8921                 // debug statements here
8922         }
8923         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
8924         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
8925                 if(!isWasmInitialized) {
8926                         throw new Error("initializeWasm() must be awaited first!");
8927                 }
8928                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
8929                 return decodeArray(nativeResponseValue);
8930         }
8931         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
8932         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
8933                 if(!isWasmInitialized) {
8934                         throw new Error("initializeWasm() must be awaited first!");
8935                 }
8936                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
8937                 return nativeResponseValue;
8938         }
8939         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
8940         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
8941                 if(!isWasmInitialized) {
8942                         throw new Error("initializeWasm() must be awaited first!");
8943                 }
8944                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
8945                 return nativeResponseValue;
8946         }
8947         // 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);
8948         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
8949                 if(!isWasmInitialized) {
8950                         throw new Error("initializeWasm() must be awaited first!");
8951                 }
8952                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
8953                 return nativeResponseValue;
8954         }
8955         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
8956         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
8957                 if(!isWasmInitialized) {
8958                         throw new Error("initializeWasm() must be awaited first!");
8959                 }
8960                 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
8961                 return nativeResponseValue;
8962         }
8963         // void InitFeatures_free(struct LDKInitFeatures this_ptr);
8964         export function InitFeatures_free(this_ptr: number): void {
8965                 if(!isWasmInitialized) {
8966                         throw new Error("initializeWasm() must be awaited first!");
8967                 }
8968                 const nativeResponseValue = wasm.InitFeatures_free(this_ptr);
8969                 // debug statements here
8970         }
8971         // void NodeFeatures_free(struct LDKNodeFeatures this_ptr);
8972         export function NodeFeatures_free(this_ptr: number): void {
8973                 if(!isWasmInitialized) {
8974                         throw new Error("initializeWasm() must be awaited first!");
8975                 }
8976                 const nativeResponseValue = wasm.NodeFeatures_free(this_ptr);
8977                 // debug statements here
8978         }
8979         // void ChannelFeatures_free(struct LDKChannelFeatures this_ptr);
8980         export function ChannelFeatures_free(this_ptr: number): void {
8981                 if(!isWasmInitialized) {
8982                         throw new Error("initializeWasm() must be awaited first!");
8983                 }
8984                 const nativeResponseValue = wasm.ChannelFeatures_free(this_ptr);
8985                 // debug statements here
8986         }
8987         // void RouteHop_free(struct LDKRouteHop this_ptr);
8988         export function RouteHop_free(this_ptr: number): void {
8989                 if(!isWasmInitialized) {
8990                         throw new Error("initializeWasm() must be awaited first!");
8991                 }
8992                 const nativeResponseValue = wasm.RouteHop_free(this_ptr);
8993                 // debug statements here
8994         }
8995         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
8996         export function RouteHop_clone(orig: number): number {
8997                 if(!isWasmInitialized) {
8998                         throw new Error("initializeWasm() must be awaited first!");
8999                 }
9000                 const nativeResponseValue = wasm.RouteHop_clone(orig);
9001                 return nativeResponseValue;
9002         }
9003         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
9004         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
9005                 if(!isWasmInitialized) {
9006                         throw new Error("initializeWasm() must be awaited first!");
9007                 }
9008                 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
9009                 return decodeArray(nativeResponseValue);
9010         }
9011         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9012         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
9013                 if(!isWasmInitialized) {
9014                         throw new Error("initializeWasm() must be awaited first!");
9015                 }
9016                 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
9017                 // debug statements here
9018         }
9019         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
9020         export function RouteHop_get_node_features(this_ptr: number): number {
9021                 if(!isWasmInitialized) {
9022                         throw new Error("initializeWasm() must be awaited first!");
9023                 }
9024                 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
9025                 return nativeResponseValue;
9026         }
9027         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
9028         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
9029                 if(!isWasmInitialized) {
9030                         throw new Error("initializeWasm() must be awaited first!");
9031                 }
9032                 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
9033                 // debug statements here
9034         }
9035         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
9036         export function RouteHop_get_short_channel_id(this_ptr: number): number {
9037                 if(!isWasmInitialized) {
9038                         throw new Error("initializeWasm() must be awaited first!");
9039                 }
9040                 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
9041                 return nativeResponseValue;
9042         }
9043         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
9044         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
9045                 if(!isWasmInitialized) {
9046                         throw new Error("initializeWasm() must be awaited first!");
9047                 }
9048                 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
9049                 // debug statements here
9050         }
9051         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
9052         export function RouteHop_get_channel_features(this_ptr: number): number {
9053                 if(!isWasmInitialized) {
9054                         throw new Error("initializeWasm() must be awaited first!");
9055                 }
9056                 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
9057                 return nativeResponseValue;
9058         }
9059         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
9060         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
9061                 if(!isWasmInitialized) {
9062                         throw new Error("initializeWasm() must be awaited first!");
9063                 }
9064                 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
9065                 // debug statements here
9066         }
9067         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
9068         export function RouteHop_get_fee_msat(this_ptr: number): number {
9069                 if(!isWasmInitialized) {
9070                         throw new Error("initializeWasm() must be awaited first!");
9071                 }
9072                 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
9073                 return nativeResponseValue;
9074         }
9075         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
9076         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
9077                 if(!isWasmInitialized) {
9078                         throw new Error("initializeWasm() must be awaited first!");
9079                 }
9080                 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
9081                 // debug statements here
9082         }
9083         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
9084         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
9085                 if(!isWasmInitialized) {
9086                         throw new Error("initializeWasm() must be awaited first!");
9087                 }
9088                 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
9089                 return nativeResponseValue;
9090         }
9091         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
9092         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
9093                 if(!isWasmInitialized) {
9094                         throw new Error("initializeWasm() must be awaited first!");
9095                 }
9096                 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
9097                 // debug statements here
9098         }
9099         // 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);
9100         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 {
9101                 if(!isWasmInitialized) {
9102                         throw new Error("initializeWasm() must be awaited first!");
9103                 }
9104                 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);
9105                 return nativeResponseValue;
9106         }
9107         // void Route_free(struct LDKRoute this_ptr);
9108         export function Route_free(this_ptr: number): void {
9109                 if(!isWasmInitialized) {
9110                         throw new Error("initializeWasm() must be awaited first!");
9111                 }
9112                 const nativeResponseValue = wasm.Route_free(this_ptr);
9113                 // debug statements here
9114         }
9115         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
9116         export function Route_clone(orig: number): number {
9117                 if(!isWasmInitialized) {
9118                         throw new Error("initializeWasm() must be awaited first!");
9119                 }
9120                 const nativeResponseValue = wasm.Route_clone(orig);
9121                 return nativeResponseValue;
9122         }
9123         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
9124         export function Route_set_paths(this_ptr: number, val: number[][]): void {
9125                 if(!isWasmInitialized) {
9126                         throw new Error("initializeWasm() must be awaited first!");
9127                 }
9128                 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
9129                 // debug statements here
9130         }
9131         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
9132         export function Route_new(paths_arg: number[][]): number {
9133                 if(!isWasmInitialized) {
9134                         throw new Error("initializeWasm() must be awaited first!");
9135                 }
9136                 const nativeResponseValue = wasm.Route_new(paths_arg);
9137                 return nativeResponseValue;
9138         }
9139         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
9140         export function Route_write(obj: number): Uint8Array {
9141                 if(!isWasmInitialized) {
9142                         throw new Error("initializeWasm() must be awaited first!");
9143                 }
9144                 const nativeResponseValue = wasm.Route_write(obj);
9145                 return decodeArray(nativeResponseValue);
9146         }
9147         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
9148         export function Route_read(ser: Uint8Array): number {
9149                 if(!isWasmInitialized) {
9150                         throw new Error("initializeWasm() must be awaited first!");
9151                 }
9152                 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
9153                 return nativeResponseValue;
9154         }
9155         // void RouteHint_free(struct LDKRouteHint this_ptr);
9156         export function RouteHint_free(this_ptr: number): void {
9157                 if(!isWasmInitialized) {
9158                         throw new Error("initializeWasm() must be awaited first!");
9159                 }
9160                 const nativeResponseValue = wasm.RouteHint_free(this_ptr);
9161                 // debug statements here
9162         }
9163         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
9164         export function RouteHint_clone(orig: number): number {
9165                 if(!isWasmInitialized) {
9166                         throw new Error("initializeWasm() must be awaited first!");
9167                 }
9168                 const nativeResponseValue = wasm.RouteHint_clone(orig);
9169                 return nativeResponseValue;
9170         }
9171         // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
9172         export function RouteHint_get_src_node_id(this_ptr: number): Uint8Array {
9173                 if(!isWasmInitialized) {
9174                         throw new Error("initializeWasm() must be awaited first!");
9175                 }
9176                 const nativeResponseValue = wasm.RouteHint_get_src_node_id(this_ptr);
9177                 return decodeArray(nativeResponseValue);
9178         }
9179         // void RouteHint_set_src_node_id(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9180         export function RouteHint_set_src_node_id(this_ptr: number, val: Uint8Array): void {
9181                 if(!isWasmInitialized) {
9182                         throw new Error("initializeWasm() must be awaited first!");
9183                 }
9184                 const nativeResponseValue = wasm.RouteHint_set_src_node_id(this_ptr, encodeArray(val));
9185                 // debug statements here
9186         }
9187         // uint64_t RouteHint_get_short_channel_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
9188         export function RouteHint_get_short_channel_id(this_ptr: number): number {
9189                 if(!isWasmInitialized) {
9190                         throw new Error("initializeWasm() must be awaited first!");
9191                 }
9192                 const nativeResponseValue = wasm.RouteHint_get_short_channel_id(this_ptr);
9193                 return nativeResponseValue;
9194         }
9195         // void RouteHint_set_short_channel_id(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
9196         export function RouteHint_set_short_channel_id(this_ptr: number, val: number): void {
9197                 if(!isWasmInitialized) {
9198                         throw new Error("initializeWasm() must be awaited first!");
9199                 }
9200                 const nativeResponseValue = wasm.RouteHint_set_short_channel_id(this_ptr, val);
9201                 // debug statements here
9202         }
9203         // struct LDKRoutingFees RouteHint_get_fees(const struct LDKRouteHint *NONNULL_PTR this_ptr);
9204         export function RouteHint_get_fees(this_ptr: number): number {
9205                 if(!isWasmInitialized) {
9206                         throw new Error("initializeWasm() must be awaited first!");
9207                 }
9208                 const nativeResponseValue = wasm.RouteHint_get_fees(this_ptr);
9209                 return nativeResponseValue;
9210         }
9211         // void RouteHint_set_fees(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
9212         export function RouteHint_set_fees(this_ptr: number, val: number): void {
9213                 if(!isWasmInitialized) {
9214                         throw new Error("initializeWasm() must be awaited first!");
9215                 }
9216                 const nativeResponseValue = wasm.RouteHint_set_fees(this_ptr, val);
9217                 // debug statements here
9218         }
9219         // uint16_t RouteHint_get_cltv_expiry_delta(const struct LDKRouteHint *NONNULL_PTR this_ptr);
9220         export function RouteHint_get_cltv_expiry_delta(this_ptr: number): number {
9221                 if(!isWasmInitialized) {
9222                         throw new Error("initializeWasm() must be awaited first!");
9223                 }
9224                 const nativeResponseValue = wasm.RouteHint_get_cltv_expiry_delta(this_ptr);
9225                 return nativeResponseValue;
9226         }
9227         // void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
9228         export function RouteHint_set_cltv_expiry_delta(this_ptr: number, val: number): void {
9229                 if(!isWasmInitialized) {
9230                         throw new Error("initializeWasm() must be awaited first!");
9231                 }
9232                 const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
9233                 // debug statements here
9234         }
9235         // uint64_t RouteHint_get_htlc_minimum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
9236         export function RouteHint_get_htlc_minimum_msat(this_ptr: number): number {
9237                 if(!isWasmInitialized) {
9238                         throw new Error("initializeWasm() must be awaited first!");
9239                 }
9240                 const nativeResponseValue = wasm.RouteHint_get_htlc_minimum_msat(this_ptr);
9241                 return nativeResponseValue;
9242         }
9243         // void RouteHint_set_htlc_minimum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
9244         export function RouteHint_set_htlc_minimum_msat(this_ptr: number, val: number): void {
9245                 if(!isWasmInitialized) {
9246                         throw new Error("initializeWasm() must be awaited first!");
9247                 }
9248                 const nativeResponseValue = wasm.RouteHint_set_htlc_minimum_msat(this_ptr, val);
9249                 // debug statements here
9250         }
9251         // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg);
9252         export function RouteHint_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number): number {
9253                 if(!isWasmInitialized) {
9254                         throw new Error("initializeWasm() must be awaited first!");
9255                 }
9256                 const nativeResponseValue = wasm.RouteHint_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
9257                 return nativeResponseValue;
9258         }
9259         // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey target, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
9260         export function get_route(our_node_id: Uint8Array, network: number, target: Uint8Array, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
9261                 if(!isWasmInitialized) {
9262                         throw new Error("initializeWasm() must be awaited first!");
9263                 }
9264                 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(target), first_hops, last_hops, final_value_msat, final_cltv, logger);
9265                 return nativeResponseValue;
9266         }
9267         // void NetworkGraph_free(struct LDKNetworkGraph this_ptr);
9268         export function NetworkGraph_free(this_ptr: number): void {
9269                 if(!isWasmInitialized) {
9270                         throw new Error("initializeWasm() must be awaited first!");
9271                 }
9272                 const nativeResponseValue = wasm.NetworkGraph_free(this_ptr);
9273                 // debug statements here
9274         }
9275         // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_ptr);
9276         export function LockedNetworkGraph_free(this_ptr: number): void {
9277                 if(!isWasmInitialized) {
9278                         throw new Error("initializeWasm() must be awaited first!");
9279                 }
9280                 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_ptr);
9281                 // debug statements here
9282         }
9283         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_ptr);
9284         export function NetGraphMsgHandler_free(this_ptr: number): void {
9285                 if(!isWasmInitialized) {
9286                         throw new Error("initializeWasm() must be awaited first!");
9287                 }
9288                 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_ptr);
9289                 // debug statements here
9290         }
9291         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
9292         export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
9293                 if(!isWasmInitialized) {
9294                         throw new Error("initializeWasm() must be awaited first!");
9295                 }
9296                 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
9297                 return nativeResponseValue;
9298         }
9299         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
9300         export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
9301                 if(!isWasmInitialized) {
9302                         throw new Error("initializeWasm() must be awaited first!");
9303                 }
9304                 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
9305                 return nativeResponseValue;
9306         }
9307         // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
9308         export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
9309                 if(!isWasmInitialized) {
9310                         throw new Error("initializeWasm() must be awaited first!");
9311                 }
9312                 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
9313                 return nativeResponseValue;
9314         }
9315         // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
9316         export function LockedNetworkGraph_graph(this_arg: number): number {
9317                 if(!isWasmInitialized) {
9318                         throw new Error("initializeWasm() must be awaited first!");
9319                 }
9320                 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
9321                 return nativeResponseValue;
9322         }
9323         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
9324         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
9325                 if(!isWasmInitialized) {
9326                         throw new Error("initializeWasm() must be awaited first!");
9327                 }
9328                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
9329                 return nativeResponseValue;
9330         }
9331         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
9332         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
9333                 if(!isWasmInitialized) {
9334                         throw new Error("initializeWasm() must be awaited first!");
9335                 }
9336                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
9337                 return nativeResponseValue;
9338         }
9339         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_ptr);
9340         export function DirectionalChannelInfo_free(this_ptr: number): void {
9341                 if(!isWasmInitialized) {
9342                         throw new Error("initializeWasm() must be awaited first!");
9343                 }
9344                 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_ptr);
9345                 // debug statements here
9346         }
9347         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
9348         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
9349                 if(!isWasmInitialized) {
9350                         throw new Error("initializeWasm() must be awaited first!");
9351                 }
9352                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
9353                 return nativeResponseValue;
9354         }
9355         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
9356         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
9357                 if(!isWasmInitialized) {
9358                         throw new Error("initializeWasm() must be awaited first!");
9359                 }
9360                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
9361                 // debug statements here
9362         }
9363         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
9364         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
9365                 if(!isWasmInitialized) {
9366                         throw new Error("initializeWasm() must be awaited first!");
9367                 }
9368                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
9369                 return nativeResponseValue;
9370         }
9371         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
9372         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
9373                 if(!isWasmInitialized) {
9374                         throw new Error("initializeWasm() must be awaited first!");
9375                 }
9376                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
9377                 // debug statements here
9378         }
9379         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
9380         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
9381                 if(!isWasmInitialized) {
9382                         throw new Error("initializeWasm() must be awaited first!");
9383                 }
9384                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
9385                 return nativeResponseValue;
9386         }
9387         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
9388         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
9389                 if(!isWasmInitialized) {
9390                         throw new Error("initializeWasm() must be awaited first!");
9391                 }
9392                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
9393                 // debug statements here
9394         }
9395         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
9396         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
9397                 if(!isWasmInitialized) {
9398                         throw new Error("initializeWasm() must be awaited first!");
9399                 }
9400                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
9401                 return nativeResponseValue;
9402         }
9403         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
9404         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
9405                 if(!isWasmInitialized) {
9406                         throw new Error("initializeWasm() must be awaited first!");
9407                 }
9408                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
9409                 // debug statements here
9410         }
9411         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
9412         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
9413                 if(!isWasmInitialized) {
9414                         throw new Error("initializeWasm() must be awaited first!");
9415                 }
9416                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
9417                 return nativeResponseValue;
9418         }
9419         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
9420         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
9421                 if(!isWasmInitialized) {
9422                         throw new Error("initializeWasm() must be awaited first!");
9423                 }
9424                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
9425                 // debug statements here
9426         }
9427         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
9428         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
9429                 if(!isWasmInitialized) {
9430                         throw new Error("initializeWasm() must be awaited first!");
9431                 }
9432                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
9433                 return nativeResponseValue;
9434         }
9435         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
9436         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
9437                 if(!isWasmInitialized) {
9438                         throw new Error("initializeWasm() must be awaited first!");
9439                 }
9440                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
9441                 // debug statements here
9442         }
9443         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
9444         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
9445                 if(!isWasmInitialized) {
9446                         throw new Error("initializeWasm() must be awaited first!");
9447                 }
9448                 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
9449                 return decodeArray(nativeResponseValue);
9450         }
9451         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_read(struct LDKu8slice ser);
9452         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
9453                 if(!isWasmInitialized) {
9454                         throw new Error("initializeWasm() must be awaited first!");
9455                 }
9456                 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
9457                 return nativeResponseValue;
9458         }
9459         // void ChannelInfo_free(struct LDKChannelInfo this_ptr);
9460         export function ChannelInfo_free(this_ptr: number): void {
9461                 if(!isWasmInitialized) {
9462                         throw new Error("initializeWasm() must be awaited first!");
9463                 }
9464                 const nativeResponseValue = wasm.ChannelInfo_free(this_ptr);
9465                 // debug statements here
9466         }
9467         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
9468         export function ChannelInfo_get_features(this_ptr: number): number {
9469                 if(!isWasmInitialized) {
9470                         throw new Error("initializeWasm() must be awaited first!");
9471                 }
9472                 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
9473                 return nativeResponseValue;
9474         }
9475         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
9476         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
9477                 if(!isWasmInitialized) {
9478                         throw new Error("initializeWasm() must be awaited first!");
9479                 }
9480                 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
9481                 // debug statements here
9482         }
9483         // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
9484         export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
9485                 if(!isWasmInitialized) {
9486                         throw new Error("initializeWasm() must be awaited first!");
9487                 }
9488                 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
9489                 return decodeArray(nativeResponseValue);
9490         }
9491         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9492         export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
9493                 if(!isWasmInitialized) {
9494                         throw new Error("initializeWasm() must be awaited first!");
9495                 }
9496                 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
9497                 // debug statements here
9498         }
9499         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
9500         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
9501                 if(!isWasmInitialized) {
9502                         throw new Error("initializeWasm() must be awaited first!");
9503                 }
9504                 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
9505                 return nativeResponseValue;
9506         }
9507         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
9508         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
9509                 if(!isWasmInitialized) {
9510                         throw new Error("initializeWasm() must be awaited first!");
9511                 }
9512                 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
9513                 // debug statements here
9514         }
9515         // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
9516         export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
9517                 if(!isWasmInitialized) {
9518                         throw new Error("initializeWasm() must be awaited first!");
9519                 }
9520                 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
9521                 return decodeArray(nativeResponseValue);
9522         }
9523         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9524         export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
9525                 if(!isWasmInitialized) {
9526                         throw new Error("initializeWasm() must be awaited first!");
9527                 }
9528                 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
9529                 // debug statements here
9530         }
9531         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
9532         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
9533                 if(!isWasmInitialized) {
9534                         throw new Error("initializeWasm() must be awaited first!");
9535                 }
9536                 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
9537                 return nativeResponseValue;
9538         }
9539         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
9540         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
9541                 if(!isWasmInitialized) {
9542                         throw new Error("initializeWasm() must be awaited first!");
9543                 }
9544                 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
9545                 // debug statements here
9546         }
9547         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
9548         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
9549                 if(!isWasmInitialized) {
9550                         throw new Error("initializeWasm() must be awaited first!");
9551                 }
9552                 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
9553                 return nativeResponseValue;
9554         }
9555         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
9556         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
9557                 if(!isWasmInitialized) {
9558                         throw new Error("initializeWasm() must be awaited first!");
9559                 }
9560                 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
9561                 // debug statements here
9562         }
9563         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
9564         export function ChannelInfo_write(obj: number): Uint8Array {
9565                 if(!isWasmInitialized) {
9566                         throw new Error("initializeWasm() must be awaited first!");
9567                 }
9568                 const nativeResponseValue = wasm.ChannelInfo_write(obj);
9569                 return decodeArray(nativeResponseValue);
9570         }
9571         // struct LDKChannelInfo ChannelInfo_read(struct LDKu8slice ser);
9572         export function ChannelInfo_read(ser: Uint8Array): number {
9573                 if(!isWasmInitialized) {
9574                         throw new Error("initializeWasm() must be awaited first!");
9575                 }
9576                 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
9577                 return nativeResponseValue;
9578         }
9579         // void RoutingFees_free(struct LDKRoutingFees this_ptr);
9580         export function RoutingFees_free(this_ptr: number): void {
9581                 if(!isWasmInitialized) {
9582                         throw new Error("initializeWasm() must be awaited first!");
9583                 }
9584                 const nativeResponseValue = wasm.RoutingFees_free(this_ptr);
9585                 // debug statements here
9586         }
9587         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
9588         export function RoutingFees_clone(orig: number): number {
9589                 if(!isWasmInitialized) {
9590                         throw new Error("initializeWasm() must be awaited first!");
9591                 }
9592                 const nativeResponseValue = wasm.RoutingFees_clone(orig);
9593                 return nativeResponseValue;
9594         }
9595         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
9596         export function RoutingFees_get_base_msat(this_ptr: number): number {
9597                 if(!isWasmInitialized) {
9598                         throw new Error("initializeWasm() must be awaited first!");
9599                 }
9600                 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
9601                 return nativeResponseValue;
9602         }
9603         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
9604         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
9605                 if(!isWasmInitialized) {
9606                         throw new Error("initializeWasm() must be awaited first!");
9607                 }
9608                 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
9609                 // debug statements here
9610         }
9611         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
9612         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
9613                 if(!isWasmInitialized) {
9614                         throw new Error("initializeWasm() must be awaited first!");
9615                 }
9616                 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
9617                 return nativeResponseValue;
9618         }
9619         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
9620         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
9621                 if(!isWasmInitialized) {
9622                         throw new Error("initializeWasm() must be awaited first!");
9623                 }
9624                 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
9625                 // debug statements here
9626         }
9627         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
9628         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
9629                 if(!isWasmInitialized) {
9630                         throw new Error("initializeWasm() must be awaited first!");
9631                 }
9632                 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
9633                 return nativeResponseValue;
9634         }
9635         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
9636         export function RoutingFees_read(ser: Uint8Array): number {
9637                 if(!isWasmInitialized) {
9638                         throw new Error("initializeWasm() must be awaited first!");
9639                 }
9640                 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
9641                 return nativeResponseValue;
9642         }
9643         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
9644         export function RoutingFees_write(obj: number): Uint8Array {
9645                 if(!isWasmInitialized) {
9646                         throw new Error("initializeWasm() must be awaited first!");
9647                 }
9648                 const nativeResponseValue = wasm.RoutingFees_write(obj);
9649                 return decodeArray(nativeResponseValue);
9650         }
9651         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_ptr);
9652         export function NodeAnnouncementInfo_free(this_ptr: number): void {
9653                 if(!isWasmInitialized) {
9654                         throw new Error("initializeWasm() must be awaited first!");
9655                 }
9656                 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_ptr);
9657                 // debug statements here
9658         }
9659         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
9660         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
9661                 if(!isWasmInitialized) {
9662                         throw new Error("initializeWasm() must be awaited first!");
9663                 }
9664                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
9665                 return nativeResponseValue;
9666         }
9667         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
9668         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
9669                 if(!isWasmInitialized) {
9670                         throw new Error("initializeWasm() must be awaited first!");
9671                 }
9672                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
9673                 // debug statements here
9674         }
9675         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
9676         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
9677                 if(!isWasmInitialized) {
9678                         throw new Error("initializeWasm() must be awaited first!");
9679                 }
9680                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
9681                 return nativeResponseValue;
9682         }
9683         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
9684         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
9685                 if(!isWasmInitialized) {
9686                         throw new Error("initializeWasm() must be awaited first!");
9687                 }
9688                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
9689                 // debug statements here
9690         }
9691         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
9692         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
9693                 if(!isWasmInitialized) {
9694                         throw new Error("initializeWasm() must be awaited first!");
9695                 }
9696                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
9697                 return decodeArray(nativeResponseValue);
9698         }
9699         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
9700         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
9701                 if(!isWasmInitialized) {
9702                         throw new Error("initializeWasm() must be awaited first!");
9703                 }
9704                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
9705                 // debug statements here
9706         }
9707         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
9708         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
9709                 if(!isWasmInitialized) {
9710                         throw new Error("initializeWasm() must be awaited first!");
9711                 }
9712                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
9713                 return decodeArray(nativeResponseValue);
9714         }
9715         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9716         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
9717                 if(!isWasmInitialized) {
9718                         throw new Error("initializeWasm() must be awaited first!");
9719                 }
9720                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
9721                 // debug statements here
9722         }
9723         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
9724         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
9725                 if(!isWasmInitialized) {
9726                         throw new Error("initializeWasm() must be awaited first!");
9727                 }
9728                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
9729                 // debug statements here
9730         }
9731         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
9732         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
9733                 if(!isWasmInitialized) {
9734                         throw new Error("initializeWasm() must be awaited first!");
9735                 }
9736                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
9737                 return nativeResponseValue;
9738         }
9739         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
9740         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
9741                 if(!isWasmInitialized) {
9742                         throw new Error("initializeWasm() must be awaited first!");
9743                 }
9744                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
9745                 // debug statements here
9746         }
9747         // 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);
9748         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 {
9749                 if(!isWasmInitialized) {
9750                         throw new Error("initializeWasm() must be awaited first!");
9751                 }
9752                 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
9753                 return nativeResponseValue;
9754         }
9755         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
9756         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
9757                 if(!isWasmInitialized) {
9758                         throw new Error("initializeWasm() must be awaited first!");
9759                 }
9760                 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
9761                 return decodeArray(nativeResponseValue);
9762         }
9763         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
9764         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
9765                 if(!isWasmInitialized) {
9766                         throw new Error("initializeWasm() must be awaited first!");
9767                 }
9768                 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
9769                 return nativeResponseValue;
9770         }
9771         // void NodeInfo_free(struct LDKNodeInfo this_ptr);
9772         export function NodeInfo_free(this_ptr: number): void {
9773                 if(!isWasmInitialized) {
9774                         throw new Error("initializeWasm() must be awaited first!");
9775                 }
9776                 const nativeResponseValue = wasm.NodeInfo_free(this_ptr);
9777                 // debug statements here
9778         }
9779         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9780         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
9781                 if(!isWasmInitialized) {
9782                         throw new Error("initializeWasm() must be awaited first!");
9783                 }
9784                 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
9785                 // debug statements here
9786         }
9787         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
9788         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
9789                 if(!isWasmInitialized) {
9790                         throw new Error("initializeWasm() must be awaited first!");
9791                 }
9792                 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
9793                 return nativeResponseValue;
9794         }
9795         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
9796         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
9797                 if(!isWasmInitialized) {
9798                         throw new Error("initializeWasm() must be awaited first!");
9799                 }
9800                 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
9801                 // debug statements here
9802         }
9803         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
9804         export function NodeInfo_get_announcement_info(this_ptr: number): number {
9805                 if(!isWasmInitialized) {
9806                         throw new Error("initializeWasm() must be awaited first!");
9807                 }
9808                 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
9809                 return nativeResponseValue;
9810         }
9811         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
9812         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
9813                 if(!isWasmInitialized) {
9814                         throw new Error("initializeWasm() must be awaited first!");
9815                 }
9816                 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
9817                 // debug statements here
9818         }
9819         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
9820         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
9821                 if(!isWasmInitialized) {
9822                         throw new Error("initializeWasm() must be awaited first!");
9823                 }
9824                 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
9825                 return nativeResponseValue;
9826         }
9827         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
9828         export function NodeInfo_write(obj: number): Uint8Array {
9829                 if(!isWasmInitialized) {
9830                         throw new Error("initializeWasm() must be awaited first!");
9831                 }
9832                 const nativeResponseValue = wasm.NodeInfo_write(obj);
9833                 return decodeArray(nativeResponseValue);
9834         }
9835         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
9836         export function NodeInfo_read(ser: Uint8Array): number {
9837                 if(!isWasmInitialized) {
9838                         throw new Error("initializeWasm() must be awaited first!");
9839                 }
9840                 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
9841                 return nativeResponseValue;
9842         }
9843         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
9844         export function NetworkGraph_write(obj: number): Uint8Array {
9845                 if(!isWasmInitialized) {
9846                         throw new Error("initializeWasm() must be awaited first!");
9847                 }
9848                 const nativeResponseValue = wasm.NetworkGraph_write(obj);
9849                 return decodeArray(nativeResponseValue);
9850         }
9851         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
9852         export function NetworkGraph_read(ser: Uint8Array): number {
9853                 if(!isWasmInitialized) {
9854                         throw new Error("initializeWasm() must be awaited first!");
9855                 }
9856                 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
9857                 return nativeResponseValue;
9858         }
9859         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
9860         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
9861                 if(!isWasmInitialized) {
9862                         throw new Error("initializeWasm() must be awaited first!");
9863                 }
9864                 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
9865                 return nativeResponseValue;
9866         }
9867         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
9868         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
9869                 if(!isWasmInitialized) {
9870                         throw new Error("initializeWasm() must be awaited first!");
9871                 }
9872                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
9873                 return nativeResponseValue;
9874         }
9875         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
9876         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
9877                 if(!isWasmInitialized) {
9878                         throw new Error("initializeWasm() must be awaited first!");
9879                 }
9880                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
9881                 return nativeResponseValue;
9882         }
9883         // 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);
9884         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
9885                 if(!isWasmInitialized) {
9886                         throw new Error("initializeWasm() must be awaited first!");
9887                 }
9888                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
9889                 return nativeResponseValue;
9890         }
9891         // 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);
9892         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
9893                 if(!isWasmInitialized) {
9894                         throw new Error("initializeWasm() must be awaited first!");
9895                 }
9896                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
9897                 return nativeResponseValue;
9898         }
9899         // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
9900         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
9901                 if(!isWasmInitialized) {
9902                         throw new Error("initializeWasm() must be awaited first!");
9903                 }
9904                 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
9905                 // debug statements here
9906         }
9907         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
9908         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
9909                 if(!isWasmInitialized) {
9910                         throw new Error("initializeWasm() must be awaited first!");
9911                 }
9912                 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
9913                 return nativeResponseValue;
9914         }
9915         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
9916         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
9917                 if(!isWasmInitialized) {
9918                         throw new Error("initializeWasm() must be awaited first!");
9919                 }
9920                 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
9921                 return nativeResponseValue;
9922         }
9923
9924         export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
9925             if(isWasmInitialized && !allowDoubleInitialization) {
9926                 return;
9927             }
9928             const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
9929             wasm = wasmInstance.exports;
9930             isWasmInitialized = true;
9931         }
9932