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